Resources
1Install
npx skillscat add hoangnguyen0403/agent-skills-standard/android-jetpack-compose Install via the SkillsCat registry.
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
@Stableor@Immutable? - Lists: Is
keyused inLazyColumnitems? - Modifiers: Are they reused or static where possible?
- Side Effects:
LaunchedEffectused correctly? (No limits). - Derived State:
derivedStateOffor 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.