configuring-lazy-prefetch

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

Guidance for tuning how Jetpack Compose prepares items just outside a scrolling list or grid. Jetpack Compose is Android's toolkit for building user interfaces, and prefetch means preparing upcoming content before it appears.

In plain words
What is it for?
Use it when lazy lists, grids, pagers, images, videos, or nested scrolling layouts scroll poorly, and validate changes with Android macrobenchmarks.
Why use it?
It helps investigate dropped frames during fast scrolling and choose how much content to prepare without adding unnecessary work.

Skill for Claude CodeCodex

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

Good fit Use it when lazy lists, grids, pagers, images, videos, or nested scrolling layouts scroll poorly, and validate changes with Android macrobenchmarks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skydoves/compose-performance-skills/configuring-lazy-prefetch
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 configuring-lazy-prefetch
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 configuring-lazy-prefetch

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/configuring-lazy-prefetch.svg)](https://agentmods.dev/skills/skydoves/compose-performance-skills/configuring-lazy-prefetch)
Your own site
<a href="https://agentmods.dev/skills/skydoves/compose-performance-skills/configuring-lazy-prefetch"><img src="https://agentmods.dev/badge/skills/skydoves/compose-performance-skills/configuring-lazy-prefetch.svg" alt="Measured on agentmods" height="20"></a>
Per session 177 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,559 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.00177 $0.03559
Opus 5 $0.00088 $0.01780
Sonnet 5 $0.00035 $0.00712
Haiku 4.5 $0.00018 $0.00356

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

Security

Grade A, and why

configuring-lazy-prefetch 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.

lists/configuring-lazy-prefetch/SKILL.md · 220 lines

How it starts

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

Configuring Lazy Prefetch — Cache Window and Pausable Composition

Lazy layouts pre-compose items just outside the viewport so they're ready when the user scrolls. Compose Foundation 1.9 added LazyLayoutCacheWindow for configurable ahead/behind extents. Compose Foundation 1.10 made prefetch composition pausable by default — work spreads across multiple frames instead of one. Most apps still rely on legacy single-frame prefetch and unknowingly pay for it during heavy scrolling. This skill teaches Claude when (and only when) to widen the window or implement nested prefetch, and how to validate the change with Macrobenchmark.

When to use this skill

  • Macrobenchmark FrameTimingMetric shows dropped frames at high scroll velocity even though item composables are skippable.
  • Items are content-heavy: large images, decoded videos, nested grids, or expensive measurement work.
  • The developer wants composition retained for items the user scrolled past briefly (e.g. flick-back gesture).
  • An outer lazy layout contains items with their own inner lazy layouts (e.g. LazyColumn rows that each host a HorizontalPager or inner LazyRow).
  • The developer mentions LazyLayoutCacheWindow, NestedPrefetchScope, "prefetch window", "ahead extent", or "pausable composition for prefetch".

When NOT to use this skill

  • Items are cheap and short; default behavior is sufficient — do not pre-emptively configure a window.
  • Item composables are non-skippable / unstable; widening the window only spreads the same waste over more frames. First fix ../optimizing-lazy-layouts/SKILL.md and the underlying stability via ../../stability/diagnosing-compose-stability/SKILL.md.
  • The bottleneck is per-item layout or draw rather than composition. Use Android Studio Profiler / Layout Inspector to confirm; if measure or draw dominates, prefetch tuning will not help — adjust item content instead.
  • Wrong-phase state reads inside items (animation reads state.value in Composition) — use ../../recomposition/deferring-state-reads/SKILL.md.

Read the full file on GitHub · 220 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 · 220 lines · 177 tokens per session scan A ab55da2363f4

Subscribe to this mod's changes

configuring-lazy-prefetch is a skill published in the GitHub repository skydoves/compose-performance-skills (499 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 177 tokens to every session and 3,559 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.

Related

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…

Drjacky/claude-android-ninja · 123 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

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.

chrisbanes/skills · 41 tokens

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).

ericrisco/rsc-harness · 78 tokens

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.

ashtanko/compose-android-template · 49 tokens

kotlin-multiplatform-expect-actual

Use when designing Kotlin Multiplatform expect/actual or interface boundaries for platform services, native SDKs, source sets, Compose Multiplatform UI, permissions, files, settings, sensors, or platform interop.

ashtanko/compose-android-template · 54 tokens