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 skills add skydoves/compose-performance-skills --skill optimizing-lazy-layoutsgit 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/optimizing-lazy-layouts)<a href="https://agentmods.dev/skills/skydoves/compose-performance-skills/optimizing-lazy-layouts"><img src="https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/optimizing-lazy-layouts.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.1 | $0.00147 | $0.03478 |
| Opus 5 | $0.00073 | $0.01739 |
| Sonnet 5 | $0.00029 | $0.00696 |
| Haiku 4.5 | $0.00015 | $0.00348 |
Grade A, and why
optimizing-lazy-layouts 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.
How it starts
The opening of the file, as written. The whole thing — 273 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optimizing Lazy Layouts — Keys, contentType, and animateItem()
Lazy layouts compose only what's visible, but two things still cost: re-composition of items that should have been reused (missing key), and per-item allocation that compounds with scroll velocity (missing contentType, modifier chains created inside items { }). Both have a one-line fix. This skill teaches Claude how to apply that fix correctly and to validate that item composables are themselves skippable. Prefetch tuning is a separate concern — see ../configuring-lazy-prefetch/SKILL.md.
When to use this skill
- The developer reports scroll jank, dropped frames, or stutter on a
LazyColumn,LazyRow,LazyVerticalGrid, orLazyHorizontalGrid. - Items lose scroll position, focus, or composition state on insert, remove, or reorder.
- A mixed-type feed (cards + headers + ads + carousels) feels sluggish even though each individual row is lightweight.
Modifier.animateItem()was added but no animation runs on inserts or removals.- The compiler report shows item composables as
unstable/non-skippable, or@TraceRecompositionshows item composables recomposing on every scroll tick.
When NOT to use this skill
- The bottleneck is the prefetch window (heavy items, high-velocity scroll, want a wider ahead/behind window) → use
../configuring-lazy-prefetch/SKILL.md. - The item composable itself takes an unstable parameter (
List<Foo>,Flow<Foo>, a domainvar) → first run../../stability/diagnosing-compose-stability/SKILL.mdand then../../stability/stabilizing-compose-types/SKILL.md. - An animation inside an item reads
state.valuein Composition phase, recomposing the row every frame → use../../recomposition/deferring-state-reads/SKILL.md. - Scroll position derivation (e.g.
firstVisibleItemIndex == 0) is the hot path → use../../recomposition/choosing-derivedstateof/SKILL.md.
Prerequisites
- Compose Foundation 1.7+ for
Modifier.animateItem()(the GA replacement for the experimentalanimateItemPlacement). - Kotlin 2.0.0+ with
org.jetbrains.kotlin.plugin.composeapplied. Strong Skipping is on by default; non-skippable item composables become amplified at scroll speed. - A real device + release build for measurement. Skydoves hot take #5: debug builds lie (Live Literals, interpreted mode). See
../../measurement/generating-baseline-profiles/SKILL.mdwhen ready to measure.
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.
- 8d ago First seen · 273 lines · 147 tokens per session scan A b905f03a2961
optimizing-lazy-layouts is a skill published in the GitHub repository skydoves/compose-performance-skills (499 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 147 tokens to every session and 3,478 once invoked, about $0.0007 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-slot-api-pattern
Use when designing or reviewing a reusable Jetpack Compose component whose visual regions vary by caller, or when primitive content parameters and boolean shape flags are accumulating.
compose-state-deferred-reads
Use when Jetpack Compose code reads scroll, animation, gesture, or other frame-rate State in composition, passes changing values across composable boundaries, uses value-form layout/draw modifiers, or back-writes observable state from a later phase into one that's already run.
compose-state-hoisting
Use when deciding where Jetpack Compose UI element state or UI logic should live: local remember state, hoisted composable parameters, a plain state holder class, or a screen-level ViewModel/component.
collapsing-parallax-toolbar
Build a collapsing header from five siblings in one box — four sharing a single scroll state, one driven by a boolean instead — with artwork moved by a graphics layer at half the scroll rate, a title interpolated along a two-segment curve into the pinned bar, and a derived flip point that swaps the floating back…
empty-state-must-keep-its-navigation
Replace a populated header with an empty-state message without deleting the controls that header owned — re-supply them only in the branch that owned them, order the loading branch above the empty one, and stop reserving the artwork's height for a line of text. Use when a user reaches an empty period, filter or search…