bundle-size-analyzer

Audit package.json dependencies and suggest lighter replacements for JavaScript bundles.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/KILWA73/MiniSoc --skill bundle-size-analyzer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bundle-size-analyzer
Source: https://github.com/KILWA73/MiniSoc/tree/main/.agents/skills/bundle-size-analyzer
Command: npx skills add https://github.com/KILWA73/MiniSoc --skill bundle-size-analyzer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Heavy dependencies inflate bundle sizes and slow load times; this skill identifies bloated libraries and proposes lean replacements.

Core Features & Use Cases

  • Audit dependencies in package.json to find heavy offenders such as moment.js or lodash.
  • Suggest modern, lighter alternatives and show 1:1 replacements.
  • Verify tree-shaking by ensuring imports use named exports like debounce from lodash-es.
  • Use Case: A React app that bundles moment.js and large lodash utilities can be slimmed by replacing with date-fns and lodash-es.

Quick Start

Run the bundle-size-analyzer from the project root to scan package.json and generate a remediation plan.

Frequently Asked Questions about bundle-size-analyzer

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

FAQPage Schema
How do I find heavy dependencies bloating my JavaScript bundle size?

Tree-shaking reduces bundle size by eliminating unused module code during the build. The analyzer verifies tree-shaking by checking if your imports use named exports, ensuring proper dead code elimination.

Can I analyze bundle size for a web app using npm or Yarn?

Yes, you can analyze bundle size for web apps and libraries using npm or Yarn projects. The tool scans your project root to audit dependencies and validate tree-shaking across development, build, and CI workflows.

What are the best replacements for heavy JavaScript libraries like moment.js?

Modern replacements for heavy JavaScript libraries include date-fns for moment.js and lodash-es for lodash. The analyzer suggests these 1:1 replacements and shows how named imports enable proper tree-shaking.

How to fix tree-shaking not working with named imports?

Fix tree-shaking not working by ensuring your imports use named exports like `debounce` from lodash-es instead of default imports. The analyzer checks named imports in your package.json to validate proper tree-shaking.