performance

performance is a skill for Claude Code, Codex from piyushverma0/android-agent-skills. It costs 110 tokens per session (1,367 once invoked), scanned A, original, MIT.

A guide to improving Android app speed and resource use, including how Jetpack Compose decides when interface code must run again.

In plain words
What is it for?
Use it when tuning Compose recomposition, list rendering, image caching, startup profiles, code shrinking, lazy loading, or memory-leak detection.
Why use it?
It helps reduce unnecessary interface updates, slow loading, excessive memory use, and other common performance problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when tuning Compose recomposition, list rendering, image caching, startup profiles, code shrinking, lazy loading, or memory-leak detection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/piyushverma0/android-agent-skills/performance
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.

Any agent
npx skills add piyushverma0/android-agent-skills --skill performance
Clone the repo
git clone --depth 1 https://github.com/piyushverma0/android-agent-skills

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/piyushverma0/android-agent-skills/performance.svg)](https://agentmods.dev/skills/piyushverma0/android-agent-skills/performance)
Your own site
<a href="https://agentmods.dev/skills/piyushverma0/android-agent-skills/performance"><img src="https://agentmods.dev/badge/skills/piyushverma0/android-agent-skills/performance.svg" alt="Measured on agentmods" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,367 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.00110 $0.01367
Opus 5 $0.00055 $0.00683
Sonnet 5 $0.00022 $0.00273
Haiku 4.5 $0.00011 $0.00137

Measured 8d ago against content hash 863f40e74c86, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

performance 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 8d 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.

skills/performance/SKILL.md · 188 lines

How it starts

The opening of the file, as written. The whole thing — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Android Performance

Rule 1: Compose stability — stop unnecessary recomposition

// ✅ @Stable for classes Compose can't infer stability
@Stable
class ItemState(
    val id: String,
    val title: String,
    var isExpanded: Boolean = false   // mutable but tracked
)

// ✅ @Immutable for guaranteed-immutable data (faster than @Stable)
@Immutable
data class Item(
    val id: String,
    val title: String,
    val tags: List<String>            // List is not stable by default — @Immutable fixes it
)

// ✅ Use ImmutableList from kotlinx-collections-immutable for stable lists
implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7")

@Composable
fun ItemList(items: ImmutableList<Item>) {  // ImmutableList is stable, List is not
    LazyColumn {
        items(items, key = { it.id }) { item ->
            ItemCard(item = item)   // won't recompose unless item changes
        }
    }
}

// ❌ List<Item> parameter causes ItemList to recompose on every parent recomposition
@Composable
fun ItemList(items: List<Item>) { ... }

Rule 2: derivedStateOf — compute only when dependencies change

// ✅ derivedStateOf — prevents recomposition when result doesn't change
@Composable
fun ItemList(items: List<Item>) {
    val listState = rememberLazyListState()

    // Only recomputes when scroll position crosses threshold
    val showScrollToTop by remember {
        derivedStateOf { listState.firstVisibleItemIndex > 3 }
    }

    // Only recomputes when filter changes, not on every recomposition
    val activeItems by remember(items) {
        derivedStateOf { items.filter { it.isActive } }
    }

    Box {
        LazyColumn(state = listState) {
            items(activeItems, key = { it.id }) { ItemCard(it) }
        }
        AnimatedVisibility(visible = showScrollToTop, modifier = Modifier.align(Alignment.BottomEnd)) {
            ScrollToTopButton(onClick = { /* scroll to top */ })
        }
    }
}

Read the full file on GitHub · 188 lines

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. 8d ago First seen · 188 lines · 110 tokens per session scan A 863f40e74c86

Subscribe to this mod's changes

performance is a skill published in the GitHub repository piyushverma0/android-agent-skills (15 stars, last pushed 4mo ago), licensed MIT. It adds 110 tokens to every session and 1,367 once invoked, about $0.0006 per session on Opus 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-30.