using-strong-skipping-correctly

Audits Jetpack Compose code for correct Strong Skipping Mode behavior and lambda memoization.

Updated May 31, 2026
One-click install
npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill using-strong-skipping-correctly-decoutkhanqindev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-strong-skipping-correctly
Source: https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat/tree/main/.claude/skills/using-strong-skipping-correctly
Command: npx skills add https://github.com/decoutkhanqindev/Lich-Viet-Loc-Phat --skill using-strong-skipping-correctly-decoutkhanqindev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Jetpack Compose's Strong Skipping Mode (default since Kotlin 2.0.20) changes how composables skip recomposition and auto-remember lambdas, but it leaves sharp edges: unstable params compare by reference, lambdas in non-@Composable scopes like LazyListScope.items are not memoized, and escape-hatch annotations are easily misused. This Skill guides verification, auditing, and correct use of those behaviors. ## Core Features & Use Cases - Verify Strong Skipping is active: Check the Kotlin/Compose compiler plugin version, feature flags, and confirm restartable skippable entries in Compose Compiler reports. - Audit lambda capture sites: Identify unstable literal captures (e.g. listOf(...) in composable params) and lambdas in non-@Composable scopes (LazyListScope.items, Modifier.pointerInput) that strong skipping does not auto-remember. - Apply escape hatches correctly: Decide when @DontMemoize, @NonSkippableComposable, @NonRestartableComposable, and @ReadOnlyComposable are justified, with a full reference table in references/escape-hatches.md. - Use Case: A developer migrating from Kotlin 1.9.x to 2.0.20+ sees a LazyColumn item recomposing on every parent tick; the Skill pinpoints that the items { } block is not a @Composable scope and shows how to hoist a stable callback or use a method reference. ## Quick Start Ask the assistant to check whether strong skipping is active in your Compose project and audit why a specific composable still recomposes despite it.

Frequently Asked Questions about using-strong-skipping-correctly

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable or disable Strong Skipping Mode in Jetpack Compose?▼

Strong Skipping is on by default with the Compose compiler plugin in Kotlin 2.0.20+. To disable it, add featureFlags.add(ComposeFeatureFlag.StrongSkipping.disabled()) inside the composeCompiler block; the legacy enableStrongSkippingMode property is deprecated but still works on older Kotlin.

Do I still need @Stable or @Immutable with strong skipping enabled?▼

Yes. Strong skipping compares unstable params with reference equality (===), so a copy() with identical content still fails and recomposes. Marking types @Immutable with stable collections makes equals-based skipping work for structurally equal instances.

Why does my composable still recompose despite strong skipping?▼

Common causes are unstable literal captures like listOf(...) allocated per recomposition, lambdas inside non-@Composable scopes such as LazyListScope.items, or an explicit @NonSkippableComposable annotation. Check the *-composables.txt report and hoist unstable values into remember or top-level constants.

Does strong skipping auto-remember lambdas inside LazyColumn items?▼

No. The items { } block is a LazyListScope DSL, not a @Composable function, so lambdas there are not auto-remembered. Hoist a stable callback with remember(key) or pass a method reference like vm::select to avoid per-row allocations.

When should I use @DontMemoize or @NonSkippableComposable?▼

Use @DontMemoize on a lambda expression only when it must capture fresh per-call state, and @NonSkippableComposable only for side-effect-only composables like loggers that must run every recomposition. Both are rare opt-outs that need a co-located comment justifying them.