cmp-verify
Skill0 starsChanged 3 days agoMITView on GitHub
Use when deciding when to build, when fixing a Gradle, KSP, Koin or Compose resources failure that cmp-gates reported as open, or when reading gate output in this Compose Multiplatform project — the build schedule, how to read the output, and the recipes for common Kotlin Multiplatform failures, including NoDefinitionFoundException at runtime. The gates themselves are run with cmp-gates.
In this repository20 other files it gives its agents.
- compass-kit/CLAUDE.mdCLAUDE.md
- unity-kit/CLAUDE.mdCLAUDE.md
- backend-new-projectSkill
- cmp-backendSkill
- cmp-code-rulesSkill
- cmp-commitSkill
- cmp-design-rulesSkill
- cmp-design-to-codeSkill
- cmp-detektSkill
- cmp-featureSkill
- cmp-gatesSkill
- cmp-maestroSkill
- cmp-new-projectSkill
- cmp-testingSkill
- game-balanceSkill
- game-briefSkill
- game-lookSkill
- game-new-projectSkill
- game-releaseSkill
- game-smokeSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Run the gates listed in CLAUDE.md under *Definition of done*, in that order.
- Very specific: line 12
Run them with cmp-gates: it runs them in a separate subagent and returns a short report, so the Gradle log stays out of this session.
- Distinctive: line 23
Run the Android gate after each screen or module is in place, not after every change.
- Very specific: line 25
Run the iOS gate twice: once midway, after the first module and any expect/actual code or commonMain code that touches time, files, …
- Very specific: line 76
Do not mask symptoms: no try/catch around a crash to make it quiet, no @Suppress, no baseline, no deleted or weakened test, no disabled …
- Distinctive: line 78
If the same error survives two different fixes, stop and reread: the cause is usually one layer away from where you are looking.
- Very specific: line 83
Every gate from CLAUDE.md ran green in this session, after the last code change (the last cmp-gates report shows them all ✅).
- Distinctive: line 86
If a gate stays red: the summary gives its last error line and what was tried.
- Distinctive: line 92
Run Gradle in the foreground and wait for it.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Verify and fix builds
1. The gates
Run the gates listed in CLAUDE.md under Definition of done, in that order.
- Run them with
cmp-gates: it runs them in a separate subagent and returns a short report, so the Gradle log stays out of this session. Run a gate directly only to reproduce one failurecmp-gatesreported as open. - The list names the exact commands: the Android debug build, the iOS simulator compile, detekt
(only when the project has it) and the test run. Run each one as written, as its own command.
CLAUDE.mdis the source of truth; do not substitute other task names. ./gradlew buildis not used: it also links release iOS frameworks and runs out of memory.- A red detekt gate is fixed with
cmp-detekt; a red or empty test gate withcmp-testing.
2. When to build
- Run the Android gate after each screen or module is in place, not after every change. Wrong imports are the most common failure; one run finds all of them.
- Run the iOS gate twice: once midway, after the first module and any
expect/actualcode orcommonMaincode that touches time, files, formatting or other platform APIs, and once in the final pass. Android compiling says nothing about iOS. - detekt and tests come once the code stands; the final pass runs every gate, in order.
3. Read the output correctly
- A success claim rests on what ran: the task lines in the log and, for tests, the test count. The exit code alone is not evidence.
- The test gate is green only with tests.
allTestssucceeds even when no module has a test (every test task showsNO-SOURCEorSKIPPED), but zero tests counts as red. Results are in<module>/build/test-results/iosSimulatorArm64Test/TEST-*.xml; thetests="N"attribute is the count. The new template also writestestAndroidHostTest/results (JVM run,KoinGraphTest); those are host-only and do not count toward the gate. Read them with Read orgrep. - A task aimed at the wrong module is green and proves nothing (for example
:feature:x:domain:allTestswhen the tests are indata). - The failing task names the layer:
| Failing task | Layer |
kspCommonMainKotlinMetadata | Koin wiring checked by KSP |
compileKotlinIosSimulatorArm64 or compileCommonMainKotlinMetadata, while compileAndroidMain passes | commonMain uses something only Android has |
compileAndroidMain fails as well | an ordinary Kotlin error: types, imports, syntax |
merge...Resources, dex..., package... | Android packaging or resources |
detekt | style and complexity findings (cmp-detekt) |
iosSimulatorArm64Test | a failing test (cmp-testing) |
- Kotlin errors look like
e: file:///...File.kt:12:5 message. Fix the first one; many of the rest are its consequences. - "Gradle did not start" is an environment problem, not a code problem: daemon crashes, JDK
errors, out of memory, a lost connection to the daemon. Run
./gradlew --stoponce and retry. If the project folder was moved and Android packaging fails on paths,./gradlew cleanonce.
4. Recipes
Symptoms, causes and fixes: references/failures.md. The most frequent:
- iOS red, Android green:
commonMainuses a JVM or Android API (java.*,System.*,String.format,Dispatchers.IOwithout its import,@Preview). Unresolved reference 'KoinViewModel': import it fromorg.koin.android.annotation.[ksp] --> Unreachable definition: add@Providedto that constructor parameter.NoDefinitionFoundExceptionat runtime: the order incmp-feature,references/koin.md.Resor a resource key does not resolve: wrongRespackage or missing key import.- Duplicate classes or version conflicts: align versions in
gradle/libs.versions.toml. Never touch the Gradle wrapper, the Kotlin or AGP versions, or thebuild-logicplugin wiring. Serializer for class ... is not foundwhen navigating: the destination lacks@Serializable.
5. Debugging discipline
- First decide the layer (compile, KSP, runtime, UI), then read the first real error line, then fix. Change one thing per attempt and rerun the same gate.
- Do not mask symptoms: no try/catch around a crash to make it quiet, no
@Suppress, no baseline, no deleted or weakened test, no disabled rule to turn a gate green. - If the same error survives two different fixes, stop and reread: the cause is usually one layer away from where you are looking.
Done when
- Every gate from
CLAUDE.mdran green in this session, after the last code change (the lastcmp-gatesreport shows them all ✅). - The final summary lists each gate's command and result, with the test count for the test gate.
- If a gate stays red: the summary gives its last error line and what was tried.
Headless runs
- There is no Grep or Glob tool. Besides
./gradlew, Bash runs read-only commands and the few the task prompt lists: search withgrep, find files withfindorls, read files with Read. - Run Gradle in the foreground and wait for it. Give each call a long Bash timeout (up to ten minutes): the first build of a fresh project and the iOS compile can take several minutes, and a timed-out call looks like a failure.
- Mind the turn budget: the Android gate per screen or module, the iOS gate midway and at the end, detekt and tests near the end, then all gates once more in order.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

