bundle-analyzer

Analyze JavaScript bundle output to identify size-heavy dependencies and chunks.

7|2|Updated Nov 9, 2025
One-click install
npx skills add https://github.com/Prompt-or-Die-Labs/hyper-forge --skill bundle-analyzer-prompt-or-die-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bundle-analyzer
Source: https://github.com/Prompt-or-Die-Labs/hyper-forge/tree/main/.claude/skills/bundle-analyzer
Command: npx skills add https://github.com/Prompt-or-Die-Labs/hyper-forge --skill bundle-analyzer-prompt-or-die-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bun, and includes scripts (resource) components.

What problem does it solve?

Bundle analyzer identifies why your JavaScript build is too large and pinpoints the specific dependencies or chunks that should be targeted for reduction.

Core Features & Use Cases

  • Detects the bundler automatically or via flags (webpack vs Vite/Rollup) so the right analysis approach is used for your stack.
  • Generates visual and statistical reports to surface the biggest modules, chunks, duplicate dependencies, and size hotspots.
  • Recommends concrete optimization strategies such as code splitting, tree-shaking-friendly imports, manual chunking, and removing dev-only or unused code paths.
  • Use case: When a page loads slowly after adding a UI library or charting tool, run the analyzer to see whether the bundle grew due to vendor chunk expansion, duplicated packages, or large transitive dependencies.

Quick Start

Run bun run analyze.ts with the flag that matches your toolchain (for example, use the Vite option when you are bundling with Vite) to generate a bundle report.

Frequently Asked Questions about bundle-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find what is causing my large webpack bundle size?

To find what is causing a large webpack bundle size, analyze your build output to identify which dependencies or chunks contribute the most bloat. This process detects the bundler automatically and generates a statistical report of size hotspots.

What's the best way to diagnose duplicate dependencies in a Vite build?

The best way to diagnose duplicate dependencies in a Vite build is to run a bundle analysis that generates visual reports, surfacing duplicated packages and large transitive dependencies to pinpoint exactly where the size expansion occurred.

Does bundle analysis work with both Vite and Next.js workflows?

Yes, bundle analysis works with Vite, webpack, Rollup, and Next-style workflows. It detects your bundler automatically or via flags to apply the correct analysis approach for your specific stack.

How do I plan code splitting and tree shaking improvements after adding a UI library?

To plan code splitting and tree shaking improvements after adding a UI library, interpret the size breakdown report to recommend concrete strategies like manual chunking and tree-shaking-friendly imports to reduce initial load performance.

Do I need bun installed to run a bundle analysis?

Yes, you need bun installed because the analysis script runs via bun to install the appropriate analyzer tooling and execute the build-time analysis reports for your JavaScript application.