optimizing-lazy-layouts

optimizing-lazy-layouts is a skill for Claude Code, Codex from skydoves/compose-performance-skills. It costs 147 tokens per session (3,478 once invoked), scanned A, original, Apache-2.0.

A guide for improving Jetpack Compose lists and grids that display only the items currently needed, such as LazyColumn and LazyVerticalGrid.

In plain words
What is it for?
Use it to add stable item keys, describe different item types, support animateItem(), move repeated work out of item builders, and check whether list items can skip unnecessary updates.
Why use it?
It helps address scrolling stutter, lost item state, and missing insert or removal animations caused by items being reused or created incorrectly.

Skill for Claude CodeCodex

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

Good fit Use it to add stable item keys, describe different item types, support animateItem(), move repeated work out of item builders, and check whether list items can skip unnecessary updates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skydoves/compose-performance-skills/optimizing-lazy-layouts
Install

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.

Any agent
npx skills add skydoves/compose-performance-skills --skill optimizing-lazy-layouts
Clone the repo
git clone --depth 1 https://github.com/skydoves/compose-performance-skills

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 optimizing-lazy-layouts

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/optimizing-lazy-layouts/github.svg)](https://agentmods.dev/skills/skydoves/compose-performance-skills/optimizing-lazy-layouts)
Your own site
<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/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 optimizing-lazy-layouts

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,478 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.00147 $0.03478
Opus 5.5 $0.00059 $0.01391
Sonnet 5.5 $0.00029 $0.00696
Haiku 4.5 $0.00015 $0.00348

Measured 3mo ago against content hash b905f03a2961, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo 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.

lists/optimizing-lazy-layouts/SKILL.md · 273 lines

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, or LazyHorizontalGrid.
  • 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 @TraceRecomposition shows 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 domain var) → first run ../../stability/diagnosing-compose-stability/SKILL.md and then ../../stability/stabilizing-compose-types/SKILL.md.
  • An animation inside an item reads state.value in 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 experimental animateItemPlacement).
  • Kotlin 2.0.0+ with org.jetbrains.kotlin.plugin.compose applied. 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.md when ready to measure.

Read the full file on GitHub · 273 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. 3mo ago First seen · 273 lines · 147 tokens per session scan A b905f03a2961

Subscribe to this mod's changes

optimizing-lazy-layouts is a skill published in the GitHub repository skydoves/compose-performance-skills (536 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 147 tokens to every session and 3,478 once invoked, about $0.0006 per session on Opus 5.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

optimizing-lazy-layouts compared with skills from other repositories

optimizing-lazy-layouts next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
optimizing-lazy-layoutsskydoves/compose-performance-skillsSkill5365mo agoApache-2.0A147Claude Code, Codex
claude-android-ninjaDrjacky/claude-android-ninjaSkill1432mo agoApache-2.0A123Claude Code, Codex
rebrandmykola-kichatov/android-clean-templateSkill541mo agononeC89Claude Code
sceneviewsceneview/sceneviewSkill1.4ktodayApache-2.0A71Claude Code, Codex
sceneview-iossceneview/sceneviewSkill1.4ktodayApache-2.0A71Claude Code, Codex
compose-animationschrisbanes/skillsSkill1.2k2d agoApache-2.0A67Claude Code
compose-focus-navigationchrisbanes/skillsSkill1.2k2d agoApache-2.0A41Claude Code