Skip to content
All Skills

Diagnosing Compose Stability

Use this skill to diagnose Jetpack Compose stability problems by enabling and reading the Compose Compiler Reports (classes.txt, composables.txt, composables.csv, module.json). Covers the Gradle DSL, the release-only build requirement, and how to interpret per-class and per-composable stability annotations including stable, unstable, runtime, restartable, skippable, readonly, @static, and @dynamic markers. Use when the developer asks "why does this recompose", reports jank, dropped frames, slow scroll, high recomposition count, suspects an unstable parameter, mentions Compose Compiler Reports, classes.txt, composables.txt, module.json, or wants to know which composables are non-skippable. The fix lives in a sibling skill — this one only diagnoses.

Mobile App Development|v1|Updated 7/2/2026|GitHub source
MCP get_skill({ skillId: "diagnosing-compose-stability-71c8e485" })

Use this skill with your agent

Create a free account and connect via MCP

Get Started Free
# Diagnosing Compose Stability — Read the Compiler Reports First

Compose skips recomposition by comparing parameters. When a parameter is unstable, skipping is disabled — this skill tells Claude how to find out which parameters are unstable and why. The output is a prioritized list of unstable types and non-skippable composables; the fix lives in `../stabilizing-compose-types/SKILL.md`.

## When to use this skill

- The developer asks "why does this recompose?", reports jank, dropped frames, or scroll stutter.
- A `@TraceRecomposition` log shows recomposition counts that exceed the number of meaningful state changes.
- The developer mentions Compose Compiler Reports, `classes.txt`, `composables.txt`, `composables.csv`, `module.json`, or "non-skippable".
- The developer asks how to find unstable parameters, or whether `List<Foo>`, `LocalDateTime`, or a domain type is stable.
- A reviewer asks for evidence that a perf-sensitive composable is skippable.

## When NOT to use this skill

- The unstable types are already known — jump straight to `../stabilizing-compose-types/SKILL.md`.
- The symptom is a wrong-phase state read (`Modifier.alpha(state.value)`); use `../../recomposition/deferring-state-reads/SKILL.md`.
- The symptom is a `derivedStateOf` misuse; use `../../recomposition/choosing-derivedstateof/SKILL.md`.
- The developer wants CI gating instead of one-shot diagnosis; use `../enforcing-stability-in-ci/SKILL.md`.

## Prerequisites

- Kotlin **2.0.0+** with the Compose Compiler Gradle plugin applied: `id("org.jetbrains.kotlin.plugin.compose")`. The pre-2.0 `kotlinCompilerExtensionVersion` flow is obsolete.
- A buildable **release** variant of the target module. Reports MUST be produced in release; debug adds Live Literals which makes constants look dynamic and skews every report.
- Apply the `org.jetbrains.kotlin.plugin.compose` Gradle plugin (Kotlin 2.0+). The `composeCompiler { … }` extension is owned by that plugin; AGP version is incidental.
- Optional but **PREFERRED:** the developer has a stability baseline goal, not a 100-percent-skippable goal (skydoves hot take #1 — skippability is a diagnostic, not a KPI).

## Workflow

- [ ] **1. Enable the reports in the module's `build.gradle.kts`.** Scope to release only — debug builds emit misleading data.

```kotlin
// app/build.gradle.kts (or any compose module)
plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("org.jetbrains.kotlin.plugin.compose")
}

composeCompiler {
    // Only emit reports for release to avoid Live Literals noise.
    val isReleaseBuild = providers.gradleProperty("composeCompilerReports").orNull == "true"
    if (isReleaseBuild) {
        reportsDestination = layout.buildDirectory.dir("compose_compiler")
        metricsDestination = layout.buildDirectory.dir("compose_compiler")
    }
}
```

Or the always-on form:

Continue reading

Sign up for a free account to view the full skill content

Login / Register
#android#jetpack-compose#performance#kotlin#compose#state#preservationandroidgradlekotlinjetpack-compose
Diagnosing Compose Stability - AgentArmory Skill — AgentArmory