Agent skill · Audited from source
Configuring Lazy Prefetch
skill · skydoves/compose-performance-skillsApache-2.0 licenceAudited 16 Oct 2026 · source 87cfb886f00d
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 87cfb886f00d and found no filesystem, network or shell access and no hard-coded secrets. What it does: Use this skill to tune Jetpack Compose lazy-layout prefetch with LazyLayoutCacheWindow (Compose Foundation 1.9+, @ExperimentalFoundationApi) and pausable composition in prefetch (Compose Foundation 1.10+, default on).…
Cite
Cite this page
ModelsAtlas. “Configuring Lazy Prefetch (skydoves/compose-performance-skills)”. Retrieved 16 Oct 2026. https://modelsatlas.com/skills/skydoves/configuring-lazy-prefetch
Trust audit
Audit 0.4.1 · source read 16 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 16,667 of 17,602 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 87cfb886f00d · 16 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publisherskydoves GitHub userOwner of the repository this skill is read from
- Source folderskydoves/compose-performance-skills/lists/configuring-lazy-prefetchThe exact folder we audited
- LicenceApache-2.0As the repository states it
- Commit pinned for this verdict87cfb886f00dA new audit runs when the source changes
- Repository statusNot archivedLast push 121 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Use this skill to tune Jetpack Compose lazy-layout prefetch with LazyLayoutCacheWindow (Compose Foundation 1.9+, @ExperimentalFoundationApi) and pausable composition in prefetch (Compose Foundation 1.10+, default on).…
---
name: configuring-lazy-prefetch
description: Use this skill to tune Jetpack Compose lazy-layout prefetch with LazyLayoutCacheWindow (Compose Foundation 1.9+, @ExperimentalFoundationApi) and pausable composition in prefetch (Compose Foundation 1.10+, default on). Covers configurable Dp-based ahead/behind cache windows plumbed through rememberLazyListState(cacheWindow = ...), NestedPrefetchScope for items containing inner lazy layouts (HorizontalPager inside a LazyColumn row), version requirements, and the trade-off between memory pressure and idle-frame work. Use when the developer mentions dropped frames at high scroll velocity, prefetch window, ahead/behind extents, LazyLayoutCacheWindow, NestedPrefetchScope, pausable composition for prefetch, or wants composition retained for items briefly scrolled past. Item-level fixes (keys, contentType) live in a sibling skill.
license: Apache-2.0. See LICENSE for complete terms.
metadata:
author: Jaewoong Eum (skydoves)
keywords:
- jetpack-compose
- performance
- lazy-prefetch
- lazy-layout-cache-window
- pausable-composition
- nested-prefetch
- frame-timing
- macrobenchmark
---
# 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`.
## Prerequisites
- Compose Foundation **1.9+** for the `LazyLayoutCacheWindow` API. The cache window is a `@ExperimentalFoundationApi` factory `LazyLayoutCacheWindow(ahead: Dp, behind: Dp)` plumbed through `rememberLazyListState(cacheWindow = ...)` (or the equivalent grid/staggered-grid state). It is **NOT** a parameter on `LazyColumn` / `LazyRow` / `LazyVerticalGrid` / `LazyHorizontalGrid` directly. Every call site requires `@OptIn(ExperimentalFoundationApi::class)`.
- Compose Foundation **1.10+** for pausable composition in prefetch by default. On 1.10+ the prefetch composer can pause and resume across frames, so a single heavy item no longer blows a frame budget.
- Item-level hygiene already in place: `key`, `contentType`, stable item composables. Run `../optimizing-lazy-layouts/SKILL.md` first and confirm before tuning the window.
- Macrobenchmark module set up for `FrameTimingMetric`. See `../../measurement/generating-baseline-profiles/SKILL.md` for the Macrobenchmark scaffold.
## Workflow
- [ ] **1. Confirm Compose Foundation version.** In `gradle/libs.versions.toml` or the relevant `build.gradle.kts`, verify `androidx.compose.foundation:foundation` is at **1.9.0+** (cache window) or **1.10.0+** (pausable prefetch on by default). If on 1.10+ and not measuring jank yet, **MUST** stop here — the default is good enough for most apps.
- [ ] **2. Re-validate item-level fixes are in place.** Open `../optimizing-lazy-layouts/SKILL.md`. Every `items(...)` call has stable `key`, mixed feeds have `contentType`, item composables are skippable. Without this baseline, prefetch tuning is treating the symptom.
- [ ] **3. Measure the baseline with Macrobenchmark `FrameTimingMetric` before changing anything.** Skydoves hot take #5: debug builds lie. Always measure release + R8 + real device. Capture `frameDurationCpuMs` p50/p95/p99 over a fixed scroll journey so the after-comparison is meaningful. See `../../measurement/generating-baseline-profiles/SKILL.md`.
- [ ] **4. Construct a `LazyLayoutCacheWindow` only after measurement justifies it.** Build the window with the top-level factory `LazyLayoutCacheWindow(ahead: Dp, behind: Dp)` and plumb it through `rememberLazyListState(cacheWindow = window)`, then pass that state to `LazyColumn(state = state) { ... }`. The cache window is **not** a parameter on `LazyColumn` itself. Every call site needs `@OptIn(ExperimentalFoundationApi::class)`.
```kotlin
// RIGHT — measured tall, image-heavy items benefit from a deeper ahead extent
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun HeavyFeed(items: ImmutableList<HeavyItem>) {
val state = rememberLazyListState(
cacheWindow = LazyLayoutCacheWindow(ahead = 200.dp, behind = 100.dp)
)
LazyColumn(state = state) {
iteExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 87cfb88
git clone https://github.com/skydoves/compose-performance-skills git -C compose-performance-skills checkout 87cfb886f00d
The author documents no install command, so this uses the repository directly. Our verdict covers commit 87cfb886f00d only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
87cfb886f00d
Similar skills
All coding & review skills →skydoves/compose-performance-skills
Use this skill to run an end-to-end Jetpack Compose performance audit when the symptom is broad ("the app feels sluggish", "scroll is rough everywhere", "we're starting a perf sprint", "what should we fix first?").…
skydoves/compose-performance-skills
Use this skill when a Compose tree uses SubcomposeLayout, BoxWithConstraints, or Scaffold and the developer reports extra measure passes, slow first frame, or layout passes running content composition repeatedly. Covers…
skydoves/compose-performance-skills
Use this skill to decide when Jetpack Compose derivedStateOf is the right tool and when it is pure overhead. Covers the "input frequency must exceed output frequency" rule, the mandatory remember { derivedStateOf { } }…
skydoves/compose-performance-skills
Use this skill to migrate Compose UI from `collectAsState()` to `collectAsStateWithLifecycle()`, hoist `Flow<T>` parameters out of composables, and apply `.conflate()` / `.distinctUntilChanged()` / `snapshotFlow` so…
skydoves/compose-performance-skills
Use this skill to configure R8 correctly for a Jetpack Compose application — full mode by default, `proguard-android-optimize.txt`, resource shrinking on, and minimal keep rules because Compose ships consumer ProGuard…
skydoves/compose-performance-skills
Use this skill to find which Jetpack Compose composables are recomposing and why, using Android Studio Layout Inspector recomposition counts and skip counts, the per-parameter Argument Change Reasons (Changed /…
Questions about Configuring Lazy Prefetch
What does the Configuring Lazy Prefetch skill do?
Is Configuring Lazy Prefetch safe to install?
What can Configuring Lazy Prefetch access on my machine?
How current is this page?
Sources
- github.com/skydoves/compose-performance-skills/tree/main/lists/c — the audited source at commit 87cfb886f00d and every finding aboveObserved · 16 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Configuring Lazy Prefetch skill do?
- Is Configuring Lazy Prefetch safe to install?
- What can Configuring Lazy Prefetch access on my machine?