agentleFS
DesquaredDesquared/agents-rules-skills/skills/android-performance-profiler/SKILL.md

android-performance-profiler

Skill4 starsChanged 3 months agoMITView on GitHub

Identifies potential performance bottlenecks in Jetpack Compose code including expensive recompositions, unnecessary redraws, and memory issues. Use when code involves lists, animations, complex UI, or when the user asks about performance optimization.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    Use Layout Inspector → Recomposition Counts to visualize recompositions Use Compose Compiler Metrics report (stability analysis) Enable …

    line 47
  2. Distinctive:

    Use Compose Compiler Metrics report (stability analysis) Enable Composition Tracing in Layout Inspector

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Performance Profiler (Android)

Checklist

Recompositions

  • Composables only recompose when state changes
  • State properly scoped with remember
  • Stable item keys in LazyColumn
  • Annotate custom data classes with @Stable or @Immutable
  • Defer state reads (wrap in lambdas where possible)
  • Avoid backwards writes (never write to a state that was already read higher in the same composable)

Lists

  • Use LazyColumn not Column + verticalScroll for large data
  • Stable keys via key() parameter
  • Lightweight item composables

Memory

  • No memory leaks (avoid Activity/View refs)
  • Use Coil/Glide for image loading with caching
  • Proper lifecycle management

Body Computation

  • No heavy work in composable body
  • Use remember for expensive calculations
  • Use derivedStateOf for derived state

Quick Wins

IssueFix
Parent recomposesExtract stable child composables
Expensive bodyUse remember or derivedStateOf
Unstable IDsUse stable keys in LazyColumn
Memory leakAvoid storing Activity/View references
Broad recompositionNarrow state scope
Unstable custom types causing broad recompositionsAdd @Stable/@Immutable
Backwards write or immediate state readDefer with lambda or derivedStateOf

Debug

Use Layout Inspector → Recomposition Counts to visualize recompositions
Use Compose Compiler Metrics report (stability analysis)
Enable Composition Tracing in Layout Inspector

Severity

  • 🔴 Critical: Visible lag, leaks
  • 🟡 Moderate: Noticeable impact
  • 🟢 Minor: Optimization opportunity

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.