agentleFS
GDvegaGDvega/super-android-kotlin-firebase-skill/skills/compose-performance/SKILL.md

compose-performance

Skill2 starsChanged 5 months agoMITView on GitHub

Use for Compose recomposition, stability, LazyColumn/LazyGrid performance, derivedStateOf, remember, keys, baseline profiles, tracing and measurement.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Document residual risks and validation gaps.

    line 30
  2. Distinctive:

    Do not add remember everywhere blindly.

    line 35
  3. Distinctive:

    Do not use @Stable/@Immutable unless the contract is true.

    line 36
  4. Distinctive:

    Use stable lazy keys and content types when needed.

    line 37
  5. Distinctive:

    Prefer release-mode measurement for meaningful performance claims.

    line 38
  6. Distinctive:

    Do not assume these companion skills are installed.

    line 51
  7. Distinctive:

    Use $super-android-kotlin-firebase to diagnose jank in this LazyColumn.

    line 90
  8. Distinctive:

    Use $super-android-kotlin-firebase to review Compose stability and recomposition.

    line 91

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Diagnose and fix measurable Compose performance issues without guessing.

When to use

  • A screen scrolls poorly or drops frames.
  • Recomposition counts spike unexpectedly.
  • Lazy lists, side effects or state reads are suspected performance causes.
  • Baseline profiles, tracing or performance CI are needed.

Inputs to inspect

  • Affected composables and state models.
  • Profiler, compiler report or benchmark evidence if available.
  • Lazy list item models and keys.
  • Build variants and benchmark tasks.

Required workflow

  1. Reproduce or describe the performance symptom.
  2. Inspect state reads, stability, keys and side effects.
  3. Apply the smallest targeted fix.
  4. Measure again with available tools.
  5. Document residual risks and validation gaps.

Rules

  • Measure before large rewrites.
  • Do not add remember everywhere blindly.
  • Do not use @Stable/@Immutable unless the contract is true.
  • Use stable lazy keys and content types when needed.
  • Prefer release-mode measurement for meaningful performance claims.

Related existing skills

Local skills to invoke

  • jetpack-compose
  • macrobenchmark-baseline-profiles
  • screen-ux-audit
  • testing

External companion skills to use when installed

Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.

  • aldefy/compose-skill — use for deeper Jetpack Compose, Material 3, design-to-code, theming or Compose architecture guidance.
  • skydoves/compose-performance-skills — use for deeper Compose performance, recomposition, stability or release-mode measurement guidance.

Files commonly touched

  • Compose screens
  • UI models
  • benchmark module
  • baseline-prof.txt
  • build.gradle.kts

Commands to validate

./gradlew assembleRelease
./gradlew connectedBenchmarkAndroidTest
./gradlew test
adb shell am profile start

Common mistakes to avoid

  • Optimizing from intuition only.
  • Ignoring image size/loading.
  • Using unstable mutable models as parameters.
  • Missing lazy item keys.

Checklist

  • Symptom known.
  • Stability/recomposition checked.
  • Lazy keys checked.
  • Measurement command provided.
  • Fix does not harm readability.

Example prompts

  • Use $super-android-kotlin-firebase to diagnose jank in this LazyColumn.
  • Use $super-android-kotlin-firebase to review Compose stability and recomposition.

Expected response style

Respond with: brief diagnosis, change plan, affected files, code or diff summary, validation commands, tests added or recommended, risks, and next step. For review tasks, lead with findings ordered by severity.

References

  • ../../docs/audits/FUENTES_LOCALES.md
  • references/recomposition-checklist.md
  • templates/performance-investigation-template.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.