前端开发

next-cache-components-optimizer

vercel/next.js

Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards against regression. Use when asked to grow a static shell, fix a slow first paint or non-instant navigation, diagnose which Suspense boundary blocks useful UI, or add instant() regression coverage. Requires Next.js 16.3+ with Cache Components already adopted.

  • 1.9万 次安装
  • 14.3万 星标
  • 收录于

安装命令

npx skills add https://github.com/vercel/next.js --skill next-cache-components-optimizer

SKILL.md

next-cache-components-optimizer

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 and entry point. Work the phases P → G in order; each ends in a gate.

Before changing the route, read the bundled Optimizing the static shell guide at node_modules/next/dist/docs/01-app/02-guides/optimizing-the-static-shell.md. If it is unavailable, use the online guide. The guide owns the framework behavior and implementation patterns. This skill owns the navigation contract, production rig, trustworthy RED-to-GREEN loop, parity check, differential, and report.

What is invariant, and what is yours