Skip to content
Back to skills

Compose Performance

ASecurity

Use when investigating Jetpack Compose recomposition cost, compiler stability reports, skippability, unstable parameters, frame-rate State reads, cross-phase snapshot back-writing, or @ReadOnlyComposable contracts.

  • 1,070 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 5, 2026
databasesperformance

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 30, 2026

npx -y skills add chrisbanes/skills --skill compose-performance --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Compose Performance?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Compose Performance
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/chrisbanes-compose-performance/badge)](https://www.skillsdirectory.com/skills/chrisbanes-compose-performance)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: compose-performance
description: Use when investigating Jetpack Compose recomposition cost, compiler stability reports, skippability, unstable parameters, frame-rate State reads, cross-phase snapshot back-writing, or @ReadOnlyComposable contracts.
---

# Compose performance

## Core principle

Measure one user-visible transition, identify the runtime axis that causes the
work, then apply the smallest correction at the phase or boundary where that
axis begins.

## Procedure

1. Reproduce one concrete transition and capture the observable evidence:
   recomposition counts, compiler reports, profiler data, or a clear trace.
2. Classify the primary axis: parameter stability and skipping, State read
   phase, or snapshot state written back into an earlier phase.
3. Check for a false lead: a real data change, a correctness defect, or an
   unchanged lazy item that is expected to recompose.
4. Read the corresponding focused reference before proposing a change.
5. For review work, pair every finding with the smallest evidence-supported
   repair. For a false stability promise, explicitly say to replace mutable
   non-snapshot properties with immutable data or snapshot-observable state,
   verify that contract, and only then decide whether an annotation remains
   needed. For a phase problem, name the layout or draw consumer where the
   changing read or calculation should move. A cross-phase write proves
   invalidation or an extra pass; do not claim oscillation or an infinite loop
   unless evidence shows values repeatedly changing. Do not stop at diagnosis.
   When only source code is available, separate the proven feedback path from
   its unmeasured runtime cost. Give a conditional repair direction based on
   the intended measurement boundary; do not prescribe a callback swap,
   equality guard, or content-layout rewrite as a performance fix without
   evidence that it changes the observed problem. For an `Int` held in
   `mutableStateOf` with the default structural equality policy, an unchanged
   value already avoids invalidation.
6. Change one axis at a time and re-measure the same transition.
7. Finish when the evidence improves at the observed boundary without hiding
   state changes, caching stale values, or moving work to a less correct owner.

## Topic router

| Signal | Read |
|---|---|
| Cause is unknown, or several axes may interact | [Diagnosis](references/diagnosis.md) |
| `classes.txt`, `composables.txt`, strong skipping, unstable parameters, or collection stability | [Stability](references/stability.md) |
| Scroll, animation, gesture, layout, or draw State read at frame rate; measured state fed back into composition | [Deferred reads](references/deferred-reads.md) |
| A composable only reads composition locals or accessor-style values | [Composition contracts](references/composition-contracts.md) |
| State ownership or effect lifecycle is the root cause | [Compose state and effects](../compose-state-and-effects/SKILL.md) |

Files in this skill

  • SKILL.md2.5 KB
  • references/composition-contracts.md1.1 KB
  • references/deferred-reads.md2.7 KB
  • references/diagnosis.md2.7 KB
  • references/stability.md2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…