How guoxicheng/skip works
1. Repository shape
- This is a multi-part project centered on an Android app called SKIP, plus a documentation site and a small TypeScript tooling/scripts area.
- The Android app is the core runtime; the docs and scripts support release, configuration validation, and user guidance.
2. Primary product boundary: Android app
- The app lives under app/ and is built with Kotlin + Android Gradle.
- It uses a fairly standard layered pattern: UI (Compose-based screens/buttons/dialogs) → ViewModels → Repositories → platform/network/storage services.
- Shared model types are in dataclass/, which define the data passed between layers.
3. Core user-facing purpose
- SKIP’s main job is to use Android Accessibility Services to detect and interact with splash-screen ad UI, especially “skip” buttons.
- The top-level app flow is oriented around enabling accessibility, keeping the app alive in the background, configuring rules, and inspecting UI nodes when needed.
4. System services and runtime persistence
- The architectural center of the app is in service/:
- MyAccessibilityService is the main automation entry point.
- MyForegroundService and FloatingWindowService keep the process alive and provide overlay behavior.
- InspectService and AccessibilityInspectRepository/ViewModel support inspection/debugging of accessibility trees.
- These services are the bridge between the Android system and the app’s rule/config logic.
5. Main screen flows
- ui/main/ is the landing area, with buttons and dialogs for:
- enabling accessibility,
- showing the tutorial,
- showing the disclaimer.
- ui/alive/ manages background survival features such as a notification bar and backstage mode.
- ui/about/ exposes update/config-related actions and app metadata.
6. Inspection and debugging subsystem
- ui/inspect/ and service/InspectService form a separate inspection workflow for analyzing accessible nodes.
- ui/record/ stores and browses captured inspection records, including screenshots or node snapshots.
- The capture/ zip files in the repo appear to be sample inspection artifacts, likely used for testing or documentation.
- This subsystem is distinct from the “automatic skip” path and is more for debugging rules and layout behavior.
7. Whitelist and app selection
- ui/whitelist/ manages which apps are eligible for SKIP behavior.
- It includes:
- a paged app list,
- search/filtering,
- a system-app visibility toggle.
- This is an important control boundary: automation is not applied globally without user curation.
8. Configuration and rules pipeline
- The app ships with built-in config files in app/src/main/assets/:
- skip_config.yaml,
- skip_config_v2.yaml,
- skip_config_v3.yaml,
- skip_config_v3.json.
- data/config/ handles loading and reading these rule sets, while ConfigViewModel and related repositories feed the UI.
- The README also advertises a hosted subscription URL, so config is designed to be updatable externally rather than hardcoded only in the APK.
9. Versioning and auto-update flow
- data/version/ and ui/settings/update/ provide update/version checks.
- data/download/ handles APK download, suggesting the app can fetch a newer release directly from the network.
- MyApiNetwork, ServiceCreator, and MyApiService isolate network access from the rest of the app.
- This makes update checks and downloads a separate concern from the accessibility automation logic.
10. Persistence and local state
- util/DataStoreUtils.kt indicates local preference/state persistence via Android DataStore.
- Settings features such as theme switching, strict mode, recent items, tips, and auto-update likely persist user preferences here.
- util/NetworkUtils.kt, AccessibilityStateUtils.kt, and DebounceHelper.kt are cross-cutting helpers used across UI and service flows.
11. UI architecture style
- The app is organized into feature folders with repeated patterns:
- Activity as entry point,
- ViewModel for state,
- Repository for business/data access,
- reusable UI components under ui/components/.
- The theme system is separated in ui/theme/, and resource icons/layouts are in standard Android resource folders.
- This keeps screen logic modular even though the app is behavior-heavy and service-driven.
12. Docs site as a companion subsystem
- The docs/ directory is a VitePress site documenting installation, usage, accessibility setup, white-listing, keep-alive behavior, and advanced custom config/layout inspection.
- It also contains interactive Vue components and a small IndexedDB-based file utility layer for browsing inspection content.
- This documentation is not just marketing; it supports the app’s most complex runtime behaviors and rule format.
13. Release/tooling pipeline
- scripts/ is a TypeScript toolchain used to validate YAML/config and release-related files.
- The tests under scripts/__tests__/ include many malformed examples, which indicates the project has strict schema validation for config files and packaged APK assets.
- The .github/workflows/deploy.yml workflow suggests automated deployment, likely for docs or release artifacts.
14. High-level data flow
- User input starts in Compose screens.
- ViewModels call repositories to read/write DataStore, load config, check versions, or trigger downloads.
- Accessibility services consume the selected config rules and the current app’s node tree to decide whether/how to interact.
- Inspection/recording paths capture UI structure for later analysis, and the docs/scripts help maintain and validate those artifacts.
15. What to draw as the main architectural boundaries
- Draw three major zones:
- Android runtime app: UI, services, repositories, config, persistence.
- External data sources: hosted config subscription, version/download endpoint, Android system accessibility/overlay APIs.
- Supporting ecosystem: docs site and release/config validation scripts.
- The most important dependency direction is from UI/settings/config into the accessibility service layer, because the app’s core function depends on those rules being available to the service at runtime.
Main entry points: ConfigLoadRepository.kt Config data · MyAccessibilityService.kt Accessibility service · ApkVersionRepository.kt Update data · AccessibilityInspectRepository.kt Inspection core
Components 22
Android app
Core SKIP runtime on Android: UI, services, config, persistence, and automation.
- App shell · Application entry and overall app wiring.
app/src/main/java/com/android/skip/MyApp.kt - Main screen · Landing flow for accessibility enablement, tutorial, and disclaimer.
app/src/main/java/com/android/skip/ui/main/MainActivity.kt - Keep alive · Background survival controls such as notification bar and backstage mode.
app/src/main/java/com/android/skip/ui/alive/AliveActivity.kt - About screen · App info plus version and config update actions.
app/src/main/java/com/android/skip/ui/about/AboutActivity.kt - Settings · User preferences for theme, strict mode, tips, recent items, and auto-update.
app/src/main/java/com/android/skip/ui/settings/SettingsActivity.kt - Whitelist · App selection boundary for where automation is allowed.
app/src/main/java/com/android/skip/ui/whitelist/WhiteListActivity.kt - Inspect UI · Screen for starting inspection, floating controls, and record capture.
app/src/main/java/com/android/skip/ui/inspect/InspectActivity.kt - Records · Browsing and viewing captured inspection records and screenshots.
app/src/main/java/com/android/skip/ui/record/InspectRecordActivity.kt - Config data · Loads and reads built-in and externally updated skip rules.
app/src/main/java/com/android/skip/data/config/ConfigLoadRepository.kt - Update data · Checks release versions and downloads APK updates.
app/src/main/java/com/android/skip/data/version/ApkVersionRepository.kt - API client · Retrofit-style service creation and remote API access.
app/src/main/java/com/android/skip/data/network/ServiceCreator.kt - Local state · DataStore-backed settings and shared cross-cutting utilities.
app/src/main/java/com/android/skip/util/DataStoreUtils.kt - Accessibility service · Main automation entry point that detects and interacts with ad UI.
app/src/main/java/com/android/skip/service/MyAccessibilityService.kt - Runtime services · Foreground, floating-window, and inspection services that keep the app alive and expose system overlays.
app/src/main/java/com/android/skip/service/MyForegroundService.kt - Inspection core · Captures and exposes accessibility trees for debugging and rule analysis.
app/src/main/java/com/android/skip/service/AccessibilityInspectRepository.kt - Shared models · Data carriers for configs, versions, app lists, nodes, and records.
app/src/main/java/com/android/skip/dataclass/ConfigReadSchema.kt
Docs site
VitePress documentation and interactive inspection views.
- Docs content · Guides, advanced config docs, and layout inspection documentation.
docs/index.md - Inspect docs · Interactive inspection UI and ZIP browsing helpers in the docs site.
docs/inspect/index.md
Tooling
TypeScript validation and release scripts for configs and packaged artifacts.
- Config checks · YAML and release-file validation scripts with malformed fixtures.
scripts/yaml-check.ts - Release scripts · Release-file generation and packaging helpers.
scripts/release-file.ts
External systems
Android platform APIs and remote update/config endpoints the app depends on.
- Android system · Accessibility, foreground service, overlay, notification, and storage platform capabilities.
- Remote endpoints · Externally hosted config subscription and APK/version download endpoints.
Connections 25
- App shell → Main screen: launches · Starts the primary user-facing flow.
- Main screen → Accessibility service: enable skip · Routes the user toward accessibility activation and runtime automation.
- Main screen → Local state: prefs · Reads and writes local user state.
- Settings → Local state: stores · Persists theme, strict mode, tips, recent, and update preferences.
- Whitelist → Local state: stores · Saves app-selection and visibility choices.
- About screen → Update data: checks update · Triggers version lookup and APK download flows.
- About screen → Config data: loads config · Surfaces configuration version and refresh actions.
- Keep alive → Runtime services: controls · Starts keep-alive and overlay behavior.
- Inspect UI → Inspection core: captures trees · Starts inspection and floating-window collection.
- Records → Inspection core: browses · Reads stored inspection records and screenshots.
- Accessibility service → Config data: applies rules · Consumes skip rules at runtime.
- Accessibility service → Shared models: uses models · Operates on shared node and config schemas.
- Runtime services → Android system: uses · Depends on foreground, overlay, notification, and service APIs.
- Accessibility service → Android system: accessibility · Integrates with Android accessibility services.
- Inspection core → Android system: inspects UI · Reads accessibility trees and related node state.
- Config data → Remote endpoints: syncs · Fetches externally updated rule/config data.
- Update data → API client: requests · Uses the API client to check versions and download APKs.
- API client → Remote endpoints: calls · Connects to hosted version and config endpoints.
- Docs content → Config data: documents · Explains installation, configuration, keep-alive, and whitelist behavior.
- Inspect docs → Inspection core: explains · Documents the inspection workflow and artifact browsing.
- Config checks → Config data: validates · Checks YAML/config structure against expected schema.
- Release scripts → Update data: supports release · Assists release artifact handling and APK versioning.
- Config checks → Remote endpoints: guards inputs · Protects external config and packaged assets from malformed data.
- Shared models → Config data: schema · Defines typed config payloads and node structures.
- Shared models → Update data: schema · Defines version and download payloads.