# Bundle Optimization

> Bundle Optimization is an Agent Skill for development published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Bundle analysis, code splitting, tree shaking, and size optimization.

- Skill name: `bundle-optimization`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/web-development/skills/bundle-optimization/SKILL.md
- Repository: a5c-ai/babysitter (1,548 GitHub stars when collected)

## SKILL.md

# Bundle Optimization Skill

Expert assistance for JavaScript bundle optimization.

## Capabilities

- Analyze bundle size
- Implement code splitting
- Configure tree shaking
- Optimize dependencies
- Set up lazy loading

## Analysis

```bash
# webpack-bundle-analyzer
npx webpack-bundle-analyzer stats.json

# source-map-explorer
npx source-map-explorer dist/*.js
```

## Code Splitting

```typescript
// Route-based splitting
const Dashboard = lazy(() => import('./pages/Dashboard'));

// Library splitting
const { Chart } = await import('chart.js');
```

## Target Processes

- bundle-optimization
- performance-improvement
- build-optimization

---

Source: https://www.openparable.com/skill/development/bundle-optimization (OpenParable). Cite the canonical URL above.
