understanding-stability-inference

understanding-stability-inference is a skill for Claude Code, Codex from skydoves/compose-performance-skills. It costs 184 tokens per session (4,016 once invoked), scanned A, original, Apache-2.0.

A guide to how the Jetpack Compose compiler decides whether classes and composable function parameters are safe to treat as unchanged.

In plain words
What is it for?
Use it to interpret stability reports, predict classifications, and understand runtime or unknown stability, compiler metadata, and generated stability fields.
Why use it?
It explains surprising compiler classifications, including cases involving generic types, Java classes, separate modules, recursive types, or missing type information.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to interpret stability reports, predict classifications, and understand runtime or unknown stability, compiler metadata, and generated stability fields.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skydoves/compose-performance-skills/understanding-stability-inference
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add skydoves/compose-performance-skills --skill understanding-stability-inference
Clone the repo
git clone --depth 1 https://github.com/skydoves/compose-performance-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for understanding-stability-inference

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/understanding-stability-inference.svg)](https://agentmods.dev/skills/skydoves/compose-performance-skills/understanding-stability-inference)
Your own site
<a href="https://agentmods.dev/skills/skydoves/compose-performance-skills/understanding-stability-inference"><img src="https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/understanding-stability-inference.svg" alt="Measured on agentmods" height="20"></a>
Per session 184 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,016 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00184 $0.04016
Opus 5 $0.00092 $0.02008
Sonnet 5 $0.00037 $0.00803
Haiku 4.5 $0.00018 $0.00402

Measured 8d ago against content hash 84c1e7314e64, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

understanding-stability-inference scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

stability/understanding-stability-inference/SKILL.md · 230 lines

How it starts

The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Prerequisites

  • Compose Compiler reports already generated, or at least one <module>-classes.txt and <module>-composables.txt available in build/compose_compiler/.
  • The developer understands the basic stability vocabulary: stable, unstable, skippable, restartable, @Stable, @Immutable.
  • Kotlin 2.0+ with the Compose compiler plugin (Strong Skipping default ON).

Workflow — diagnostic question and answer tree

Read the full file on GitHub · 230 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 230 lines · 184 tokens per session scan A 84c1e7314e64

Subscribe to this mod's changes

understanding-stability-inference is a skill published in the GitHub repository skydoves/compose-performance-skills (499 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 184 tokens to every session and 4,016 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

compose-performance

Use when investigating Jetpack Compose recomposition cost, compiler stability reports, skippability, unstable parameters, frame-rate State reads, cross-phase snapshot back-writing, or @ReadOnlyComposable contracts.

chrisbanes/skills · 42 tokens

claude-android-ninja

Build and migrate Android apps with Kotlin, Jetpack Compose, MVVM, Hilt, Room 3 (KSP, SQLiteDriver, Flow/suspend DAOs), Navigation3, and multi-module Gradle. Use for new projects or modules, Compose screens and ViewModels, Room 3 and RemoteMediator, API 37 / targetSdk migration, Play Integrity client wiring…

Drjacky/claude-android-ninja · 123 tokens

compose-stability-diagnostics

Use when writing or reviewing Jetpack Compose parameter stability, compiler reports, skippability, unstable UI state classes, collection parameters, or Kotlin 2.0+ strong skipping behavior.

ashtanko/compose-android-template · 43 tokens

compose-recomposition-performance

Use when investigating Jetpack Compose recomposition performance, skippable/restartable composables, composables.txt or compiler reports, Layout Inspector recomposition counts, back-writing snapshot state across phases, or frame-rate State reads in composition vs layout/draw, and it is not yet clear whether the cause…

ashtanko/compose-android-template · 78 tokens

fgs-state-ended-trap

Suppress the "ended" playback state at a forwarding-player boundary while the underlying player is being replaced, so the media service is not torn down in the gap between one player finishing and the next starting. Use when background playback stops partway through a queue on some devices but never on your…

maxrave-dev/kotlin-footguns · 88 tokens

endless-queue-management

One StateFlow holds a growing playback queue but has two write paths on purpose — a full setter that resets derived snapshots, and continuation appends that write the backing field directly so those snapshots survive. Use when a feature keyed on "where the queue came from" stops working once the queue auto-extends, or…

maxrave-dev/kotlin-footguns · 78 tokens