stabilizing-compose-types

Diagnose and stabilize unstable types in Jetpack Compose applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill solves issues of stability in Jetpack Compose code by stabilizing unstable types according to the three-tier strategy.

Core Features & Use Cases

  • Stability Diagnosis: Identifies unstable types in Jetpack Compose code.
  • Type Stabilization: Offers three tiers to stabilize the identified types (immutability, stability annotations, configuration files).
  • Documentation & Workflow: Provides extensive documentation on when to use each tier, prerequisites, and workflows.

Quick Start

To stabilize an unstable type, first run the diagnostic skill and then follow the detailed steps in the documentation for stabilizing types using annotations and configuration files.

Frequently Asked Questions about stabilizing-compose-types

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

FAQPage Schema
How do I fix unstable types in Jetpack Compose?

To fix Jetpack Compose unstable types, diagnose the instability and apply a three-tier strategy: rewrite with immutable collections, use @Immutable or @Stable annotations, or add a stability configuration file.

Why does my Jetpack Compose compiler report stability issues?

Jetpack Compose reports stability issues when types are not stable, often due to mutable properties or unannotated third-party classes, causing unnecessary recompositions that this skill diagnoses and resolves.

What's the best way to stabilize third-party Java types in Jetpack Compose?

The best way to stabilize third-party Java types in Jetpack Compose is to use a stability configuration file, which explicitly declares them as stable without modifying their source code.

When should I use @Immutable vs @Stable annotations in Kotlin?

Use @Immutable when all properties of a Kotlin type are truly immutable, and use @Stable when the type can change but emits updates to inform Compose, selecting the tier based on diagnosis results.

Can I use kotlinx collections immutable to fix Compose recomposition problems?

Yes, rewriting unstable types with kotlinx.collections.immutable provides the immutability guarantees needed to stabilize Jetpack Compose types and prevent unnecessary recompositions.

How do I diagnose Jetpack Compose stability problems before fixing them?

You diagnose Jetpack Compose stability problems by running the diagnostic workflow to identify unstable types, then following the documentation to stabilize them using annotations or configuration files.