What problem does it solve?
Analyze and quality-check Next.js 16 (Turbopack) bundle sizes using pnpm analyze:output (i.e. next experimental-analyze --output). Use when the user wants to inspect bundle sizes, find large dependencies, detect duplicate modules, quality-check production builds, or get optimization recommendations.
Core Features & Use Cases
- Generate analyze output using the pre-defined pnpm script (see package.json): pnpm analyze:output, which writes results to .next/diagnostics/analyze/.
- Run the analysis script to interpret the results: uv run .claude/skills/next-bundle-analyzer/scripts/analyze_bundle.py .next/diagnostics/analyze
- Review recommendations and identify optimization opportunities like trimming client bundles, deduping packages, and moving server-friendly logic.
Quick Start
Generate the analyze output with pnpm analyze:output, then run the analyze_bundle.py script to interpret the results.