Use this skill when the user wants to design or set up a hard quality gate for a Kotlin Android repository. The scope is limited to Android Gradle projects and does not cover iOS, backend services, or web frontends.
Required reading
Before proposing changes, read these files in full:
../references/three-layer-model.md../references/landing-safety.md../references/github-review-and-rulesets.md../references/invocation-examples.md../references/gate-levels-and-template.mdreferences/platform-quality-gates.mdreferences/concrete-rules.md
These paths are all anchored to the directory where this skill's SKILL.md resides; after loading the skill, read the corresponding materials progressively using relative paths.
Process
- Inspect the target repository's
AGENTS.md、Gradle wrapper、convention plugin、build.gradle.kts, GitHub workflows, hook scripts, Detekt, Spotless, Android Lint, test tasks, and existing affected-check code. - Form a plan according to the three-layer structure below.
- If rules need to be extended or the latest rule names need to be confirmed, first check
references/concrete-rules.md's official documentation entry point; do not add rules from memory alone. - Use
../references/gate-levels-and-template.md's tier table to give recommended tiers and trade-offs; do not decide the tier for the user. - Stop at the confirmation-before-write gate. Show the exact files and remote settings the plan will create or modify, then request explicit approval from the user.
- After approval, land the narrowest but useful scaffold, run the new local entry point, and report GitHub settings that still require manual handling.
Layer 1: Checking tools
Identify executable Android checks: Gradle build and test tasks, Spotless, Detekt, Android Lint, screenshot or preview checks, custom affected-quality orchestration entry points, and dependency or module graph checks.
Layer 2: Checking rules
Map each tool to the rules it enforces: formatting, Kotlin static analysis, Android resource correctness, module boundaries, localization, dependency constraints, screenshot contracts, or preview contracts.
Layer 3: Invocation timing
Decide where checks run: local hooks provide fast feedback, pull request workflows serve as the authority, required status checks block merges, scheduled workflows carry slow regressions, and GitHub rulesets constrain review requirements.
Output shape
Return a concise scaffold plan containing:
- files planned to be created or modified;
- Layer 1 tools table;
- Layer 2 rules table;
- Layer 3 invocation timing table;
- confirmation-before-write prompt;
- verification commands after implementation.