understanding-stability-inference

Explain Compose stability classifications for classes and composable parameters.

8|Updated May 18, 2025
One-click install
npx skills add https://github.com/decoutkhanqindev/DexReader --skill understanding-stability-inference-decoutkhanqindev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: understanding-stability-inference
Source: https://github.com/decoutkhanqindev/DexReader/tree/main/.claude/skills/understanding-stability-inference
Command: npx skills add https://github.com/decoutkhanqindev/DexReader --skill understanding-stability-inference-decoutkhanqindev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill demystifies the Compose Stability Inference process, providing developers with clear explanations and insights into why certain classes or composable parameters are classified as stable, runtime, unknown, or unstable.

Core Features & Use Cases

  • Algorithm Explanation: Offers an in-depth explanation of the 12-phase inference algorithm and its implications.
  • Stability Types: Defines and differentiates between the five compiler-level stability types (Certain, Runtime, Unknown, Parameter, Combined).
  • Use Case: When a developer encounters a stability classification that seems incorrect or unexpected, this Skill can help diagnose the issue and provide a rationale.

Quick Start

Use the understanding-stability-inference skill to explain the stability classification of a specific class or composable parameter.

Frequently Asked Questions about understanding-stability-inference

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

FAQPage Schema
How does Compose compiler stability inference work for classes?

Compose compiler stability inference works by evaluating classes and composable parameters through a 12-phase algorithm to determine if they are stable, runtime stable, or unstable. This classification dictates how the compiler skips recomposition for unchanged parameters.

Why does the Compose compiler mark my class as unstable when it contains only primitives?

The Compose compiler may mark a class as unstable due to generics stability rules or separate compilation boundaries where the compiler cannot guarantee known-stable constructs. Diagnosing this requires checking the specific inference algorithm phase that triggered the unstable classification.

What are the different stability types used by the Compose compiler?

The Compose compiler defines five stability types: Certain, Runtime, Unknown, Parameter, and Combined. Each type represents a different level of confidence the compiler has in a class or parameter's mutability during recomposition.

How do I diagnose unexpected stability classifications in Jetpack Compose?

To diagnose unexpected Compose stability classifications, analyze the class against the 12-phase inference algorithm. This process provides the rationale for why the compiler assigned a specific stability type, such as Runtime or Unknown, to your composable parameters.

When do I need to worry about runtime stability versus inferred stability in Jetpack Compose?

You need to worry about runtime stability when the compiler cannot guarantee stability at compile time, often due to separate compilation. The Compose compiler assigns a Runtime stability type, deferring the stability check to execution rather than treating it as a known-stable construct.