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.
npx agentmods add skills/skydoves/compose-performance-skills/migrating-to-modifier-nodenpx skills add skydoves/compose-performance-skills --skill migrating-to-modifier-nodegit clone --depth 1 https://github.com/skydoves/compose-performance-skillsWrote 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.
[](https://agentmods.dev/skills/skydoves/compose-performance-skills/migrating-to-modifier-node)<a href="https://agentmods.dev/skills/skydoves/compose-performance-skills/migrating-to-modifier-node"><img src="https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/migrating-to-modifier-node.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00183 | $0.04554 |
| Opus 5 | $0.00092 | $0.02277 |
| Sonnet 5 | $0.00037 | $0.00911 |
| Haiku 4.5 | $0.00018 | $0.00455 |
Grade A, and why
migrating-to-modifier-node 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 318 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migrating to Modifier.Node — Persistent Nodes Over composed { }
Modifier.composed { } allocates a fresh composable scope per modifier per composition: it cannot be skipped, cannot be hoisted, and forces the parent to run on every recomposition. Modifier.Node is a persistent node diffed by ModifierNodeElement.equals() — created once on first apply, updated in place on subsequent applies. There is no per-recomposition allocation, no fresh composable scope, and no parent invalidation chain, which is why Android Developers describes the system as "designed from the ground up to be far more performant" than the legacy composed { } factory (see developer.android.com/develop/ui/compose/custom-modifiers). This skill teaches Claude how to author new modifiers as Modifier.Node and migrate legacy composed { } factories.
When to use this skill
- A custom modifier currently uses
Modifier.composed { }(search the module forModifier.composed). - Authoring a new custom modifier from scratch — never start with
composed { }. - A code review surfaces a
composed { }factory. - The custom modifier needs a
CoroutineScope(animation loop, debouncer), reads aCompositionLocal, participates in layout / drawing / pointer input, or tracks layout coordinates. - A
@TraceRecompositionlog shows the parent composable recomposing on every frame because acomposed { }modifier is in the chain.
When NOT to use this skill
- The "modifier" is actually a one-line composable wrapper that can stay a
@Composablefunction — leave it alone. - The built-in modifier composition (
Modifier.padding(...).clickable(...)) is sufficient, no custom node behavior needed. - The fix the developer needs is reordering an existing chain, not authoring a new node — see
../ordering-modifier-chains/SKILL.md. - The custom modifier reads a hot animation value via
Modifier.composed { }only to feed a value-form modifier underneath — the underlying issue is a wrong-phase state read; see../../recomposition/deferring-state-reads/SKILL.md.
What ships with it
1 file 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.
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.
- 5d ago First seen · 318 lines · 183 tokens per session scan A 203b5a6c5fab
migrating-to-modifier-node is a skill published in the GitHub repository skydoves/compose-performance-skills (496 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 183 tokens to every session and 4,554 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.
Other skills, from other repositories
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…
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.
compose-focus-navigation
Use when writing or reviewing Jetpack Compose UI for TV, keyboard, desktop, accessibility focus, D-pad navigation, FocusRequester, focusProperties, key events, or initial focus behavior.
implementing-android-code
This skill should be used when implementing Android code in Bitwarden. Covers critical patterns, gotchas, and anti-patterns unique to this codebase. Triggered by "How do I implement a ViewModel?", "Create a new screen", "Add navigation", "Write a repository", "BaseViewModel pattern", "State-Action-Event", "type-safe…
kotlin-android
Use when building or fixing a native Android app in Kotlin and Jetpack Compose on the UDF layered architecture — ViewModel/StateFlow, Hilt, Room, Retrofit, coroutines, type-safe Navigation, and the Gradle/AGP surface. NOT shared Android and iOS UI from one Kotlin codebase (that is compose-multiplatform).
compose-side-effects
Use when writing or reviewing Jetpack Compose code with LaunchedEffect, DisposableEffect, SideEffect, rememberCoroutineScope, rememberUpdatedState, snapshotFlow, snackbar, navigation, focus requests, analytics, or event Flow collection.