Find Compose stability and recomposition issues
ProprietarySearch-only recipes that surface Jetpack Compose anti-patterns the Android docs and Compose stability guide call out: unstable parameter types, mutable classes annotated @Stable/@Immutable, inline Modifier allocations, missing remember keys, effect-handler misuse, navigation inside composable bodies, single-child layout wrappers, lazy-list items without keys, and API-shape violations. Each match is a SearchResult for human review — Compose remedies are judgement calls (hoist? wrap? annotate? split?) that depend on context outside any one expression. For diff-only output on the small autofix set, use ImproveKotlinCompose.
org. openrewrite. kotlin. compose. Compose$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. compose. Compose$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Find Compose stability issues
- Find Compose
Modifiersmells - Find Compose layout hierarchy smells
- Find Compose state read/write issues
- Find Compose
rememberkey issues - Find Compose effect handler issues
- Find Compose navigation / coroutine misuse
- Find Compose API design issues
- Find Compose ViewModel wiring issues
- Find Compose
Modifierordering smells - Find
Modifier.padding(...)shorthand opportunities - Find Compose state + remember misuse
- Find Compose effect-handler misuse
- Find Compose recomposition smells
- Find lifecycle-naive flow / LiveData collection in Composables
- Find Compose function-naming conventions
- Find hardcoded color literals inside
@Composable - Find
remember { mutableStateOf(emptyList/Map()) }candidates for snapshot-aware containers - Find single-child wrapper composables (Material 3)