agentsclimarketplace

Android performance profiler

Skill Desquared/agents-rules-skills/skills/android-performance-profiler

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.From its SKILL.md

Install
npx -y skills add Desquared/agents-rules-skills --skill android-performance-profiler

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.2 KB, as published. Nobody here has run it

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

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.