Proxy Setup
asmyshlyaev177/test-proxy-recorder
Set up test-proxy-recorder for any Playwright project. An agent skill from asmyshlyaev177/test-proxy-recorder.
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation).
$ npx skills add sanity-io/ui --skill next-cache-components-optimizer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sanity-io/ui next-cache-components-optimizer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sanity-io/ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/next-cache-components-optimizer .claude/skills/next-cache-components-optimizer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "next-cache-components-optimizer" agent skill from https://github.com/sanity-io/ui/tree/main/.agents/skills/next-cache-components-optimizer into .claude/skills/next-cache-components-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "next-cache-components-optimizer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sanity-io/ui/tree/main/.agents/skills/next-cache-components-optimizerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sanity-io/ui --skill next-cache-components-optimizer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sanity-io/ui next-cache-components-optimizer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sanity-io/ui.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/next-cache-components-optimizer .agents/skills/next-cache-components-optimizer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "next-cache-components-optimizer" agent skill from https://github.com/sanity-io/ui/tree/main/.agents/skills/next-cache-components-optimizer into .agents/skills/next-cache-components-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "next-cache-components-optimizer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sanity-io/ui --skill next-cache-components-optimizer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sanity-io/ui next-cache-components-optimizer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sanity-io/ui.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/next-cache-components-optimizer .cursor/skills/next-cache-components-optimizer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "next-cache-components-optimizer" agent skill from https://github.com/sanity-io/ui/tree/main/.agents/skills/next-cache-components-optimizer into .cursor/skills/next-cache-components-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "next-cache-components-optimizer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sanity-io/ui.git --path .agents/skills/next-cache-components-optimizer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sanity-io/ui --skill next-cache-components-optimizer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sanity-io/ui next-cache-components-optimizer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sanity-io/ui.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/next-cache-components-optimizer .gemini/skills/next-cache-components-optimizer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "next-cache-components-optimizer" agent skill from https://github.com/sanity-io/ui/tree/main/.agents/skills/next-cache-components-optimizer into .gemini/skills/next-cache-components-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "next-cache-components-optimizer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sanity-io/ui next-cache-components-optimizerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sanity-io/ui --skill next-cache-components-optimizer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sanity-io/ui.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/next-cache-components-optimizer .github/skills/next-cache-components-optimizer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "next-cache-components-optimizer" agent skill from https://github.com/sanity-io/ui/tree/main/.agents/skills/next-cache-components-optimizer into .github/skills/next-cache-components-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "next-cache-components-optimizer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sanity-io/ui --skill next-cache-components-optimizer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sanity-io/ui next-cache-components-optimizer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sanity-io/ui.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/next-cache-components-optimizer .opencode/skills/next-cache-components-optimizer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "next-cache-components-optimizer" agent skill from https://github.com/sanity-io/ui/tree/main/.agents/skills/next-cache-components-optimizer into .opencode/skills/next-cache-components-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "next-cache-components-optimizer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
next-cache-components-optimizerDrive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation).
Next Cache Components Optimizer is an agent skill from sanity-io/ui, published by the product's own GitHub organization. Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then guards against regression. Use when asked to make a route's navigation instant (its static shell commits immediately), fix a route whose static shell isn't prerendered/served/prefetched, grow a…
Its SKILL.md is about 6.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files (for example `reference/patterns.md`, `reference/real-app-patterns.md` and `reference/red-test-robustness.md`).
It sits in Testing & QA, covering End-to-end testing and Browser testing. It works with Next.js and Playwright. The repository describes itself as: The Sanity UI design system. The licence is MIT.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 1c8fd85. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
rgnpmnpxFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
nextjs.orgAlso links to:
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Next Cache Components Optimizer loads about 6.3k tokens when it runs. Until then it costs about 196 tokens; SKILL.md has 3,257 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from sanity-io/ui at commit 1c8fd85, republished under its MIT licence (© sanity-io). 3,257 words, ~6,273 tokens.
.claude/skills/next-cache-components-optimizer/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Set up an agentic optimization loop that drives a Next.js route from "not
instant" to "instant" and keeps it there. The loop is test-driven: encode the
goal as a failing @next/playwright instant() test, work it to green, and
ship the test as the regression guard. Run it once per target route. Work the
phases P → G in order; each ends in a gate. Fix recipes live in two lazily-read
references — reference/patterns.md (before→after for each blocker type) and
reference/real-app-patterns.md (parallel routes, auth gates, the empty-shell
and responsive-skeleton failure modes). Read one only when its phase points
there.
One thing here is fixed. The rest is yours. Read this before treating any command, platform, or env var below as a requirement.
@next/playwright instant(). This skill uses
instant()
as a ruler, not a stopwatch (phase A). It comes from
@next/playwright (installed alongside @playwright/test, on the same
release line as next), so it isn't tied to any host. Keep it. Timing a
navigation by hand is too flaky to trust, and is the failure mode this skill
exists to prevent.next build && next start, a CI/staging container, and a per-push preview
deploy are equally valid rigs; the verdict comes from the build, never the
platform. Phase 0 maps the invariant onto your repo. Read every platform
name, env-var spelling, and command below as an example to translate, not a
requirement.A route reaches the user two ways, and both must be instant:
loading.tsx).<Link> default under Partial Prefetching —
re-rendering only the segments that change.The fix patterns are identical for both; the test differs only in how the
navigation is driven ("Driving the navigation in tests" below). The two shells
can differ; guard the one you ship, both when both matter
(reference/real-app-patterns.md).
Maximizing the static shell is the optimization objective: the most meaningful
prerendered content commits immediately, and only genuinely per-request data
streams in afterward. The shipped test deterministically encodes present ∧
instant; non-blank is the additional bar the workflow enforces by
judgment (D1/D2/E), because an instant() pass alone is satisfied by a blank
fallback={null} shell (the empty-shell failure mode,
reference/real-app-patterns.md).
instant() is a ruler, not a stopwatch: assert that the shell appears under
the lock; do not time it. A trustworthy verdict requires a production build
(phase A).
The GREEN under the lock is the deterministic verdict; each gate keeps it trustworthy.
This loop is meant to run unattended — ideally across many navigations in one pass — so it doesn't stop to ask after each route. If the user names one route, finish it and stop. If they ask to make the app or its navigations instant, work the whole route queue without pausing between routes. What matters is how you word and present the results, not how often you interrupt. The mechanics below — the rig, RED, GREEN, the gates — are your scaffolding; the user never needs to hear those words.
<Suspense> (always fresh, still instant) rather than
guess a cacheLife.- [ ] P PREREQS Next.js 16.3+ with cacheComponents: true; upgrade first → below
- [ ] 0 SETUP once per repo: discover + write instant-nav.rig.md → rig-template.md
- [ ] A RIG production build with the testing API exposed → below
- [ ] B BASELINE unlocked: the marker renders for the test user → test-template.md
- [ ] C RED locked instant(): the shell does not commit → test-template.md
- [ ] C-gate VERIFY-RED: stop until the RED is trustworthy → reference/red-test-robustness.md
- [ ] D FIX push each Suspense boundary down to the data it guards → reference/patterns.md
- [ ] D1 reuse the route's existing loading UI; do not hand-build skeletons
- [ ] D2 the shell matches the real render at every breakpoint → reference/real-app-patterns.md
- [ ] E PARITY the refactor changed only whether the route is instant
- [ ] F DIFFERENTIAL revert only the fix → RED; re-apply → GREEN → reference/red-test-robustness.md
- [ ] G REVIEW PR checklist (below)Phases B and C build the test; only the locked test from C ships.
The workflow depends on framework capabilities that ship with current Next.js:
cacheComponents: true in next.config.ts. Without
Cache Components there is no static shell to optimize.@next/playwright on the same release line as the project's next; it
provides instant(). Verify with npm ls next @next/playwright (or the
project's package manager) and align them if they differ. The matching
testing API is in the next runtime, gated by the
experimental.exposeTestingApiInProductionBuild config flag (phase A).If the project does not meet these, upgrade first (npx @next/codemod upgrade
automates most of it), then enable Cache Components in next.config.ts:
export default {cacheComponents: true}Enabling the flag surfaces the blocking routes to resolve first; the
next-cache-components-adoption
skill drives that adoption. Reach for this optimizer once the app builds under
Cache Components.
This gate is deliberate: the skill targets current Next.js, and none of the verdicts below are meaningful on older versions.
The principles in this skill are fixed; the infrastructure they run on is
yours. On first use in a repository, discover how the project builds, deploys,
authenticates, and tests (inspect the repository first, and ask the user only
what it cannot answer), then write the answers to a committed
instant-nav.rig.md. Every later run reads that file instead of
rediscovering. The six questions (BUILD / EXPOSE / RUN / TEST USER / DRIFT /
LOOP), the file template, and filled examples (local-only, generic CI +
container, preview deploy) are in rig-template.md.
If the repo has no Playwright e2e harness yet, standing up a minimal one
(@next/playwright, a config with baseURL, one authenticated path) is part
of this step; the loop does not assume a pre-existing suite.
Stand up the rig described by instant-nav.rig.md. Two invariants hold on
every platform:
Never measure on next dev. It does not prefetch, and its lock is
unreliable for blocking routes, so a dev instant() result is not a valid
RED or GREEN.
The measured build must expose the testing API. Otherwise instant()
silently no-ops and the test passes vacuously (see
reference/red-test-robustness.md). The lock-engagement proof is the phase-C
RED itself: the unfixed target route is the known-blocking route, and its
RED under the lock shows the lock engages on this build (C-gate); the
self-validating variant in test-template.md is the in-band guarantee. Wire
experimental.exposeTestingApiInProductionBuild to a condition that is
true for every build you measure and never true in production:
experimental: {
// Use the condition your platform provides, and record it in the rig file:
// local: an explicit opt-in, as below
// generic CI: process.env.DEPLOY_ENV === 'staging'
// Vercel: process.env.VERCEL_ENV === 'preview'
exposeTestingApiInProductionBuild:
process.env.EXPOSE_TESTING_API === '1',
}The rig is any production-like build that exposes the testing API: a local
next build && next start, a CI/staging container, and a preview deploy are
all equally valid; the verdict comes from the build, not the platform. See
rig-template.md for filled examples.
For any deployed or remote build, poll the rig's LIVENESS probe to confirm the
artifact contains HEAD before trusting a verdict (a stale deploy reads as a
false RED or GREEN); a local next build && next start needs none. The probe
mechanism is in rig-template.md (question 6).
Drive the real navigation with no instant() lock and assert that the
destination's SHELL_MARKER renders as the test user: the account the
e2e suite authenticates as (in CI, the CI account; locally, your e2e login
fixture), with its flags, plan, role, and data. This establishes that the
marker is real and reachable: not flag-gated, not redirected away, not a
guessed selector. The suite runs as the test account, not the author's session;
that environment drift (the rig DRIFT list) is a common source of
untrustworthy REDs. Scaffold and run command: test-template.md.
Delete this baseline before the PR.
Wrap the same navigation in instant(); assert the shell commits under the
lock. A RED here is the gap. This is the test that ships
(test-template.md).
Prefer the self-validating variant when the route has deferred content. If the
route cannot build while blocked, or a cookie/session read stays GREEN, use the
RED recipes in reference/red-test-robustness.md.
C-gate: do not start optimizing until the RED is verified trustworthy. A RED that is red for the wrong reason sends you optimizing a route that was never broken.
The question that settles it: does SHELL_MARKER render without the lock,
as the test user? Answer it by re-running phase B as the test user, not by
adding assertions to the shipped test. The two-branch resolution (No → marker
or environment bug; Yes → genuine gap, proceed to D), the full taxonomy of
untrustworthy REDs, the checklist, and worked cases are in
reference/red-test-robustness.md. Read it now.
The anti-pattern: one coarse boundary. A single <Suspense> high in the
tree with a page-level fallback has three costs:
The fix: hoist the static, push the Suspense down. Render the layout UI once, synchronously, in the shell, and wrap each await in a boundary scoped to the single read it guards. Only that leaf streams; the stable ancestors are reused as-is.
Rule: if an element renders in both the fallback and the resolved tree, hoist it above the boundary.
await in a layout on a fallback routeapp/[locale]/(app)/[tenant]/dashboard/...
│ generateStaticParams ✅ │ no generateStaticParams → fallback routeWhen any dynamic segment in the route lacks generateStaticParams, the route
is a fallback route, and all params defer to request time, including the
enumerated ones. A top-level await in a layout (await params, a
request-time session read, an auth gate) then blocks the whole subtree out of
the static shell, even when it reads a statically known param. Minimal shape: a
dynamic-segment route with one segment lacking generateStaticParams, plus a
top-level await in the layout above it.
Render children unconditionally; move the top-level await into a
<Suspense fallback={null}>-wrapped child. Mechanism and before→after:
reference/real-app-patterns.md, "Deferring an auth gate".
Fix the page below the shell too, not only the layout. A page-level
top-level await (commonly await params) blocks the same way the layout's
does, so make the page sync and push its dynamic reads into a
<Suspense>-wrapped leaf as well. fallback={null} is correct only when a gate renders nothing on
success; for data, the fallback must be a real loading skeleton (see D1).
Every other blocker shape — cookies()/headers(), uncached fetch or database
reads, searchParams, metadata, viewport, non-deterministic values (Date.now(),
Math.random(), crypto.randomUUID()) — surfaces its own insight when you hit
it: the build prints a https://nextjs.org/docs/messages/<slug> link. The
default build output is often abbreviated and may carry no usable stack trace;
add --debug-prerender for the full failing frame and to report every blocker
past the first. Scope the build to the route you're on with
next build --debug-build-paths "app/<route>/**" rather than rebuilding the app.
Open that page and apply its recipe; don't improvise from the inline message.
The before→after recipe for each shape is in reference/patterns.md, which maps it to the insight
that explains it.
A few things those per-error pages don't stress for the instant-navigation goal:
export const instant = false opts
the segment out of validation while the navigation still blocks, and a
<Suspense> above the document <body> prerenders an empty shell — neither
makes the route instant.Before writing any skeleton, search the repository for the loading UI that already exists for this route, in order:
loading.tsx;*Skeleton colocated with the component;<Suspense>.The divergence point is the lowest layout shared by the source and
destination routes: a soft navigation re-renders only the segments below it,
while an initial load re-runs every layout from the root. (Also called the
shared boundary.) A loading.tsx above the divergence point fills only
the initial-load shell; it sits above the soft-nav re-render scope. A
loading.tsx at the destination segment is itself the in-tree boundary for a
soft navigation into that segment and serves both. Reuse whichever boundary
actually covers the navigation you are shipping; below the divergence point,
loading.tsx and colocated skeletons are interchangeable for that purpose.
If a component has no skeleton, extract its loading markup into a colocated skeleton beside it. Do not author a fresh skeleton that mirrors the page layout: it duplicates structure, drifts as the page changes, and pulls the design back toward a single coarse boundary. Reusing the component's own skeleton also keeps the prefetched shell consistent with the loaded UI.
See: Streaming and loading states.
Exception: if the deferred component renders null for some users (for
example, a flag-gated control), fallback={null} is correct, since a skeleton
would flash and then collapse.
A skeleton frozen to one breakpoint misaligns on the others. Fix it the same
way: one responsive component renders both the live UI and the shell (D1
skeleton in its data slots), so the breakpoint switch happens once. Verify by
re-asserting the shell marker at two widths
(await page.setViewportSize({ width: 1280, height: 800 }), then
{ width: 390, height: 844 }), or by adding a mobile Playwright project, so
this gate is as machine-checkable as the others. Detail:
reference/real-app-patterns.md.
D-gate: phase D is complete when the locked test from phase C passes GREEN under the lock on the production-build rig, not when the code compiles. That GREEN is the deterministic stop for the fix loop; proceed to E.
When URL data can't be pushed down (for example, the whole page depends on
params, searchParams, or the full URL), there may be no meaningful static
shell to grow. Don't force one. Runtime prefetching can make the soft
navigation instant, but it is outside this optimizer loop: it requires Partial
Prefetching, a <Link prefetch={true}>, and cached URL-dependent content. See
Runtime Prefetching
and pattern 10 in reference/patterns.md for the requirements, cost trade-offs,
manual prefetch caveat, and instant() test gotchas.
The push-down is a mechanical transform, not a redesign. Afterward the route must render the same tree, data, ordering, empty and error states, redirects, and interactions as before; the only observable difference is that the shell now commits instantly. Verify:
awaits compute and return the same
values; after the stream, the route shows the same content as the base
branch for the test user.redirect() or notFound() still
happens, at request time rather than during prerender. Confirm an
unauthorized user is still redirected and a missing record still returns 404.If anything other than whether the route is instant changed, reduce the refactor.
Revert only the fix → RED; re-apply → GREEN; link both runs
(reference/red-test-robustness.md). On a deployed rig, confirm each run is live
(LIVENESS, phase A) before trusting its color.
A green final state means nothing if the RED was never trustworthy. The
test-trustworthiness items are the robustness checklist
(reference/red-test-robustness.md); confirm them, then require these
PR-specific items:
Stop condition for the whole workflow: the locked test from C is GREEN on the rig, the differential (F) holds, and every item above is checked. Until all three hold, you are not done.
<Link> click. Initial load → use
page.goto() inside instant() with the baseURL option. Do not substitute
goto for a soft-nav verdict; the two shells can differ
(test-template.md, reference/real-app-patterns.md).reference/real-app-patterns.md).rig-template.md: phase 0, the six-question rig discovery, the
instant-nav.rig.md template, and filled examples (local-only, generic CI,
preview deploy).test-template.md: the shipped instant() specs for both navigation
types (phase C), and the delete-before-PR baseline scaffold (phase B).reference/red-test-robustness.md: the C-gate and phase F. The taxonomy of
untrustworthy REDs, the checklist, the differential recipe, the vacuous-pass
failure mode, and worked cases.reference/real-app-patterns.md: parallel routes, deferring an auth gate,
initial-load vs soft-navigation shells, the empty-shell failure mode, the
responsive-skeleton mismatch, edge cases.Once the target routes are instant, check whether the app has already adopted
Partial Prefetching (partialPrefetching: true, or the relevant destination
still uses prefetch = 'partial' during an incremental rollout).
Make that check mechanically:
rg -n "partialPrefetching|prefetch\s*=\s*['\"]partial['\"]" --glob 'next.config.*' --glob 'app/**' --glob 'src/app/**'If partialPrefetching: true is in config, the app is globally adopted. If only
prefetch = 'partial' matches, treat those destination segments as adopted
during an incremental rollout and keep checking any other target routes.
<Link prefetch={true}> on the links where having
that URL-specific content ready before the click is worth the per-link server
work. Keep the default link behavior everywhere else so the shared App Shell
remains the low-cost baseline.next-partial-prefetching-adoption.
That skill moves the app onto the better prefetching model: shared App Shell
prefetches by default, fewer duplicated full-prefetch requests for visible
links, a link audit for existing <Link prefetch={true}> usage, and optional
per-link runtime prefetching only where URL-specific content is worth the
extra server work.© sanity-io, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files in .agents/skills/next-cache-components-optimizer of sanity-io/ui.
Open the folder on GitHubat commit 1c8fd85
We found 9 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 6 other GitHub owners. This page covers the copy in sanity-io/ui, which our catalogue first saw on October 7, 2026.
Next Cache Components Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Next Cache Components Optimizer this skillsanity-io/ui | 176 | 6 repos | ~6.3k | Automated safety check: Pass | MIT | |
| Proxy Setupasmyshlyaev177/test-proxy-recorder | 112 | — | ~4.3k | Automated safety check: Pass | MIT | |
| Tanstack Startasmyshlyaev177/test-proxy-recorder | 112 | — | ~2.9k | Automated safety check: Notes | MIT | |
| Senior QAalirezarezvani/claude-skills | 28k | 1 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Senior QAborghei/Claude-Skills | 874 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Playwrightpproenca/dot-skills | 214 | — | ~1.7k | Automated safety check: Pass | MIT |
asmyshlyaev177/test-proxy-recorder
Set up test-proxy-recorder for any Playwright project. An agent skill from asmyshlyaev177/test-proxy-recorder.
asmyshlyaev177/test-proxy-recorder
Record and replay TanStack Start SSR with test-proxy-recorder.
alirezarezvani/claude-skills
Generates unit tests, integration tests, and E2E tests for React/Next.js applications.
borghei/Claude-Skills
Testing for React/Next.js with Jest, React Testing Library, and Playwright.
pproenca/dot-skills
Playwright testing best practices for Next.js applications (formerly test-playwright).
anthropics/skills
Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.
sanity-io/ui
Verify Next.js runtime behavior after editing app code. An agent skill from sanity-io/ui.
sanity-io/ui
Record polished UI demo videos using Playwright. An agent skill from sanity-io/ui.
sanity-io/ui
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces.
sanity-io/ui
Inspect and profile the React component tree of a running Storybook story through chrome-devtools-mcp (React DevTools over the Chrome DevTools Protocol, via react-devtools-cdt-mcp).
sanity-io/ui
Integrates Sanity Live with Next.js Cache Components in next-sanity v13+ apps.
Works with
Categories
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Next Cache Components Optimizer is an agent skill from sanity-io/ui, published by the product's own GitHub organization.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation).
Next Cache Components Optimizer fits situations like: asked to make a routes navigation instant (its static shell commits immediately); fix a route whose static shell isnt prerendered/served/prefetched; grow a routes static shell; fix its slow first paint.
Run `npx skills add sanity-io/ui --skill next-cache-components-optimizer -a claude-code`. Or copy the skill folder (.agents/skills/next-cache-components-optimizer in sanity-io/ui) into .claude/skills/next-cache-components-optimizer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sanity-io/ui --skill next-cache-components-optimizer -a codex`. Or copy the skill folder (.agents/skills/next-cache-components-optimizer in sanity-io/ui) into .agents/skills/next-cache-components-optimizer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sanity-io/ui --skill next-cache-components-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/next-cache-components-optimizer, .gemini/skills/next-cache-components-optimizer, .github/skills/next-cache-components-optimizer and .opencode/skills/next-cache-components-optimizer in your project.
Going by SKILL.md and its folder, Next Cache Components Optimizer needs the command-line tools its instructions call (rg, npm and npx). Our summary lists: Node.js.
SKILL.md names 2 domains. In commands or code: nextjs.org; the agent is likely to contact it when it follows the instructions. As links in the text: github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Next Cache Components Optimizer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 6.3k tokens (SKILL.md is roughly 25k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Next Cache Components Optimizer: Proxy Setup (asmyshlyaev177/test-proxy-recorder, 112 stars), Tanstack Start (asmyshlyaev177/test-proxy-recorder, 112 stars), Senior QA (alirezarezvani/claude-skills, 28k stars) and Senior QA (borghei/Claude-Skills, 874 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sanity-io (a GitHub organization, an official publisher) maintains it in sanity-io/ui, which has 176 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 6, 2026.
Source: sanity-io/ui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.