What problem does it solve?
This Skill helps you identify and prevent unnecessary recompositions and state mistakes in Jetpack Compose by applying composition-time performance rules for state reads, derived state, identity, and stability.
Core Features & Use Cases
- Defer state reads to Layout/Drawing using provider-lambda modifier overloads to reduce restart scope and avoid re-rendering whole composable scopes.
- Use derivedStateOf correctly so recomposition happens only when the computed result changes, including the keys trap for parameters vs snapshot state.
- Protect component identity with stable call-site patterns and correct LazyList keys to prevent index-based identity bugs and cascading invalidations.
- Choose the right state lifetime (remember/retain/rememberSaveable/rememberSerializable) to match recomposition, configuration change, and process-death requirements.
- Apply stability and Strong Skipping Mode concepts to minimize unnecessary updates by passing stable inputs and understanding equality/reference comparisons.
Quick Start
Use the compose-composition-core skill to refactor a composable that recomposes too often by deferring rapidly changing state reads into the appropriate modifier lambda and verifying LazyList keys are stable.