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.
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.
npx skills add vercel/next.js --skill next-cache-components-optimizergit clone --depth 1 https://github.com/vercel/next.jsWrote 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.
[](https://agentmods.dev/skills/vercel/next.js/next-cache-components-optimizer)<a href="https://agentmods.dev/skills/vercel/next.js/next-cache-components-optimizer"><img src="https://agentmods.dev/badge/skills/vercel/next.js/next-cache-components-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.
<a href="https://agentmods.dev/skills/vercel/next.js/next-cache-components-optimizer"><img src="https://agentmods.dev/badge/skills/vercel/next.js/next-cache-components-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Snyk pass
- NVIDIA SkillSpector warn
- Socket pass
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 148 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00123 | $0.05322 |
| Opus 5.5 | $0.00049 | $0.02129 |
| Sonnet 5.5 | $0.00025 | $0.01064 |
| Haiku 4.5 | $0.00012 | $0.00532 |
Grade A, and why
next-cache-components-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 10d ago.
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.
Copies of this mod
2 near-identical copies found in the catalogue:
- next-cache-components-optimizer — 100% identical, 311 lines differ
- next-cache-components-optimizer — 97% identical, 325 lines differ
How it starts
The opening of the file, as written. The whole thing — 427 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
One thing here is fixed. The rest is yours. Read this before treating any command, platform, or env var below as a requirement.
- Invariant: the verification loop. Maximizing the shell is worthless unless you can prove it. The proof is an automated check: under a lock that gates dynamic data, the static shell still commits. RED shows the gap, GREEN shows it closed, the test ships as the regression guard. It must run on a production-like build and must not be able to pass vacuously. Stand the loop up once; every later optimization is then verifiable by construction. The loop is the deliverable, not any one route.
- The mechanism:
@next/playwrightinstant(). This skill usesinstant()as a ruler, not a stopwatch (phase A). It comes from@next/playwright(installed alongside@playwright/test, on the same release line asnext), 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. - Yours: the rig. How you build, deploy, authenticate, configure
Playwright, and loop belongs to your stack, not to this skill. A local
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.
What ships with it
3 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.
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.
- 10d ago Changed · -56 lines · -47 tokens per session 3d0e8eb9d922
- 1mo ago Changed · +5 lines f6e9c8deff1a
- 1mo ago First seen · 478 lines · 170 tokens per session scan A 9b538b7f5824
next-cache-components-optimizer is a skill published in the GitHub repository vercel/next.js (143,039 stars, last pushed today), licensed MIT. It adds 123 tokens to every session and 5,322 once invoked, about $0.0005 per session on Opus 5.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-08-30.
Other skills, from other repositories
verify
Build/launch/drive recipe for verifying apps/docs changes at runtime (demos, docs pages, llms.txt).
quality-engineering-playwright-pom-generation
Generates Playwright page objects from an executable test plan, one class per screen with ladder-compliant locators and no assertions, wired into a shared fixture. Use when a web scenario needs a page object that does not exist yet, or when locators drift and the page object must be rebuilt.
playwright-page-objects
Use when creating page objects or refactoring Playwright E2E tests for better maintainability with Page Object Model patterns.
webapp-testing
Web application testing principles. E2E, Playwright, deep audit strategies.
webapp-testing
Playwright-driven testing of local web apps.
browse
Drive a real browser through Aside: open a page, read it, click through a flow, take screenshots, check console errors. (gstack).