Skip to content
Back to skills

Bundle Analyze

ASecurity

Analyze the production bundle to find the heaviest modules and shrink the shipped size

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
ai-agentsgo

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --skill bundle-analyze --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bundle Analyze?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bundle Analyze
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black141312-bundle-analyze/badge)](https://www.skillsdirectory.com/skills/black141312-bundle-analyze)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bundle-analyze
description: Analyze the production bundle to find the heaviest modules and shrink the shipped size
category: dependencies
---

# Bundle Analyze

Use when the shipped bundle is too large and you need to know what is taking up space before cutting it.

1. Produce a production build with stats enabled and open a treemap (`webpack-bundle-analyzer`, `vite-bundle-visualizer`, `source-map-explorer`, `rollup-plugin-visualizer`).
2. Rank modules by gzipped size and flag the worst offenders — large libs, duplicated packages, and accidentally-bundled dev/test code.
3. Replace heavy dependencies with lighter or native equivalents (e.g. date helpers, lodash → per-method or stdlib).
4. Split routes and lazy-load rarely-used chunks; defer anything not needed for first paint.
5. Ensure tree-shaking works: prefer ESM imports, drop side-effect-y barrel files, and set `sideEffects` correctly.
6. Rebuild, compare gzipped sizes against the baseline, and record the before/after numbers.

## Rules
- Measure gzipped (or brotli) size, not raw bytes — that's what users actually download.
- Always analyze a production build; dev builds include unminified helpers and skew the picture.
- Confirm a smaller alternative is genuinely lighter after tree-shaking, not just on paper.
- Duplicated versions of one library are a common, easy win — dedupe before swapping libs.
- Re-run the analyzer after each change so you attribute the savings correctly.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…