Skip to content
Back to skills

Optimize Bundle

ASecurity

Apply bundle size optimizations

  • 43 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
toolsbashperformance

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add baekenough/oh-my-customcode --skill optimize-bundle --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Optimize Bundle?

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

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

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: optimize-bundle
description: Apply bundle size optimizations
scope: core
argument-hint: "[--dry-run] [--safe]"
disable-model-invocation: true
user-invocable: true
---

# Bundle Optimization Skill

Apply bundle size optimizations to reduce build output and improve performance.

## Options

```
--dry-run        Show what would be changed without applying
--safe           Only apply safe, reversible optimizations
```

## Workflow

```
1. Run full bundle analysis
2. Identify optimization opportunities
3. Prioritize by impact and risk
4. Apply recommended changes (or show dry-run)
5. Rebuild if changes applied
6. Verify improvements
7. Report before/after metrics
```

## Optimization Levels

### Safe
- Configure code splitting
- Enable tree-shaking for ESM
- Add terser/minification
- Configure chunk optimization

### Moderate
- Replace heavy dependencies with lighter alternatives
- Add dynamic imports for routes
- Configure asset optimization

### Aggressive
- Remove unused dependencies
- Inline small modules
- Configure aggressive minification

## Output

- Applied changes list
- Before/after size comparison
- Build time comparison
- Risk assessment for each change

## Examples

```bash
# Apply all safe optimizations
optimize-bundle

# Preview changes without applying
optimize-bundle --dry-run

# Only apply safe optimizations
optimize-bundle --safe
```

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…