skydoves/using-stability-analyzer-ide-plugin
Use this skill to install and operate the `skydoves/compose-stability-analyzer` IntelliJ / Android Studio plugin so the developer sees Compose stability feedback live in the editor instead of waiting for a Gradle build. Covers installing the plugin from disk, configuring the `Settings → Tools → Compose Stability Analyzer` panel, reading the four gutter colors (green stable, red unstable, yellow runtime, gray no-params), the per-parameter hover documentation, the inline parameter hint badges, and the `UnstableComposable` weak-warning inspection with its `@Suppress("NonSkippableComposable")` and `@Suppress("ParamsComparedByRef")` quick fixes. Use when the user mentions gutter icons, inline hints, the stability inspection, the IDEA plugin, real-time stability feedback while editing, or asks why a composable is flagged as non-skippable in the editor.
npx skills add https://github.com/skydoves/compose-performance-skills --skill using-stability-analyzer-ide-plugin
The Compose Compiler reports tell the developer about stability after a build completes. The skydoves/compose-stability-analyzer IntelliJ plugin tells them while they edit. Gutter icons mark every @Composable with a color, hover docs render the per-parameter table with reasons, inline hints render colored badges next to each parameter type, and the UnstableComposable weak-warning inspection surfaces actionable problems with quick fixes.
The plugin uses the Kotlin K2 Analysis API to evaluate the same stability rules that drive ../understanding-stability-inference/SKILL.md, so editor feedback agrees with what ../diagnosing-compose-stability/SKILL.md would later show in the compiler reports. This shortens the loop from "ship → build → read reports" to "type → see the gutter".
UnstableComposable.Compose Stability Analyzer tool window.../enforcing-stability-in-ci/SKILL.md.../diagnosing-compose-stability/SKILL.md.../visualizing-recomposition-cascades/SKILL.md.../understanding-stability-inference/SKILL.md.org.jetbrains.kotlin.plugin.compose). The analyzer evaluates stability against the same compiler model.Clone skydoves/compose-stability-analyzer and build the IDEA module.
git clone https://github.com/skydoves/compose-stability-analyzer
cd compose-stability-analyzer
./gradlew :compose-stability-analyzer-idea:buildPlugin
The packaged plugin lands at compose-stability-analyzer-idea/build/distributions/*.zip.
In the IDE, open Settings → Plugins → ⚙ → Install Plugin from Disk… and pick the ZIP produced in step 1. Restart the IDE when prompted. DO NOT look for the plugin in the JetBrains Marketplace yet; the listing is under review at the time of writing.
Open Settings → Tools → Compose Stability Analyzer. Verify isStabilityCheckEnabled is on. The full set of toggles, all read from StabilitySettingsState, is:
| Key | Default | Effect |
|---|---|---|
| isStabilityCheckEnabled | true | Master switch for all editor features. |
| isStrongSkippingEnabled | true | Match Compose Compiler 2.0.20+ runtime: classify with strong skipping on. |
| showGutterIcons | true | Render the colored icon in the gutter beside each @Composable. |
| showGutterIconsOnlyForUnskippable | false | Hide green/gray icons; only show problems. Use on dense files. |
| showGutterIconsInTests | false | Render gutter icons inside test source roots too. |
| showWarnings | true | Enable the UnstableComposable inspection. |
| showInlineHints | true | Render colored parameter-type badges inline. |
| showOnlyUnstableHints | false | Suppress inline badges for stable parameters. |
| stableGutterColorRGB | #5FB865 (95, 184, 101) | Gutter / hint color for stable composables. |
| unstableGutterColorRGB | #E8684A (232, 104, 74) | Gutter / hint color for unstable composables. |
| runtimeGutterColorRGB | #F0C674 (240, 198, 116) | Gutter / hint color for runtime-stability composables. |
| stableHintColorRGB / unstableHintColorRGB / runtimeHintColorRGB | per defaults above | Inline hint color overrides. |
| ignoredTypePatterns | "" | Newline- or comma-separated glob list of types to treat as stable. |
| stabilityConfigurationPath | "" | Optional path to the same stability_config.conf the compiler reads. |
| isHeatmapEnabled | true | Allow the live recomposition heatmap (see ../visualizing-recomposition-cascades/SKILL.md). |
Point stabilityConfigurationPath at the project's stability_config.conf so the in-editor classification matches the compiler's classification.
Open any Kotlin file containing @Composable functions. Confirm a colored icon appears beside each. The four colors and their meanings:
| Color | Hex | Meaning |
|---|---|---|
| Green | #5FB865 | Skippable; every parameter stable. |
| Red | #E8684A | At least one unstable parameter; not skippable. |
| Yellow | #F0C674 | At least one runtime-stability parameter (resolved across separate compilation units). |
| Gray | #808080 | No parameters (still restartable but trivially skippable). |
A gray gutter is fine; the function has nothing to compare. A green gutter means the analyzer believes Compose will skip recomposition when arguments are equal. A red or yellow gutter is a diagnostic: the function will recompose more than necessary when the parent recomposes.
Hover any composable name. The popup, served by StabilityDocumentationProvider, shows the skippability badge, a per-parameter table with the stability classification per parameter, and the suggested fix when the analyzer can name one (e.g. "wrap List<Item> in ImmutableList"). Use this for triage before opening the full compiler reports.
StabilityInlayHintsProvider renders a colored badge next to each parameter type in the function signature. On a screen with many composables this can become noisy. In Settings → Tools → Compose Stability Analyzer enable showOnlyUnstableHints so badges disappear for stable parameters and only the actionable ones remain. For an even quieter file, enable showGutterIconsOnlyForUnskippable so the gutter only shows red/yellow.
UnstableComposable inspectionStabilityInspection (short name UnstableComposable, group Compose, severity weak warning) flags non-skippable composables with at least one unstable parameter. It runs on the fly and on Code → Inspect Code…. The inspection surfaces in two ways:
Compose / Unstable Composable.It is intentionally a weak warning: skippability is a diagnostic, not a build-blocking error. It will not turn the file red, will not block a commit, and will not fail CI on its own. Treat it as a backlog signal.
The inspection ships two suppression intentions, surfaced via Alt+Enter on the underlined composable:
@Suppress("NonSkippableComposable") — applied by AddSuppressAnnotationFix / AddSuppressIntentionAction. Silences the inspection on a function the developer has actively decided is acceptable (e.g. a debug overlay never on a hot path).@Suppress("ParamsComparedByRef") — same fix path, narrower scope: silences the warning when the parameter is intentionally compared by reference.Apply suppressions on the specific function only. DO NOT push them to file scope.
@TraceRecompositionAddTraceRecompositionIntention is available via Alt+Enter on any @Composable. It inserts the @TraceRecomposition annotation, which is the runtime instrumentation entry point used by the live heatmap and by ../../measurement/tracing-recompositions-at-runtime/SKILL.md. Use it on suspected hot composables once the gutter has identified them.
// WRONG
PriceTicker has a red gutter icon.
Build is green, the team ships, jank reports come in two days later.
// WRONG because: the inspection is a weak warning by design and does not block the build.
// The gutter is the only signal until the developer opens the compiler reports.
// Treat red gutters on hot-path composables as actionable; confirm with
// `../diagnosing-compose-stability/SKILL.md`, then fix via `../stabilizing-compose-types/SKILL.md`.
// RIGHT
PriceTicker has a red gutter icon.
Hover -> "price: Price unstable (var price)".
Open the compiler reports for confirmation.
Stabilize `Price` (val + immutable fields) per `../stabilizing-compose-types/SKILL.md`.
Gutter turns green; confirm with the live heatmap per `../visualizing-recomposition-cascades/SKILL.md`.
// WRONG
@file:Suppress("UnstableComposable")
package com.example.feature.cart
// WRONG because: file-level suppression hides every future regression in that file.
// New unstable composables added to the file will never surface in the inspection.
// RIGHT — narrow, justified suppression on a single function
@Suppress("NonSkippableComposable")
@Composable
fun DebugOverlay(state: MutableState<DebugInfo>) {
// dev-only overlay; never on hot path; intentional MutableState parameter.
}
// WRONG
"All composables in :feature-search must show green gutters before merge."
// WRONG because: skippability is a diagnostic, not a KPI. Some composables legitimately
// take unstable parameters (interop with Java POJOs, third-party data classes the team
// does not own). The goal is "no regression in hot-path composables", not "all green".
// Use `../enforcing-stability-in-ci/SKILL.md` to gate against regressions, not absolutes.
// RIGHT
Hot-path composables (list rows, scroll items, animation tickers) are green or yellow.
Cold-path composables (settings screens, debug tools) may be red and that is acceptable.
// WRONG
Settings -> Editor -> Inspections -> Compose -> Unstable Composable -> off
// WRONG because: turning the inspection off globally silences real regressions
// across the whole codebase. The next unstable parameter slipping into a hot
// composable will not surface anywhere in the editor.
// RIGHT
Settings -> Tools -> Compose Stability Analyzer:
showGutterIconsOnlyForUnskippable = true
showOnlyUnstableHints = true
The inspection stays on; only the visual noise is reduced.
// RIGHT — in Settings -> Tools -> Compose Stability Analyzer
isStrongSkippingEnabled = true
stabilityConfigurationPath = "<repo-root>/stability_config.conf"
The compiler runs with strong skipping on by default in Kotlin 2.0.20+ and consults the same stability_config.conf (see ../stabilizing-compose-types/SKILL.md). Matching both settings means the gutter color the developer sees agrees with what the compiler emits in ../diagnosing-compose-stability/SKILL.md.
../diagnosing-compose-stability/SKILL.md, then fix via ../stabilizing-compose-types/SKILL.md.stabilityConfigurationPath at the same stability_config.conf the Compose compiler reads, so the editor and the compiler agree on classifications.@file:Suppress("UnstableComposable"). Suppress on the specific function with @Suppress("NonSkippableComposable") or @Suppress("ParamsComparedByRef"), and document why in a comment.showGutterIconsOnlyForUnskippable = true and showOnlyUnstableHints = true in Settings → Tools → Compose Stability Analyzer first.isStrongSkippingEnabled = true so the analyzer's classification matches the compiler's actual runtime behavior on Kotlin 2.0.20+.@TraceRecomposition via the Add @TraceRecomposition intention on suspected hot composables, then follow ../../measurement/tracing-recompositions-at-runtime/SKILL.md to wire the runtime side.isStabilityCheckEnabled is on.@Composable declarations shows a colored gutter icon beside every one of them.StabilityDocumentationProvider.showOnlyUnstableHints hides hints for stable parameters.UnstableComposable inspection (group Compose, weak warning) flags at least one known-unstable composable when one exists in the open file.@Suppress("NonSkippableComposable") and @Suppress("ParamsComparedByRef") quick fixes.@Composable offers the Add @TraceRecomposition intention.stabilityConfigurationPath points at the same stability_config.conf used by the Compose Compiler in the project's Gradle config.compose-stability-analyzer-idea module within that repo — https://github.com/skydoves/compose-stability-analyzer/tree/main/compose-stability-analyzer-ideaFor CI-side gating that turns red gutters into a build failure, see ../enforcing-stability-in-ci/SKILL.md. For the build-time Compose Compiler reports the gutter colors agree with, see ../diagnosing-compose-stability/SKILL.md. For the upstream type fixes that turn red gutters green, see ../stabilizing-compose-types/SKILL.md. For the active investigation tools (cascade visualizer, live heatmap) inside the same plugin, see ../visualizing-recomposition-cascades/SKILL.md. For the runtime instrumentation that the Add @TraceRecomposition intention sets up, see ../../measurement/tracing-recompositions-at-runtime/SKILL.md.
Take skydoves/using-stability-analyzer-ide-plugin from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.