Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Compose stability explained

Explains why the Compose compiler marks a class stable or unstable, so you fix needless recomposition properly.

What we improved

Rebuilt the twelve phase order so it matches the Compose compiler's inference and no longer contradicts itself. The original said the stability annotation fires "in phase 6 before phase 5 is reached", called the registry phase 9 in one file

Improved by YourAISkill from the original by skydoves, under its Apache-2.0 licence. The download includes the author's licence and a CHANGES.md listing every change. Both Claude reviews read the improved version.

Claude's review

8/10 Deep, well-ordered model of Compose stability inference with bitmasks, $stable, strong-skipping effects, worked patterns and rules that stop misleading advice.

We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.

In detail

Use this skill to explain why the Compose compiler classified a class or composable parameter as stable, runtime, unknown, or unstable. Covers the 12-phase inference algorithm, the five compiler-level stability types (Certain / Runtime / Unknown / Parameter / Combined), the generic bitmask encoding (Pair=0b11, ImmutableList=0b1), the Known Stable Constructs registry, and the runtime `$stable: Int` field generated by `@StabilityInferred`. Use when the developer asks "why is X classified as Y?", when a stability report shows a surprising `runtime stable`, `unknown`, or `unstable` verdict, when generics, inheritance, cycles, interfaces, or cross-module classes are involved, or when the user mentions `$stable`, `@StabilityInferred`, separate compilation, or "the compiler thinks my class is unstable but it looks fine".

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: understanding-stability-inference
description: "Explain why the Jetpack Compose compiler classified a class or composable parameter as stable, unstable, runtime or uncertain, and predict the verdict before running a report. Walks the compiler's inference order (fast path types, type parameters, nullability, value classes, cycles, @Stable/@Immutable markers including inherited ones, enums, the Known Stable Constructs registry, the stability configuration file, @StabilityInferred on classes from other modules, interfaces, and field by field analysis), the five stability values, generic bitmasks and the $stable field, and what stability changes under strong skipping (default since Kotlin 2.0.20). Use when a developer asks 'why is X unstable / runtime?', when a classes.txt or composables.txt report surprises them, when generics, recursive types, interfaces, Java types, kotlin.collections or classes from another module are involved, or when they mention $stable, @StabilityInferred or a stability config file."
license: Apache-2.0. See LICENSE for complete terms.
metadata:
  author: Jaewoong Eum (skydoves)
  keywords:
  - jetpack-compose
  - performance
  - stability
  - stability-inference
  - compose-compiler
  - runtime-stability
  - stability-inferred
  - generics-stability
  - separate-compilation
  - known-stable-constructs
---

<!-- Modified by YourAISkill (youraiskill.com) on 2 December 2026 from the original by skydoves. See CHANGES.md. -->

# Understanding Stability Inference: Read the Compiler's Mind

The Compose compiler decides stability with a fixed sequence of checks over each type. This skill teaches that sequence so Claude can explain why a report says what it says, predict a verdict before the report exists, and pick a fix that keeps the class honest. The compiler report is the ground truth: when this model and the report disagree, trust the report and look for the check you missed.

## When to use this skill

- "Why is `Foo` `runtime` and not `stable`?" or "why is this data class unstable, it only has `val`s?"
- Generics: `Box<T>`, `Pair<String, List<Item>>`, `ImmutableList<User>`.
- The class lives in another module or library, is written in Java, or is an interface.
- A recursive type (`class Node(val children: List<Node>)`) is unstable.
- Questions about `$stable`, `@StabilityInferred`, the stability configuration file, or why stability matters now that strong skipping exists.

## When NOT to use this skill

- The developer only needs a performance fix and already knows which parameter is unstable; make the change directly (`val` instead of `var`, `ImmutableList` instead of `List`, hoist a `Flow` collection).
- The problem is recomposition caused by reading state too high in the tree, not stability.

## Step 0: get the ground truth

...

From skydoves's repository, Apache-2.0 licence.

Related skills

  • Checked

    Compose UI test setup

    Sets up the right Gradle test dependencies for Jetpack Compose UI tests, so they launch instead of failing early.

    by skydoves 351
    8/101 credit
  • Checked

    Android Gradle Plugin upgrade

    Moves Kotlin Multiplatform projects to Android Gradle Plugin 9 and fixes the build failures it causes.

    by Kotlin 1.1k
    8/101 credit
  • Checked

    Android Edge-to-Edge Fix

    Makes Jetpack Compose apps draw edge to edge, so buttons, lists and text fields never hide behind system bars.

    by android 11k
    8/101 credit
  • Checked

    Offline Android LLM apps

    Builds an Android app that runs an open LLM on the phone with LiteRT, so it works without a server.

    by android 11k
    7/101 credit
  • Checked

    Android TV Compose Migration

    Moves an Android TV app from old Leanback screens to Compose for TV, with remote control focus that works.

    by android 11k
    7/101 credit
  • Checked

    CometChat Android Chat Setup

    Adds working CometChat chat screens to your Android app in Kotlin or Jetpack Compose, set up in the right order.

    by cometchat 182
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added