/jetpack-compose-audit:jetpack-compose-audit [repo path or module path]from jetpack-compose-audit
Audits Android Jetpack Compose codebases for performance, state management, side effects, and composable API quality. Scores each category 0-10 and produces a strict markdown report with prioritized fixes.
Ships in jetpack-compose-audit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill audits Android Jetpack Compose repositories with a strict, evidence-based report.
Skill version: 4.3.2 — released 2026-07-07. Compose track: Kotlin 2.0.20+ / Compose Compiler 1.5.4+ (Strong Skipping Mode default). See the README changelog for what changed.
It is intentionally focused on four categories:
This skill does not score design or Material 3 compliance in v1. If the audit surfaces likely design-system problems, recommend a follow-up audit with the material-3 skill (reference implementation: https://github.com/hamen/material-3-skill).
Testing, focus/keyboard navigation, and Compose Multiplatform are coverage notes, not score categories. Map those surfaces when present, flag obvious risk, and recommend the focused compose-agent references (testing, focus, kmp) as follow-up work. Do not fold them into the 0-100 score unless the same root cause clearly affects one of the four scored categories.
Android launch UX resources are also adjacent coverage, not a score category. Always scan splash-screen theme resources; if Android 12+ could render a static splash icon blurry, include it as an Android Launch UX finding and allow it into Critical Findings / Prioritized Fixes when the evidence is concrete.
Owned and deliberate scope choices — call out the limitation in the report rather than silently producing thin coverage:
material-3 skill.semantics, content descriptions, touch-target sizing) — flag obvious gaps as a note, do not score.compose-agent focus on testing for deeper review.expect/actual, target-specific code paths) — note surface area and obvious platform-boundary risk; recommend compose-agent focus on kmp for deeper review.compose-agent focus on focus for deeper review.If the user explicitly asks for any of these, narrow the scope and state it in the report.
Use this skill when the user asks to:
Typical trigger phrases:
Produce both:
COMPOSE-AUDIT-REPORT.mdreferences/canonical-sources.md. The report template requires a References: line per finding.0-3 scores for repeated or systemic problems, not isolated mistakes.9-10 unless the repo is consistently strong across the category.Identify the target path:
[repo path or module path]), use it.Before mapping modules, confirm Compose is actually present (fast-fail):
androidx.compose in any build.gradle* or libs.versions.tomlsetContent { or @Composable under src/If neither shows up, stop and report that the target is out of scope. Do not run a full module map first.
If Compose is present only in samples/, demos/, or test sources (no production usage), narrow the scope to those directories, set confidence to Low, and state in the report that the audit is over sample code rather than production paths. Do not score production-quality categories against demo code.
Before scoring, identify:
commonMain, androidMain, iosMain, desktopMain, wasmJsMain) if presentres/values*/themes.xml, styles.xml, drawable-v31) if presentLook for:
@Composable functionsViewModel usageremember, rememberSaveable, mutableStateOfcollectAsStateWithLifecycle, collectAsStateLaunchedEffect, DisposableEffect, SideEffect, rememberUpdatedState, produceStateLazyColumn, LazyRow, items, itemsIndexedanimate*AsState, Animatable, updateTransition, rememberInfiniteTransition, AnimatedVisibility, AnimatedContent, CrossfadeFocusRequester, focusRequester, focusProperties, focusable, onFocusChanged, onPreviewKeyEvent, onKeyEventcreateComposeRule, createAndroidComposeRule, onNodeWithText, assertIsDisplayed, assertIsFocused, screenshot test rulescommonMain, expect, actual, AndroidView, UIKitView, platform services passed into common UIwindowSplashScreenAnimatedIcon, android:windowSplashScreenAnimatedIcon, drawable-v31, animated-vectorIf the repo is large, audit by category or by module. If subagents are available, parallelize category scans by spawning Explore-type subagents (no write tools) and merge the findings.
This is non-scored adjacent coverage, but it should run on every normal audit because the failure is user-visible and cheap to miss in Kotlin-only scans.
Look for:
windowSplashScreenAnimatedIcon and android:windowSplashScreenAnimatedIcon in res/values*/themes.xml and res/values*/styles.xml@drawable/ic_splashres/drawable-v31/<animated-vector>, <vector>, <adaptive-icon>, <bitmap>, <layer-list>An AnimatedVectorDrawable is Animatable, so the platform draws it on a SurfaceView at full size; a static icon instead falls onto the internal ImmobileIconDrawable path (pre-rendered at 108 dp, upscaled into the 160/192 dp icon), which is what looks blurry on XHDPI+ devices. Flag a finding when all of these are true:
windowSplashScreenAnimatedIcon for an Android app.<vector>, <adaptive-icon>, bitmap, or a layer-list around those), or there is no drawable-v31 override for the referenced splash icon.<animated-vector> on API 31+.Report it as Android Launch UX: Android 12+ static splash icon may render blurry, not as a Compose score deduction. Evidence should include the theme item, the resolved drawable file, and whether the res/drawable-v31 animated-vector override is missing. The fix direction is to keep the theme's @drawable/<name> stable and have it resolve to an <animated-vector> on API 31+ that wraps the real vector — no animators are required; an empty <animated-vector> is enough, because being an AVD is what changes the render path. One correctness caveat worth carrying into the report: the wrapper must reference a separately-named vector (a wrapper that references its own theme name re-resolves to itself on API 31+ and loops). Cite the Android splash-screen docs, the AndroidX SplashScreen reference, and the platform issue https://issuetracker.google.com/issues/520672537 (which quotes the AOSP source). The bug dates to Android 12 (API 31) on XHDPI+ devices and was open when this skill shipped; confirm the live status against the issue rather than asserting it open-endedly.
Do not ask the user to edit build.gradle or run commands themselves. The skill runs the build with a bundled Gradle init script that injects reportsDestination / metricsDestination into every Compose module without modifying any file in the target repo. Before scoring, attempt this:
Locate the init script shipped with the skill: scripts/compose-reports.init.gradle. The absolute path is the skill's install location — in most installs that's ~/.claude/skills/jetpack-compose-audit/scripts/compose-reports.init.gradle. If you cannot resolve the path, fall back to writing the script to <target>/.compose-audit-reports.init.gradle and delete it after the run.
Check for a Gradle wrapper in the target: test -x <target>/gradlew. If missing, skip to the fallback in step 6.
Pick a compile target. Prefer the cheapest task that still triggers Kotlin compilation for a Compose module:
rg -l 'com\.android\.application' -g '*.gradle*':<app-module>:compileReleaseKotlinAndroid, :<app-module>:compileReleaseKotlin, assembleRelease, assembleDebugcom.android.library), use that module instead.Run the build. Inform the user the build is starting (it may take several minutes).
cd <target> && ./gradlew <task> \
--init-script <path-to>/compose-reports.init.gradle \
--no-daemon --quiet
Use a 600-second timeout. If the task fails, try the next fallback task in step 3 once. Do not loop indefinitely.
Collect the reports.
find <target> -path '*/build/compose_audit/*' \
\( -name '*-classes.txt' -o -name '*-composables.txt' -o -name '*-composables.csv' -o -name '*-module.json' \)
From these files, extract:
unstable class in *-classes.txt) used as composable parameters*-composables.txt or *-composables.csv where isLambda == "0")*-module.json, AND compute the named-only skippability from *-composables.csv (by filtering out rows where isLambda == "1" and calculating sum(skippable) / sum(restartable)). Cite both in the Performance section, noting that zero-argument lambdas can artificially anchor the module-wide metric.Fallback if the build fails or Gradle is unavailable. Proceed with source-inferred stability findings, but:
Compiler diagnostics used: no in the report's Notes And Limits and explain the failure reason briefly (wrapper missing, compile error, timeout)Stability deductions from step 5 are measured evidence and should be weighted normally. Fallback deductions from step 6 are inferred and must be flagged as such in the report.
Use the scoring rubric in references/scoring.md and the heuristics in references/search-playbook.md.
Navigation 3: if the repo uses
rememberNavBackStack,NavDisplay, orNavKey, run playbook section 2b (Nav3 Detection & Audit) before scoring. Nav3 findings map to State Management and Side Effects — see the scoring note in section 2b.
Focus on:
LazyPagingItems misuse when collectAsLazyPagingItems is presentAnimatable held in remember, rememberInfiniteTransition scoped so it stops offscreen)Focus on:
remember vs rememberSaveableLoadState handling (loading / empty / error / append) when LazyPagingItems is presentFocus on:
LaunchedEffect(target) for target-driven state changes (not from the composition body; rememberCoroutineScope().launch { animateTo(...) } is usually for event- or gesture-driven animation)LazyPagingItems.refresh() / retry() called from composition or LaunchedEffect(Unit) to "load on enter" — initial load is PagingData's job; these are user-initiated onlyFocus on reusable internal components, not every leaf screen.
Check:
modifier presence and placementMutableState<T> or State<T> parameters in reusable APIs where a better shape existsanimationSpec: AnimationSpec<T> where callers may reasonably need timing control, and using meaningful label values on shared/tooling-visible animationsBefore deducting points:
app/build/compose_audit/app_release-classes.txt:42) as evidence. Only fall back to source-inferred stability claims if Step 4 failed, and label them as such.Assign each category a 0-10 score and a status:
0-3: fail4-6: needs work7-8: solid9-10: excellentUse the weights in references/scoring.md to compute the overall score.
Measured ceilings are mandatory, not suggestive. When Step 4 produced compiler reports, the Performance rubric in references/scoring.md defines a ceiling. First determine whether Strong Skipping is active (Kotlin 2.0.20+ / Compose Compiler 1.5.4+, or an explicit opt-in flag) and pick the matching table — the SSM-off table is driven by skippable% + unstable-class count, the SSM-on table by skippable% + instance-recreation churn + equals() quality on unstable params. After arriving at a qualitative Performance score, you MUST apply the ceiling and lower the score if it exceeds the cap. Show the math in the report, and name which table was applied:
Performance ceiling check:
Strong Skipping: OFF (Kotlin 1.9.x, no opt-in) → applying SSM-off table
skippable% = 186/273 = 68.1% → falls in 50-70% band → cap at 4
qualitative score: 7
applied score: 4 (ceiling lowered from 7)
Under Strong Skipping, skippable% will typically sit near 100% and stop being the binding constraint; the cap is usually driven by observed churn (listOf(...) / mapOf(...) / fresh literals passed into composables) or by expensive / broken equals() on unstable params. Name those findings explicitly in the ceiling-check block so the reader can audit the pick.
Do not round skippable% up into a higher band. 68.1% is not ≥70%. If a qualitative score lands at or below the ceiling, no adjustment is needed — but the check itself must appear in the report so the reader can audit it.
If a category genuinely has too little auditable surface area, mark it N/A, explain why, and renormalize the remaining weights.
Use references/report-template.md.
The report must include:
material-3 if design issues are suspectedWrite the report to:
COMPOSE-AUDIT-REPORT.md inside the audited target (the path the user passed), not the current working directory.If COMPOSE-AUDIT-REPORT.md already exists at that path, do not overwrite it silently. Either confirm overwrite with the user, or write to COMPOSE-AUDIT-REPORT-<YYYY-MM-DD>.md alongside it.
In chat, produce a summary that mirrors the report's Prioritized Fixes section — not a generic recap. The developer should be able to act on the summary alone without opening the report file.
Include:
COMPOSE-AUDIT-REPORT*.md at the same path, if present)FeedItemUiModel params")offset reads recompose DrawerContent every frame")scope.launch { animateTo(...) } in composition on SettingsScreen")LaunchedEffect(Unit) { feed.refresh() } on FeedScreen loads from composition")skippable%, named-only skippable%, which metric actually bound the cap, count of unstable shared types, and any module that failed to buildkey = { it.id } to items(...) in feed/FeedList.kt:42")references/canonical-sources.mdskippable% / unstable-param reductions; on SSM-on, frame it in terms of removing instance-recreation churn, fixing expensive / broken equals(), or clearing the binding capmaterial-3 audit is worth running nextcompose-agent focus on testing, compose-agent focus on focus, compose-agent focus on kmp, compose-agent focus on animation, or compose-agent focus on pagingThe top-three fixes in the chat summary MUST be the same items as the report's Prioritized Fixes list (same file paths, same doc links). Do not add generic advice in chat that isn't in the written report.
For medium or large repositories:
LaunchedEffect(Unit) or LaunchedEffect(true) on its own — the "run once" pattern is idiomatic. Only flag it when the body captures a value that may change without rememberUpdatedState. Paging carve-out: LaunchedEffect(Unit) { lazyPagingItems.refresh() } (or retry()) is a Side Effects defect — initial paged load is PagingData's job, and refresh()/retry() are user-initiated. Flag it.collectAsStateWithLifecycle, lifecycle-runtime-compose). Note the platform constraint as a tradeoff instead.references/scoring.md — per-rule rubric with inline citationsreferences/search-playbook.md — search patterns and red-flag heuristicsreferences/report-template.md — required structure for COMPOSE-AUDIT-REPORT.mdreferences/canonical-sources.md — the official URLs every deduction must citereferences/diagnostics.md — copy-pasteable Gradle/code snippets for Compose Compiler reports, stability config, baseline profiles, and R8 checksscripts/compose-reports.init.gradle — Gradle init script the skill injects via --init-script in Step 4 to generate compiler reports automaticallyevals/evals.json holds acceptance cases that grade an audit of existing code — each {prompt, expected_output, expectations} is a snippet plus the findings the audit must produce. Cases 12–14 (cross-phase back-write, Strong Skipping false lead, snapshot self-invalidation) are mirrored, in the opposite direction, by compose-agent's write-mode evals, so the scoring path and the authoring path stay in lockstep. Run a model against each prompt and check every expectation.
evals/evals.json (opens in a new tab)references/canonical-sources.md (opens in a new tab)references/diagnostics.md (opens in a new tab)references/report-template.md (opens in a new tab)references/scoring.md (opens in a new tab)references/search-playbook.md (opens in a new tab)scripts/compose-reports.init.gradle (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hamen/compose_skill --plugin jetpack-compose-auditOther plugins' skills for the same job