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-bundle-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-bundle-optimizer)<a href="https://agentmods.dev/skills/vercel/next.js/next-bundle-optimizer"><img src="https://agentmods.dev/badge/skills/vercel/next.js/next-bundle-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-bundle-optimizer"><img src="https://agentmods.dev/badge/skills/vercel/next.js/next-bundle-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk fail
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.00038 | $0.02455 |
| Opus 5.5 | $0.00015 | $0.00982 |
| Sonnet 5.5 | $0.00008 | $0.00491 |
| Haiku 4.5 | $0.00004 | $0.00246 |
Grade A, and why
next-bundle-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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Bundle optimizer
1. Set the scope
Analyze the whole app by default, covering all routes and shared client dependencies. Narrow the scope only when the user specifies a route, dependency, feature or other subset. Choose audit or fix mode. Audit is the default: generate analyzer artifacts and report candidates while leaving application source, dependencies and lockfiles unchanged. Fix mode requires an explicit request to change the app. Ask before changing visible behavior, timing, compatibility or a trust boundary. For a route's static App Shell, use next-cache-components-optimizer; install it first if unavailable (npx skills add https://github.com/vercel/next.js/tree/canary/skills/next-cache-components-optimizer). For navigation prefetch work, use next-partial-prefetching-optimizer; install it first if unavailable (npx skills add https://github.com/vercel/next.js/tree/canary/skills/next-partial-prefetching-optimizer).
Done: the whole-app or user-specified scope, mode and intended behavior are recorded. A request to capture or export data is audit mode, not permission to fix.
2. Capture and export a baseline
Run from the app directory with its package manager. Read next analyze --help for capture options and next analyze export --help for replay options in the installed CLI. Reuse a selected saved snapshot, or capture with a distinctive name first; then export it through gzip at its default compression level. Keep before/after .jsonl.gz files separate.
Sandbox requirement: If the agent’s sandbox blocks TCP port binding (as Codex’s does), it MUST run the next analyze --output capture outside the sandbox. Do not attempt the capture inside that sandbox, even though --output does not serve the analyzer UI.
Run the pipeline in Bash:
set -o pipefail
# Capture only when a new baseline is needed
pnpm exec next analyze --output --snapshot 'audit-before-unique-1'
pnpm exec next analyze export --snapshot 'audit-before-unique-1' | gzip > /tmp/analyze-app-before.jsonl.gz
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.
- 1mo ago Changed · +16 lines a0cba357640f
- 1mo ago Changed 0c73ee3c9c93
- 1mo ago First seen · 91 lines · 38 tokens per session scan A 250f8c9a2ee0
next-bundle-optimizer is a skill published in the GitHub repository vercel/next.js (143,843 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 2,455 once invoked, about $0.0002 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-10-07.
next-bundle-optimizer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| next-bundle-optimizervercel/next.js | Skill | 144k | today | MIT | A | 38 | Claude Code |
| shadcnshadcn-ui/ui | Skill | 129k | 3d ago | MIT | A | 113 | Claude Code, Codex, Cursor |
| migrate-radix-to-baseshadcn-ui/ui | Skill | 129k | 3d ago | MIT | A | 61 | Cursor |
| examplerecharts/recharts | Skill | 28k | today | MIT | A | 11 | Claude Code, Codex |
| magic-uimagicuidesign/magicui | Skill | 24k | 3d ago | MIT | A | 56 | Claude Code, Codex |
| crosspostingwasp-lang/wasp | Skill | 19k | 3d ago | MIT | A | 19 | Claude Code |
| notion-to-blogwasp-lang/wasp | Skill | 19k | 3d ago | MIT | A | 37 | Claude Code |