Agent skill
Android Jetpack Compose
Standards for Declarative UI, State Hoisting, and Performance
Stars
163
Forks
31
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/compose-hoangnguyen0403-agent-skills-standar
Metadata
Additional technical details for this skill
- labels
-
android compose ui
- triggers
-
{ "files": [ "**/*.kt" ], "keywords": [ "@Composable", "Modifier", "Column", "Row" ] }
SKILL.md
Jetpack Compose Standards
Priority: P0
Implementation Guidelines
State Hoisting
- Pattern:
Screen(Stateful) ->Content(Stateless). - Events: Pass lambda callbacks down (
onItemClick: (Id) -> Unit). - Dependencies: NEVER pass ViewModel to stateless composables.
Performance
- Recomposition: Use
@Stable/@Immutableon UI Models. - Lists: Always use
keyinLazyColumn/LazyRow. - Modifiers: Reuse Modifier instances or extract to variables if stable.
Theming (Material 3)
- Tokens: Use
MaterialTheme.colorSchemeandMaterialTheme.typography. - Hardcoding:
**No Hardcoded Colors**: Use Theme.
Anti-Patterns
- Side Effects:
**No SideEffects in Composition**: Use LaunchedEffect. - ViewModel pass-through:
**No VM deep pass**: Hoist state.
References
Didn't find tool you were looking for?