amethyst: Skill for Claude Code

.claude/skills/compose-stability-diagnostics/SKILL.md

compose-stability-diagnostics is a skill for Claude Code from vitorpamplona/amethyst. It costs 60 tokens per session (1,353 once invoked), scanned A, original, MIT.

A guide to diagnosing how Jetpack Compose decides whether a user-interface function can be skipped during updates, based on how its inputs compare between redraws.

In plain words
What is it for?
Use it to review Compose parameters, compiler reports, UI-state classes, collection inputs, skippability, and performance issues involving repeated recomposition.
Why use it?
It helps locate unnecessary redraws caused by changing object instances, collections, or unstable state, while accounting for Kotlin's strong-skipping behavior.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is vitorpamplona/amethyst's own configuration. It tells Claude Code how to work on amethyst itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything amethyst configures →

About the project

Amethyst is an Android client for Nostr, a social network protocol that lets people control their own social activity and connections. People use it to read and publish Nostr content, follow accounts, and exchange encrypted direct messages from Android and other supported platforms. The catalogue add-ons support workflows for developing or operating the client.

vitorpamplona/amethyst · 1,595 stars · on GitHub · amethyst.social

Reuse

Borrowing it

Nothing to install: this file belongs to vitorpamplona/amethyst. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/vitorpamplona/amethyst/main/.claude/skills/compose-stability-diagnostics/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/vitorpamplona/amethyst

Made for: Claude Code.

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 compose-stability-diagnostics

README.md
[![agentmods](https://agentmods.dev/badge/skills/vitorpamplona/amethyst/compose-stability-diagnostics.svg)](https://agentmods.dev/skills/vitorpamplona/amethyst/compose-stability-diagnostics)
Your own site
<a href="https://agentmods.dev/skills/vitorpamplona/amethyst/compose-stability-diagnostics"><img src="https://agentmods.dev/badge/skills/vitorpamplona/amethyst/compose-stability-diagnostics.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,353 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.00060 $0.01353
Opus 5 $0.00030 $0.00677
Sonnet 5 $0.00012 $0.00271
Haiku 4.5 $0.00006 $0.00135

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

Security

Grade A, and why

compose-stability-diagnostics 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/skills/compose-stability-diagnostics/SKILL.md · 141 lines

How it starts

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

Compose stability diagnostics

Core principle

Compose performance problems from parameters are about whether inputs compare cheaply and predictably across recompositions. With Kotlin 2.0.20+ strong skipping is enabled by default, so unstable parameters no longer automatically make restartable composables non-skippable. That does not make stability irrelevant: unstable parameters are compared by instance identity (===), stable parameters by equality (equals), and churny instances can still defeat skipping.

First identify the compiler mode you are on, then read reports in that context.

When to use this skill

  • A composable or screen recomposes more than expected and parameter churn is suspected.
  • A UI-state/model class is passed to composables and contains List, Set, Map, ranges, Java time/money types, or third-party types.
  • composables.txt / classes.txt shows unstable parameters or non-skippable composables.
  • A project uses Kotlin < 2.0.20, disables strong skipping, or has old Compose compiler report guidance.

1. Start with strong skipping

On Kotlin 2.0.20+, strong skipping is enabled by default. In that mode:

  • Restartable composables are skippable even when parameters are unstable, unless explicitly opted out.
  • Stable parameters compare with equals.
  • Unstable parameters compare with instance equality (===).
  • Lambdas inside composables are automatically remembered based on captures.

That means the question changes from "is this composable skippable at all?" to "will these parameters compare the way I expect, and are callers creating new unstable instances every frame?"

For older compiler setups or strong skipping disabled, the legacy rule still matters: a restartable composable with unstable parameters may be restartable but not skippable.

2. Generate compiler reports

With Kotlin 2.0+ the Compose Compiler is configured through the Kotlin Gradle plugin:

plugins {
    alias(libs.plugins.android.application) // or android.library / jvm
    alias(libs.plugins.kotlin.android)      // or kotlin.multiplatform / kotlin.jvm
    alias(libs.plugins.compose.compiler)
}

if (providers.gradleProperty("composeReports").orNull == "true") {
    composeCompiler {
        reportsDestination = layout.buildDirectory.dir("compose_compiler")
        metricsDestination = layout.buildDirectory.dir("compose_compiler")
    }
}

Read the full file on GitHub · 141 lines

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 · 141 lines · 60 tokens per session scan A 30fa7ea06685

Subscribe to this mod's changes

compose-stability-diagnostics is a skill published in the GitHub repository vitorpamplona/amethyst (1,595 stars, last pushed today), licensed MIT. It adds 60 tokens to every session and 1,353 once invoked, about $0.0003 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

argent-metro-debugger

Debug a JS runtime via CDP using argent debugger tools. Primary path is React Native via Metro (iOS / Android / Vega); a subset of the tools (debugger-connect, debugger-status, debugger-evaluate, debugger-log-registry) also drive a Chromium (CDP) app's renderer (an Electron app, or any Chromium browser exposing CDP)…

software-mansion/argent · 104 tokens

argent-react-native-optimization

Optimizes a React Native app by profiling first to find real bottlenecks, then sweeping for mechanical issues. Entry-point for all performance work. Use when the app feels slow, user asks to optimize, fix re-renders, reduce jank, or improve startup. Delegates to argent-react-native-profiler for measurement.

software-mansion/argent · 71 tokens

sceneview

Build 3D and AR apps with the SceneView SDK in Jetpack Compose, SwiftUI (iOS/macOS/visionOS via SceneViewSwift), Web (Filament.js), Flutter and React Native. Use whenever the user asks for "3D in Compose", "AR with ARCore in Compose", a model viewer, or any cross-platform 3D/AR app where the dependency is…

sceneview/sceneview · 156 tokens

argent-native-profiler

Native profiling for CPU hotspots, UI hangs, memory issues. iOS via xctrace; Android via Perfetto. Use when diagnosing native-level performance issues.

software-mansion/argent · 37 tokens

compose-animations

Use when writing or reviewing Jetpack Compose motion: visibility enter/exit, animating one property toward a target, color or size transitions, multiple properties from one state, switching composable content, or choosing between AnimatedVisibility, animateAsState, rememberTransition, AnimatedContent, and Crossfade.

chrisbanes/skills · 64 tokens