Babysitter bundle-size-analyzer
Analyze and optimize application bundle size for desktop applications
install
source · Clone the upstream repo
git clone https://github.com/a5c-ai/babysitter
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/a5c-ai/babysitter "$T" && mkdir -p ~/.claude/skills && cp -r "$T/library/specializations/desktop-development/skills/bundle-size-analyzer" ~/.claude/skills/a5c-ai-babysitter-bundle-size-analyzer && rm -rf "$T"
manifest:
library/specializations/desktop-development/skills/bundle-size-analyzer/SKILL.mdsource content
bundle-size-analyzer
Analyze and optimize application bundle size to improve download times and memory usage.
Capabilities
- Analyze bundle composition
- Identify large dependencies
- Detect duplicate packages
- Suggest tree-shaking opportunities
- Generate size reports
- Track size over time
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
- Tree shaking
- Code splitting
- Dynamic imports
- Replace heavy dependencies
- 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
startup-time-profilerelectron-builder-config