understanding-stability-inference

Installation
SKILL.md

Understanding Stability Inference — read the compiler's mind

Stability is decided by a 12-phase algorithm baked into the Compose compiler. This skill teaches Claude how the algorithm walks a type so it can explain why a report says what it says, and predict classifications before the report is even generated. Pair this with ../diagnosing-compose-stability/SKILL.md (which generates the report) and ../stabilizing-compose-types/SKILL.md (which fixes obvious unstable types). Reach for this skill when the simpler skills produce a verdict that surprises the developer.

When to use this skill

  • The developer asks "why is Foo classified as runtime stable and not stable?"
  • A report shows runtime or unknown for a class that "looks fine".
  • Generics involved: Box<T>, Wrapper<A, B>, Pair<String, Int>, ImmutableList<User>.
  • The class lives in another module and ships as a .class/.kotlin_metadata artifact.
  • The developer asks about the $stable: Int field, @StabilityInferred, or cross-module classification.
  • A self-referential type (class Node(val children: List<Node>)) is unstable for non-obvious reasons.
  • A Java type, an interface, or an abstract base appears in a parameter list and surprises the developer.

When NOT to use this skill

  • The fix is mechanical (varval, ListImmutableList, Flow parameter removal). Use ../stabilizing-compose-types/SKILL.md.
  • No report exists yet. Run ../diagnosing-compose-stability/SKILL.md first.
  • The developer wants CI enforcement of stability. Use ../enforcing-stability-in-ci/SKILL.md.
Related skills

More from skydoves/compose-performance-skills

Installs
8
GitHub Stars
377
First Seen
Apr 30, 2026