diagnosing-compose-stability

Diagnose Jetpack Compose recomposition problems by reading Compose Compiler Reports.

1|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/citytexi/team-yg-pesonal-agent --skill diagnosing-compose-stability-citytexi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnosing-compose-stability
Source: https://github.com/citytexi/team-yg-pesonal-agent/tree/main/.claude/skills/diagnosing-compose-stability
Command: npx skills add https://github.com/citytexi/team-yg-pesonal-agent --skill diagnosing-compose-stability-citytexi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Jetpack Compose skips recomposition only when parameters are provably stable, and when skipping breaks down the cause is invisible without compiler output. This Skill walks through enabling and interpreting the Compose Compiler Reports (classes.txt, composables.txt, composables.csv, module.json) so you can pinpoint exactly which unstable parameters and non-skippable composables cause jank, dropped frames, and excessive recomposition. ## Core Features & Use Cases - Report Enablement: Configure the composeCompiler Gradle DSL (Kotlin 2.0+ plugin) scoped to release builds only, avoiding Live Literals noise from debug variants. - Report Interpretation: Decode per-class stability prefixes (stable, unstable, runtime) and per-composable flags (restartable, skippable, readonly, @static, @dynamic) with full grammar references. - Root-Cause Triage: Trace each unstable parameter in composables.txt back to its offending field in classes.txt, then prioritize by hot path (e.g., LazyColumn items) before handing off to a fix workflow. - Use Case: A developer sees scroll stutter in a feed screen. The Skill guides building :app:assembleRelease with reports enabled, finds unstable snacks: List<Snack> blocking skippability in HighlightedSnacks, and identifies the List interface as the root cause to fix. ## Quick Start Ask the AI to enable Compose Compiler Reports on your release build and diagnose why a specific composable keeps recomposing.

Frequently Asked Questions about diagnosing-compose-stability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find out why a composable keeps recomposing?▼

Enable Compose Compiler Reports via the composeCompiler Gradle DSL, build the release variant, then open composables.txt. Look for functions marked restartable but not skippable, and check which parameters are flagged unstable — those block skipping.

How to enable Compose Compiler Reports in Gradle?▼

Apply the org.jetbrains.kotlin.plugin.compose plugin (Kotlin 2.0+) and set reportsDestination and metricsDestination inside a composeCompiler block. Run ./gradlew :app:assembleRelease to generate classes.txt, composables.txt, composables.csv, and module.json under build/compose_compiler.

Why must Compose stability reports be generated from release builds?▼

Debug builds enable Live Literals, which turns constants into getters and makes literals look dynamic. This inflates the unstable surface area and skews module.json counts, so only release-variant reports reflect what ships to users.

What does runtime stable class mean in classes.txt?▼

It means the class is stable but has a generic parameter or separately-compiled field whose stability is resolved at runtime via a synthetic $stable field. It is not a problem — do not annotate it with @Stable, since the runtime check is the correct mechanism.

Should I aim for 100 percent skippable composables?▼

No. Skippability is a diagnostic, not a KPI. A non-skippable composable that runs once at startup is irrelevant; prioritize unstable parameters on hot paths like LazyColumn items, confirmed with runtime tracing or Macrobenchmark.

Why is the compose_compiler output directory empty after building?▼

The compose plugin may not be applied to that module, the build may have been an up-to-date no-op, or reportsDestination may be set in the legacy kotlinOptions flow. Clean the module, verify the composeCompiler block, and rebuild the release variant.