diagnosing-compose-stability

Diagnose Jetpack Compose recomposition issues by reading Compose Compiler Reports.

Updated May 31, 2026
One-click install
npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill diagnosing-compose-stability-decoutkhanqindev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnosing-compose-stability
Source: https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat/tree/main/.claude/skills/diagnosing-compose-stability
Command: npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill diagnosing-compose-stability-decoutkhanqindev

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 fails the cause is invisible without compiler output. This Skill enables and interprets 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 Generation Setup: Configures the composeCompiler Gradle DSL (Kotlin 2.0+ plugin) scoped to release builds so Live Literals do not corrupt the data. - Report Interpretation: Decodes restartable, skippable, readonly, stable, unstable, runtime, @static, and @dynamic markers in composables.txt and traces unstable parameters back to root-cause fields in classes.txt. - Prioritized Triage: Uses module.json counts and hot-path analysis (LazyColumn items vs one-shot screens) to rank which unstable types actually matter. - Use Case: A developer sees a LazyColumn stuttering during scroll. This Skill walks them through generating release reports, finding unstable snacks: List<Snack> on a non-skippable composable, tracing it to the List interface in classes.txt, and handing off the concrete fix target. ## Quick Start Ask the assistant to diagnose why your composable recomposes by enabling Compose Compiler Reports on the release build and reading the generated composables.txt and classes.txt files.

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 my Jetpack Compose composable recomposes?▼

Enable Compose Compiler Reports via the composeCompiler Gradle block, 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 the 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 a release build?▼

Debug builds enable Live Literals, which turns constants into getters and makes them look dynamic. This inflates the unstable surface area in every report, so only release builds produce trustworthy stability data.

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.

Why is my composable not skippable even though parameters look fine?▼

A parameter typed as an interface like kotlin.collections.List has unknown stability because the compiler cannot prove implementations are immutable. Check classes.txt for the root cause, then swap to ImmutableList or use a stability configuration file.

Should I aim for 100 percent skippable composables?▼

No. Skippability is a diagnostic, not a KPI. A composable that runs once at startup gains nothing from being skippable; prioritize non-skippable composables on hot paths like LazyColumn items instead.