tracing-recompositions-at-runtime

tracing-recompositions-at-runtime is a skill for Claude Code, Codex from skydoves/compose-performance-skills. It costs 215 tokens per session (4,241 once invoked), scanned A, original, Apache-2.0.

A guide to tracing Jetpack Compose recompositions, which are repeated runs of screen-building code, at runtime. It uses an annotation to print which state or parameter changed and what it changed from and to in Android’s logcat.

In plain words
What is it for?
Use it to inspect a suspicious Compose screen, compare behavior in optimized builds, or investigate slow interactions. It also connects the runtime data to the Compose Stability Analyzer editor heatmap.
Why use it?
It helps identify unexpected updates in real device or release-like builds when Android Studio’s Layout Inspector is limited to debug builds. The logs can confirm the actual cause of repeated work.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - ./gradlew :app:stabilityCheck runs in CI per ../../stability/enforcing-stability-in-ci/SKILL.md..

Good fit Use it to inspect a suspicious Compose screen, compare behavior in optimized builds, or investigate slow interactions. It also connects the runtime data to the Compose Stability Analyzer editor heatmap.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/skydoves/compose-performance-skills
agentmods
npx agentmods add skills/skydoves/compose-performance-skills/tracing-recompositions-at-runtime

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 tracing-recompositions-at-runtime

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/tracing-recompositions-at-runtime/github.svg)](https://agentmods.dev/skills/skydoves/compose-performance-skills/tracing-recompositions-at-runtime)
Your own site
<a href="https://agentmods.dev/skills/skydoves/compose-performance-skills/tracing-recompositions-at-runtime"><img src="https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/tracing-recompositions-at-runtime/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tracing-recompositions-at-runtime

Your own site · 80×15
<a href="https://agentmods.dev/skills/skydoves/compose-performance-skills/tracing-recompositions-at-runtime"><img src="https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/tracing-recompositions-at-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 215 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,241 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.00215 $0.04241
Opus 5 $0.00108 $0.02121
Sonnet 5 $0.00043 $0.00848
Haiku 4.5 $0.00021 $0.00424

Measured 10d ago against content hash 1fe2d29e9a99, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

tracing-recompositions-at-runtime 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 10d 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.

measurement/tracing-recompositions-at-runtime/SKILL.md · 304 lines

How it starts

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

Tracing Recompositions at Runtime — @TraceRecomposition, logcat, and the live heatmap

Layout Inspector counts recompositions and surfaces Argument Change Reasons, but it works only in debug, where Live Literals and the interpreted Compose runtime inflate counts. @TraceRecomposition from skydoves/compose-stability-analyzer instruments a composable at compile time and emits per-recomposition diffs (which state changed, what value transition) to logcat under the Recomposition tag. The instrumentation works in any build the developer enables it for — including release-with-debug-symbols — and feeds the IntelliJ / Android Studio plugin's live recomposition heatmap.

This skill is the release-mode complement to ../../recomposition/debugging-recompositions/SKILL.md. Layout Inspector is debug-only, fast to set up, and good for the first triage. @TraceRecomposition is the ground-truth confirmation: instrument the suspect composable, ship a release+R8 build of the dev APK, run the user journey, and read the per-recomposition log lines.

When to use this skill

  • A composable recomposes more than expected and Layout Inspector counts are inconclusive (the count differs between debug and release, or the suspect is an inline composable not covered by Layout Inspector).
  • A stability or strong-skipping fix needs to be confirmed against a release-equivalent build before merging.
  • A developer wants per-state-and-per-parameter change diffs printed inline rather than clicking through the Layout Inspector tree.
  • A team wants to baseline a composable's recomposition count for an SLO ("PriceTicker recomposes ≤ once per price update; never per parent tick").
  • The user mentions @TraceRecomposition, "trace recomposition", "compose-stability-analyzer", "recomposition logcat", "recomposition heatmap", or "release-mode recomposition".

When NOT to use this skill

  • The developer just wants recomposition counts in debug — Layout Inspector is faster to set up. See ../../recomposition/debugging-recompositions/SKILL.md.
  • The build is a production release with no diagnosis intent — the instrumentation must be gated off. See the runtime-toggle pattern below.
  • The team needs a CI gate that fails on future stability regressions — runtime tracing is for diagnosis; gating is ../../stability/enforcing-stability-in-ci/SKILL.md (stabilityCheck).
  • The need is per-frame timing or end-to-end user-perceived perf, not recomposition counts — that is ../generating-baseline-profiles/SKILL.md with MacrobenchmarkRule + FrameTimingMetric.

Read the full file on GitHub · 304 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. 10d ago First seen · 304 lines · 215 tokens per session scan A 1fe2d29e9a99

Subscribe to this mod's changes

tracing-recompositions-at-runtime is a skill published in the GitHub repository skydoves/compose-performance-skills (500 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 215 tokens to every session and 4,241 once invoked, about $0.0011 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

filter-chain-two-owners-one-writer

Two independent features want entries in one engine property that holds the WHOLE chain, so writing it replaces everything — keep each feature's entries in its own field, compose them in a single writer, and let "clear" drop only its own tier. Use when a second effect is added beside an existing one, or when one of…

maxrave-dev/kotlin-footguns · 87 tokens