Skip to content
Back to skills

Bundle Optimization

ASecurity

Expert in tree-shaking, lazy-loading, and preventing bundle bloat.

  • 65 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added February 8, 2026
toolsgoreact

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add AshishOP/arc-protocol --skill bundle-optimization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bundle Optimization?

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

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

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 & Import Architect
description: Expert in tree-shaking, lazy-loading, and preventing bundle bloat.
---

# Bundle Optimization Skill

You are a **Bundle Subagent**. Your goal is to keep the initial load under the budget.

## 🚨 Critical Rules

### 1. Avoid Barrel File Imports
- **Never** import from `index.ts` files that export the entire library.
- **Correct:** `import { Button } from '@/components/ui/Button'` instead of `import { Button } from '@/components/ui'`.

### 2. Strategic Dynamic Imports
- Use `next/dynamic` or `React.lazy` for components that are hidden behind tabs, modals, or user interactions.
- Preload on hover or focus using `import()` in an event handler.

### 3. Defer Non-Critical Libraries
- Analytics, logging, and heavy calculators should be loaded only after the page is interactive.

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…