next-partial-prefetching-optimizer

next-partial-prefetching-optimizer is a skill for Claude Code from vercel/next.js. It costs 82 tokens per session (2,422 once invoked), scanned A, original, MIT.

A workflow for tuning which parts of a Next.js page are fetched before a user clicks a link. Next.js is a web framework, and partial prefetching loads some navigation content early to make selected transitions feel faster.

In plain words
What is it for?
Use it to optimize selected Next.js links and destinations, compare navigation behavior, and keep a regression test for the result.
Why use it?
It helps choose what to fetch early without unnecessarily downloading page content, then checks that the change preserves existing behavior.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the nextjs plugin — 5 skills shipped together

Good fit Use it to optimize selected Next.js links and destinations, compare navigation behavior, and keep a regression test for the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vercel/next.js/next-partial-prefetching-optimizer
About the project

Next.js is a React framework for building applications that run across the browser and Node.js, including server-rendered applications. It is used by developers building web applications with React components.

vercel/next.js · 142,227 stars · on GitHub · nextjs.org

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 vercel/next.js --skill next-partial-prefetching-optimizer
Clone the repo
git clone --depth 1 https://github.com/vercel/next.js

Made for: Claude Code.

Or install nextjs, the plugin that ships this one along with the rest of its 5 skills.

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 next-partial-prefetching-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/vercel/next.js/next-partial-prefetching-optimizer/github.svg)](https://agentmods.dev/skills/vercel/next.js/next-partial-prefetching-optimizer)
Your own site
<a href="https://agentmods.dev/skills/vercel/next.js/next-partial-prefetching-optimizer"><img src="https://agentmods.dev/badge/skills/vercel/next.js/next-partial-prefetching-optimizer/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 next-partial-prefetching-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/vercel/next.js/next-partial-prefetching-optimizer"><img src="https://agentmods.dev/badge/skills/vercel/next.js/next-partial-prefetching-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,422 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.
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.00082 $0.02422
Opus 5 $0.00041 $0.01211
Sonnet 5 $0.00016 $0.00484
Haiku 4.5 $0.00008 $0.00242

Measured today against content hash 76cc3ac09489, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

next-partial-prefetching-optimizer 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 today.

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.

skills/next-partial-prefetching-optimizer/SKILL.md · 230 lines

How it starts

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

Partial Prefetching optimizer

Optimize each requested source link and destination as its own contract. Turn the requested prefetched UI, navigation-only UI, and trigger into a production instant() test. Record the current behavior, make the smallest optimization, verify the differential, and keep the passing test as regression coverage.

Before making framework changes, read the bundled Optimizing prefetching guide at node_modules/next/dist/docs/01-app/02-guides/optimizing-prefetching.md. If the bundled guide is unavailable, use the online guide. It is the source of truth for prefetch stages, prefetch={true}, session-specific UI, and cost trade-offs.

When the work changes what belongs in the App Shell, follow the Instant navigation and Caching docs for cache placement, Suspense boundaries, loading UI, and authorization.

The guides own framework behavior and implementation patterns. This skill owns the navigation contract, production rig, trustworthy RED-to-GREEN loop, parity check, differential, and report.

This is not an adoption skill. If Cache Components or Partial Prefetching are not adopted, use their adoption skills and return to this workflow. If the App Shell itself cannot commit under instant(), use next-cache-components-optimizer first, then resume the selected navigation.

Run the workflow unattended. Resolve the contract from the request and the existing application. Stop for user input only when a product decision is genuinely blocked and cannot be inferred safely without changing cost, freshness, authorization, or user-visible behavior.

Reporting to the user

This loop runs unattended, so do not stop between implementation steps. Finish the navigations the user named, then check in. The rig, lock, RED/GREEN loop, and stage names are internal scaffolding; report the product behavior instead.

Read the full file on GitHub · 230 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today First seen · 230 lines · 82 tokens per session scan A 76cc3ac09489

Subscribe to this mod's changes

next-partial-prefetching-optimizer is a skill published in the GitHub repository vercel/next.js (142,227 stars, last pushed today), licensed MIT. It adds 82 tokens to every session and 2,422 once invoked, about $0.0004 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-09-11.

Related

Other skills, from other repositories

playwright-component-testing

Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime. Use when asked to test React or Vue components in isolation with Playwright, or to migrate off @playwright/experimental-ct-react / -vue.

microsoft/playwright · 69 tokens

screen-reader-testing

Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues, or ensuring assistive technology support.

wshobson/agents · 39 tokens

verify

Build, launch, drive, and screenshot the OpenNOW Electron settings UI on Windows.

OpenCloudGaming/OpenNOW · 17 tokens

break

Renders a component you choose in every state and scenario on a temporary page and stress tests it.

jakubkrehel/skills · 22 tokens

live-preview

Mid-build visual verification loop. Takes screenshots of components during construction, not just after. Catches visual regressions and invisible features before they compound. Requires Playwright or similar screenshot tool.

SethGammon/Citadel · 40 tokens

endpoint-probe

Probes each major Agent Monitor API route — /api/stats, /api/analytics, /api/sessions, /api/pricing/cost, /api/workflows/runs, /api/cc-config/overview — and reports each one's HTTP status, latency, and response shape, flagging which are reachable. Use to verify a dashboard install is wired up correctly.

hoangsonww/Claude-Code-Agent-Monitor · 80 tokens