Bundle size analyzer

From a5c-ai/babysitter · View interactive version

Bundle size analyzer is an AI agent skill from the GitHub repository a5c-ai/babysitter. Analyze and optimize application bundle size for desktop applications

How to use this skill

Skill file

bundle-size-analyzer

Analyze and optimize application bundle size to improve download times and memory usage.

Capabilities

Input Schema

{
  "type": "object",
  "properties": {
    "projectPath": { "type": "string" },
    "bundler": { "enum": ["webpack", "vite", "rollup", "esbuild"] },
    "generateReport": { "type": "boolean", "default": true }
  },
  "required": ["projectPath"]
}

Webpack Bundle Analyzer

// webpack.config.js
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

module.exports = {
  plugins: [
    new BundleAnalyzerPlugin({
      analyzerMode: 'static',
      reportFilename: 'bundle-report.html'
    })
  ]
};

Optimization Techniques

  1. Tree shaking
  2. Code splitting
  3. Dynamic imports
  4. Replace heavy dependencies
  5. Compress assets

Size Targets

| App Type | Target | Acceptable | Too Large |

|----------|--------|------------|-----------|

| Simple utility | < 30MB | < 60MB | > 100MB |

| Standard app | < 80MB | < 150MB | > 250MB |

| Complex app | < 150MB | < 250MB | > 400MB |

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.