performance-optimizer-android

performance-optimizer-android is an agent for Claude Code from Desquared/agents-rules-skills. It costs 44 tokens per session (431 once invoked), scanned A, original, MIT.

An Android code-review specialist focused on making apps use less memory, processor time, battery, and startup time. It examines Jetpack Compose, Android's UI toolkit, along with app lifecycle and background-work code.

In plain words
What is it for?
Use it to review Compose recompositions, large-list scrolling, image memory use, background work, lifecycle handling, and cold or warm app startup.
Why use it?
It helps identify causes of slow screens, excessive UI updates, memory leaks, battery drain, and slow launches.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to review Compose recompositions, large-list scrolling, image memory use, background work, lifecycle handling, and cold or warm app startup.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/desquared/agents-rules-skills/android-performance-optimizer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Desquared/agents-rules-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for performance-optimizer-android

README.md
[![agentmods](https://agentmods.dev/badge/agents/desquared/agents-rules-skills/android-performance-optimizer/github.svg)](https://agentmods.dev/agents/desquared/agents-rules-skills/android-performance-optimizer)
Your own site
<a href="https://agentmods.dev/agents/desquared/agents-rules-skills/android-performance-optimizer"><img src="https://agentmods.dev/badge/agents/desquared/agents-rules-skills/android-performance-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance-optimizer-android

Your own site · 80×15
<a href="https://agentmods.dev/agents/desquared/agents-rules-skills/android-performance-optimizer"><img src="https://agentmods.dev/badge/agents/desquared/agents-rules-skills/android-performance-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 431 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00431
Opus 5.5 $0.00018 $0.00172
Sonnet 5.5 $0.00009 $0.00086
Haiku 4.5 $0.00004 $0.00043

Measured 1mo ago against content hash 7f59a497fd6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

performance-optimizer-android scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/android-performance-optimizer.md · 48 lines

What it actually says

Focus Areas

  1. Compose: Unnecessary recompositions, remember, derivedStateOf, LazyColumn optimization
  2. Memory: Leaks, bitmap management, view references, lifecycle issues
  3. CPU/Battery: Background work, WorkManager, location, network batching
  4. Lifecycle: Startup time, cold/warm launch, Activity/Fragment overhead

Quick Wins

  • Debug recompositions: Layout Inspector → Recomposition Counts
  • Use remember for expensive calculations
  • Use derivedStateOf for derived state
  • Use key() in LazyColumn for stable item identity
  • Use LazyColumn over Column + verticalScroll for large lists
  • Cache bitmaps, use Coil/Glide for images
  • Avoid work in composable body (use LaunchedEffect/SideEffect)
  • Prefer Dispatchers.IO for background work

Common Issues

Issue Fix
Parent recomposes Extract stable child composables
Expensive body computation Use remember or derivedStateOf
Unstable list IDs Use stable keys in LazyColumn
Memory leak Avoid storing Activity/View refs, use WeakReference
Animation jank Use animateTo with proper easing
Large list lag Use LazyColumn with proper keys

Output Format

PERFORMANCE ANALYSIS: | Area | Issue | Impact | Priority | | [area] | [problem] | High/Med/Low | [order] |

OPTIMIZATIONS: [specific code fixes]

PROFILING:

  • CPU Profiler for: [area]
  • Memory Profiler for: [area]
  • Layout Inspector for: [recomposition counts]
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 48 lines · 44 tokens per session scan A 7f59a497fd6a

Subscribe to this mod's changes

performance-optimizer-android is an agent published in the GitHub repository Desquared/agents-rules-skills (4 stars, last pushed 13d ago), licensed MIT. It adds 44 tokens to every session and 431 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

flutter-reviewer

Flutter and Dart code reviewer. Reviews Flutter code for widget best practices, state management patterns, Dart idioms, performance pitfalls, accessibility, and clean architecture violations. Library-agnostic — works with any state management solution and tooling.

affaan-m/ECC · 50 tokens

harmonyos-app-resolver

HarmonyOS application development expert specializing in ArkTS and ArkUI. Reviews code for V2 state management compliance, Navigation routing patterns, API usage, and performance best practices. Use for HarmonyOS/OpenHarmony projects.

affaan-m/ECC · 49 tokens

textkit-auditor

Use this agent when the user mentions TextKit review, text layout issues, Writing Tools integration, or UITextView/NSTextView code review.

CharlesWiltgen/Axiom · 35 tokens

resize-auditor

Use this agent when the user mentions window resizing support, resizable-window readiness, iPhone Mirroring compatibility, iPhone Duo readiness, scene-lifecycle migration checking, or preparing an app for the 27-cycle resizing model.

CharlesWiltgen/Axiom · 50 tokens

swiftui-layout-auditor

Use this agent when the user mentions SwiftUI layout review, adaptive layout issues, GeometryReader problems, or multi-device layout checking.

CharlesWiltgen/Axiom · 33 tokens

energy-auditor

Use this agent when the user mentions battery drain, energy optimization, power consumption audit, or pre-release energy check — timer abuse, polling patterns, continuous location, animation leaks, and background mode misuse.

CharlesWiltgen/Axiom · 45 tokens