next-cache-components-optimizer
Skill by vercel
next-cache-components-optimizer is a Vercel agent skill that makes Next.js route UI appear instantly. It encodes the goal as a failing @next/playwright instant() test and works it to green, then ships that test as a regression guard.
Install next-cache-components-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-cache-components-optimizer ~/.claude/skills/next-cache-components-optimizerRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install next-cache-components-optimizer in Claude Code
git clone --depth 1 https://github.com/vercel/next.js /tmp/next.js && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/next.js/skills/next-cache-components-optimizer ~/.gemini/antigravity-cli/skills/next-cache-components-optimizerAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install next-cache-components-optimizer in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
next-cache-components-optimizer is an agent skill from Vercel for Next.js routes that use Cache Components. It targets the UI a route shows immediately on an initial load (hard navigation) or a named client-side navigation (soft navigation). The skill encodes the goal as a failing instant() end-to-end test from @next/playwright, then works the route until the test passes. It is meant for growing a static shell, fixing a slow first paint or non-instant navigation, and finding which Suspense boundary blocks useful UI.
The shipped test then guards the route against regression. The workflow uses a production-like build that exposes the testing API, and checks that a refactor only changes whether the route is instant. It requires Next.js 16.3+ with Cache Components already adopted. It hands off to other skills for prefetching work or for Cache Components adoption.
Written from the project's SKILL.md and checked against it.
What it can do
- Instant navigation testEncodes the goal as a failing @next/playwright instant() test and works it to green.
- Static shell growthGrows the static shell that commits on an initial load (hard navigation).
- Client navigation fixesFixes non-instant client-side navigation by caching reusable work or moving request-time work behind a boundary.
- Suspense diagnosisDiagnoses which Suspense boundary blocks useful UI on a route.
- Regression guardShips the locked instant() test so later changes that break instant navigation are caught.
- Parity and differential checksChecks that a refactor only changed instant behavior and that reverting the fix turns the test red again.
- Rig setupDiscovers the project's build and test setup and writes an instant-nav.rig.md file for later runs.
What you need
- Next.js 16.3+ with cacheComponents enabled
- @next/playwright on the same release line as next
- @playwright/test
- A production-like build that exposes the testing API
Try asking
- Make the dashboard route show its layout instantly on first load
- Diagnose which Suspense boundary blocks the product page from painting
- Fix the slow client-side navigation to the settings page
Good to know
- Requires Next.js 16.3+ with Cache Components already adopted; older versions are not supported.
- instant() is used to assert the shell appears, not to time navigations.
- A trustworthy verdict requires a production build that exposes the testing API.
- Phases must run in order, and the test only passes when the shell is both present and instant.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/next-cache-components-optimizer/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md23 KB -
reference/red-test-robustness.md11 KB -
rig-template.md8 KB -
test-template.md9 KB
Alternatives to next-cache-components-optimizer
All alternatives →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.
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.
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.
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.
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.
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.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
next-cache-components-optimizer: common questions
Does this skill work with Next.js versions before 16.3?
No. The source says the skill targets current Next.js with Cache Components, and it requires Next.js 16.3+ with cacheComponents set to true.
What does instant() check in this workflow?
According to the source, instant() asserts that the static shell appears under a lock that gates dynamic data. It is used as a ruler rather than a stopwatch.
Can it fix soft navigation as well as initial loads?
Yes. The source says it can fix non-instant client-side navigation by caching reusable work or moving request-time work behind a focused boundary.
How do I install next-cache-components-optimizer?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is next-cache-components-optimizer free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is next-cache-components-optimizer safe to use?
It scores 94 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-cache-components-optimizer?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
