debugging-recompositions

Diagnose Jetpack Compose recompositions using Layout Inspector counts and Argument Change Reasons.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Jetpack Compose recompositions are invisible by default, so developers cannot tell which composable re-runs unnecessarily or which parameter causes it. This Skill makes recomposition visible and maps each finding to a concrete fix. ## Core Features & Use Cases - Recomposition and Skip Counts: Enable Layout Inspector recomposition and skip count columns to find composables with disproportionate re-run ratios. - Argument Change Reasons: Interpret the per-parameter Changed / Unchanged / Uncertain / Static / Unknown classifications from Android Studio Hedgehog and later, and map each status to the correct fix. - Release Confirmation: Validate fixes in a release + R8 build using @TraceRecomposition from compose-stability-analyzer instead of trusting debug counts. - Use Case: A developer notices a list item recomposing on every scroll frame. Use this Skill to identify the offending parameter as Uncertain, replace its List field with ImmutableList, and confirm zero recompositions in release. ## Quick Start Use this skill to find why my composable keeps recomposing and tell me which parameter is responsible.

Frequently Asked Questions about debugging-recompositions

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

FAQPage Schema
How do I see recomposition counts in Android Studio?▼

Open Tools > Layout Inspector on a debug build and toggle Show recomposition counts and Show recomposition skip counts. The component tree then shows recompositions/skips per node, and you should reset counts before reproducing the scenario.

What does Uncertain mean in Layout Inspector recomposition reasons?▼

Uncertain means Compose could not determine whether the parameter changed, usually because the type is unstable so the runtime fell back to identity equality. Fix it by annotating the type with @Stable or @Immutable and replacing List with ImmutableList so structural equals applies.

Can I trust Layout Inspector recomposition counts from a debug build?▼

No, debug counts are directional only because debug builds run interpreted Compose with Live Literals that inflate recomposition. Confirm the final number in a release plus R8 build using @TraceRecomposition from compose-stability-analyzer.

Why is my composable recomposing even though the data looks unchanged?▼

The parameter likely fails equality at runtime, often because copy() produces identity-different instances or a sub-field like List is unstable so equals never runs. Check the Argument Change Reasons panel: Changed means the value really differed, Uncertain means identity differed with inconclusive comparison.

What Android Studio version supports Argument Change Reasons?▼

Argument Change Reasons require Android Studio Hedgehog (2023.1.1) or later. Earlier versions show recomposition counts in Layout Inspector but not the per-parameter reason panel.