Skip to content
Back to skills

Bundle Analyze

ASecurity

Analyzes frontend bundle size and suggests optimizations

  • 10 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 1, 2026
ai-agentsbashreactnextjsfrontend

Works with

  • cli

Security analysis

A100/100

Scanned June 1, 2026

npx -y skills add berkcangumusisik/claude-code-practices --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/berkcangumusisik-bundle-analyze/badge)](https://www.skillsdirectory.com/skills/berkcangumusisik-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: Analyzes frontend bundle size and suggests optimizations
user-invocable: true
allowed-tools: Bash Read Edit Glob
effort: medium
---

## Bundle Analysis

1. Check build tool:
```bash
cat package.json | grep -E '"build"|vite|webpack|rollup|esbuild|next'
```

2. Generate bundle stats:
```bash
# Next.js
npx next build --analyze 2>/dev/null

# Vite
npx vite-bundle-visualizer 2>/dev/null

# Generic build size
bun run build 2>&1 | grep -E "\.js|\.css|kB|MB"
```

3. Identify heavy dependencies:
```bash
cat package.json | grep -E '"dependencies"' -A 50
# Check bundle phobia for top suspects
```

4. Find optimization opportunities:
   - Libraries with lighter alternatives (moment.js → date-fns, lodash → native)
   - Packages imported entirely but only a few functions used
   - Client-side code that could be server-side
   - Missing dynamic imports for routes/heavy components

5. Report:
```
Total bundle: X KB (gzipped: Y KB)

Top 5 contributors:
  react-dom         45 KB
  chart-library    120 KB  ← consider lighter alternative
  ...

Potential savings: ~Z KB with recommended changes
```

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.