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-bundle-optimizer

Skill by vercel

Audit and reduce the browser initial-load work of Next.js apps. It finds slow route startup, oversized client bundles, duplicate browser dependencies and features that can wait for interaction.

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

Install next-bundle-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-bundle-optimizer ~/.claude/skills/next-bundle-optimizer

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

Step-by-step: install next-bundle-optimizer in Claude Code

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

About

Next Bundle Optimizer is an agent skill that audits and reduces the browser initial-load work of a Next.js app. It covers slow route startup, oversized client bundles, duplicate browser dependencies, and features that can wait for interaction. By default it runs in audit mode, generating analyzer artifacts and reporting candidates without changing application source, dependencies or lockfiles.

The skill captures a snapshot with next analyze, exports it as gzipped JSON lines, and interprets client and server contributions per route. It ranks candidates, checks importers and reachability, and scans for server-only code in client output. Fix mode needs an explicit request and applies one change at a time, comparing an after snapshot with the baseline. It is aimed at developers working on Next.js front-end performance.

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

What it can do

  • Scope and mode selectionSets whole-app or user-specified scope and chooses audit or fix mode.
  • Baseline capture and exportRuns next analyze and exports the snapshot to a gzipped JSON lines file.
  • Evidence interpretationReads the installed Next.js analyzer schema to attribute client and server output per route.
  • Candidate explanationRanks client output contributions and checks importers, reachability and source behavior.
  • Client-dependency scanLooks for server-only modules and Server Action implementations emitted into client code.
  • Single-change verificationIn fix mode, applies one edit and compares before and after snapshots and behavior checks.

What you need

  • An installed Next.js app with the next analyze CLI
  • A package manager such as pnpm to run next commands
  • Node.js to resolve the analyzer schema
  • gzip for compressing exported analysis files

Try asking

  • Audit my Next.js app for oversized client bundles and duplicate dependencies.
  • Find features in this route that can wait until user interaction.
  • Check my client bundle for server-only code that leaked into the browser.

Good to know

  • Audit mode is the default and leaves source, dependencies and lockfiles unchanged.
  • Fix mode requires an explicit request to change the app.
  • Graph findings are build evidence; observed browser timing or transfer savings need separate evidence.
  • If the sandbox blocks TCP port binding, the capture must run outside the sandbox.

Security check

A

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

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

Inside the skill

  • SKILL.md12 KB
  • references/client-dependencies.md4 KB
  • references/fix-patterns.md3 KB
  • references/graph-methods.md3 KB

Alternatives to next-bundle-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-bundle-optimizer: common questions

Does this skill change my Next.js app by default?

No. The default is audit mode, which generates analyzer artifacts and reports candidates while leaving application source, dependencies and lockfiles unchanged. Fix mode requires an explicit request.

What does a baseline capture involve?

It runs next analyze with --output to save a snapshot, then next analyze export to produce a gzipped .jsonl.gz file for comparison.

Does it measure real browser load times?

The source says its analysis is build evidence. Claims about observed browser requests, timing or transfer savings need separate evidence.

How do I install next-bundle-optimizer?

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

Is next-bundle-optimizer free?

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

Is next-bundle-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-bundle-optimizer?

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

next-bundle-optimizer Install

Add to stack

Loading.