Enforces bundle size budgets in CI by comparing branch bundle sizes against main, posting diff comments on PRs, and blocking merges on exceedance. Also tracks size trends over commits.
Ships in bundle-watch. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
PR-level bundle size gating. No surprises in production.
/bundle-watch setup — configure CI gate + size budgets
/bundle-watch diff — compare current branch bundle vs main
/bundle-watch budget <kb> — set or update size budget
/bundle-watch history — show bundle size trend over last 30 commits
/bundle-watch blame <chunk> — find what commit caused a chunk to grow
name: Bundle Size Check
on: [pull_request]
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- uses: andersonlimahw/bundle-watch-action@v1
with:
budget_kb: 200
fail_on_exceed: true
📦 Bundle Size Report
main PR diff
─────────────────────────────
Total 284 KB 312 KB +28 KB ❌ (budget: 300 KB)
/app 180 KB 195 KB +15 KB
/checkout 48 KB 62 KB +14 KB ⚠️
Top additions:
+ react-pdf (+38 KB) — loaded eagerly, consider dynamic import
- lodash-es (-10 KB) — ✅ good removal
// bundle-watch.config.json
{
"budgets": {
"total": { "maxKB": 300, "warnKB": 250 },
"/app": { "maxKB": 200 },
"/checkout": { "maxKB": 60 }
},
"baseline": "main"
}
Pairs with /bundle-analyzer skill for deep analysis of violations.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/bundle-watch:bundle-watchfrom bundle-watch
npx claudepluginhub andersonlimahw/lemon-ai-hub --plugin bundle-watchOther plugins' skills for the same job