validating-compose-stability
Installation
SKILL.md
Validating Compose Stability — A CI Gate On Skippability And Parameter Stability
Compose stability — whether a composable is skippable/restartable and whether its parameters are stable — is invisible until a recomposition profiler catches it in production. This skill makes it a build gate: snapshot the current stability of every composable into a committed .stability baseline, and fail CI when a change makes anything less stable. The tool is the Compose Stability Analyzer Gradle plugin. (Authoring composables for stability — @Immutable/@Stable, the compiler config file, deferred reads — is covered in the compose-performance-skills repo; this skill is purely the validation/CI layer.)
When to use this skill
- The user wants
./gradlew stabilityCheckto fail CI when a composable becomes unskippable or a parameter flips stable → unstable. - The user wants a committed, reviewable baseline of every composable's stability (
.stabilityfiles) so changes show up in PR diffs. - A recomposition regression shipped because nothing flagged a
Listparameter or a non-@Immutabledata class added to a hot composable. - The user mentions
stabilityDump,stabilityCheck,composeStabilityAnalyzer,@IgnoreStabilityReport, or "stability baseline". - The user wants warning-only locally and hard-fail in CI.
When NOT to use this skill
- The user wants to fix an unstable parameter (
@Immutable/@Stable,kotlinx.collections.immutable,stability_config.conffor external types, deferred state reads,derivedStateOf) — that is Compose performance authoring; see thecompose-performance-skillsrepo's stability skills. This skill only validates and gates. - The user wants to find which recompositions are firing at runtime (Layout Inspector recomposition counts,
Recomposermetrics, composition tracing) — different tool, runtime not build time. - The user is doing UI behavioral or screenshot testing — see
../../setup/choosing-test-rule-vs-runtest/SKILL.mdand../../preview/capturing-preview-screenshots-in-ci/SKILL.md.