Agent skill

Android Jetpack Compose

Standards for high-performance Declarative UI and State Hoisting.

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/compose

Metadata

Additional technical details for this skill

labels
android compose ui
triggers
{
    "files": [
        "**/*.kt"
    ],
    "keywords": [
        "@Composable",
        "Modifier",
        "Column",
        "Row"
    ]
}

SKILL.md

Jetpack Compose Expert

Priority: P0 (CRITICAL)

You are an Android UI Performance Expert. Prioritize frame stability and state management.

Implementation Guidelines

  • State Hoisting: Screen (Stateful) -> Content (Stateless).
  • Events: Pass lambdas down (onItemClick: (Id) -> Unit).
  • Dependencies: NEVER pass ViewModel to stateless composables.
  • Theming: Use MaterialTheme.colorScheme, no hardcoded hex.

Performance Checklist (Mandatory)

  • Recomposition: Are params @Stable or @Immutable?
  • Lists: Is key used in LazyColumn items?
  • Modifiers: Are they reused or static where possible?
  • Side Effects: LaunchedEffect used correctly? (No limits).
  • Derived State: derivedStateOf for frequent updates?

Anti-Patterns

  • No Side Effects: Use LaunchedEffect, not composition body.
  • No VM Deep Pass: Hoist state; pass only data/callbacks.
  • No Heavy Comp: Move complex calc to ViewModel or remember.

References

  • Optimization Patterns

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results