Android compose performance

From krutikJain/android-agent-skills · View interactive version

Android compose performance is an AI agent skill from the GitHub repository krutikJain/android-agent-skills. Profile and improve Compose recomposition, layout, scrolling, startup, and rendering performance in Android apps.

How to use this skill

Skill file

Android Compose Performance

When To Use

Workflow

  1. Identify whether the target surface is Compose, View system, or a mixed interoperability screen.
  2. Select the lowest-friction UI pattern that satisfies responsiveness, accessibility, and performance needs.
  3. Build the UI around stable state, explicit side effects, and reusable design tokens.
  4. Exercise edge cases such as long text, font scaling, RTL, and narrow devices in the fixture apps.
  5. Validate with unit, UI, and screenshot-friendly checks before handing off.

Guardrails

Anti-Patterns

Remediation Examples

Stabilize list identity

LazyColumn {
    items(tasks, key = { it.id }) { task ->
        TaskRow(task)
    }
}

Move heavy work out of composition

@Composable
fun TaskBoard(tasks: List<TaskUiModel>) {
    val visibleTasks = remember(tasks) { tasks.sortedBy { it.title } }
    LazyColumn { items(visibleTasks, key = { it.title }) { TaskRow(it) } }
}

Avoid broad scroll-driven recomposition

Box(
    modifier = Modifier.offset {
        IntOffset(0, scrollState.value)
    }
)

Examples

Happy path

Edge case

Failure recovery

Done Checklist

Official References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.