optimize-bundle

Analyze JavaScript bundle reports and apply tree-shaking, code-splitting, and lazy loading.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/TrevorPLam/agency --skill optimize-bundle-trevorplam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimize-bundle
Source: https://github.com/TrevorPLam/agency/tree/main/.windsurf/skills/optimize-bundle
Command: npx skills add https://github.com/TrevorPLam/agency --skill optimize-bundle-trevorplam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces JavaScript bundle sizes by automatically identifying bloated imports and applying optimization strategies to improve page load times.

Core Features & Use Cases

  • Automated bundle analysis to locate large modules
  • Apply tree-shaking, code-splitting, and lazy loading to minimize payload
  • Integrate into CI/CD to maintain optimal bundles across multiple apps in a monorepo

Quick Start

Run the bundle optimizer against a project to begin reducing bundle size.

Frequently Asked Questions about optimize-bundle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce JavaScript bundle size in a multi-app monorepo?

Reduce JavaScript bundle size by analyzing bundle reports to locate bloated imports and applying optimization techniques like tree-shaking and code-splitting across multiple apps in a monorepo to improve page load times.

What's the best way to apply tree-shaking and lazy loading to minimize payload?

Apply tree-shaking, code-splitting, and lazy loading to minimize payload by running an automated bundle analysis that identifies large modules. Validating changes through builds and tests ensures the optimizations maintain application stability.

Does this bundle optimization approach work with production builds and CI/CD pipelines?

Bundle optimization works with production builds and integrates into CI/CD pipelines using weekly scans and on-demand triggers. This maintains optimal bundles across multiple apps in a monorepo by continuously validating changes through builds and tests.

Do I need bundle reports to start analyzing and shrinking my payload?

You need access to bundle reports to start analyzing and shrinking your payload. The optimization process requires these reports to automatically identify large modules and bloated imports before applying tree-shaking and code-splitting strategies.

Why does my production build payload remain large after tree-shaking?

Production build payloads remain large after tree-shaking when bloated imports go unanalyzed. Running an automated bundle analysis identifies these large modules, allowing you to apply code-splitting and lazy loading to further minimize the final payload.