Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

next-partial-prefetching-optimizer

Skill by vercel

Optimizes what selected Next.js client navigations include before the click under Partial Prefetching. It is for teams that already use Cache Components and Partial Prefetching and need to choose prefetch behavior per link.

  • Score 92
  • 144k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install next-partial-prefetching-optimizer

Built from the published package, never by AI.

git clone --depth 1 https://github.com/vercel/next.js /tmp/next.js && mkdir -p ~/.claude/skills && cp -r /tmp/next.js/skills/next-partial-prefetching-optimizer ~/.claude/skills/next-partial-prefetching-optimizer

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install next-partial-prefetching-optimizer in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill helps optimize individual Next.js client navigations under Partial Prefetching. For each source link and destination, it records which UI should be ready before the click, which reusable UI should wait for navigation, and whether prefetching should start in the viewport or only after intent. It then writes a production browser test using the instant() testing pattern, makes the smallest change needed, and verifies the result with a RED-to-GREEN loop and a differential check.

The skill is for developers on Next.js 16.3 or later who have already adopted Cache Components and Partial Prefetching. It is not an adoption skill. If those features are not adopted, the skill points to separate adoption skills. It relies on the bundled Next.js Optimizing prefetching guide as the source of truth for framework behavior.

Written from the project's SKILL.md and checked against it.

What it can do

  • Define navigation contractRecords which destination UI should be ready before the click and which UI should wait for navigation.
  • Choose prefetch triggerDecides whether a link prefetches in the viewport or only after intent, based on the guide's cost model.
  • Write instant() testCreates a production browser test that clicks the exact source link and checks the prefetched result.
  • Run RED-to-GREEN loopConfirms the test fails before the optimization and passes after it.
  • Differential checkRemoves only the optimization to confirm the test returns to RED, then reapplies it.
  • Reuse production rigReads an existing instant-nav.rig.md or uses rig-template.md to set up build, auth, data and Playwright context.

What you need

  • Next.js 16.3 or later
  • Cache Components adopted
  • Partial Prefetching adopted
  • Production build or preview with experimental.exposeTestingApiInProductionBuild enabled for testing

Try asking

  • Optimize the prefetching for the checkout link on the cart page.
  • Make the product details UI instant when users click from the catalog.
  • Should this link use viewport or intent prefetching? Test it and report.

Good to know

  • Prefetching is best-effort, and the App Shell remains the fallback when it has not completed.
  • Requires Cache Components and Partial Prefetching to be adopted first.
  • Request counts and bytes are treated as measurements, not as part of the instant() contract.
  • Does not classify requests using private RSC URLs or internal headers.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/next-partial-prefetching-optimizer/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md12 KB
  • reference/red-test-robustness.md6 KB
  • rig-template.md8 KB

Alternatives to next-partial-prefetching-optimizer

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

next-partial-prefetching-optimizer: common questions

What Next.js version does this skill require?

The skill states that it requires Next.js 16.3 or later.

Does this skill set up Partial Prefetching for me?

No. The source says it is not an adoption skill. Cache Components and Partial Prefetching must already be adopted, or the user should use the adoption skills first.

What does the skill use to verify prefetching?

It writes a production browser test using the instant() pattern from Next.js, runs it before and after the optimization, and keeps the passing test as regression coverage.

How do I install next-partial-prefetching-optimizer?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is next-partial-prefetching-optimizer free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is next-partial-prefetching-optimizer safe to use?

It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to next-partial-prefetching-optimizer?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

next-partial-prefetching-optimizer Install

Add to stack

Loading.