Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/fatihkan/badi/bundle-analyzegit clone --depth 1 https://github.com/fatihkan/badiWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00359 |
| Opus 5 | $0.00000 | $0.00179 |
| Sonnet 5 | $0.00000 | $0.00072 |
| Haiku 4.5 | $0.00000 | $0.00036 |
Grade A, and why
bundle-analyze scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Bundle size + framework detection + largest assets + heavy-dependency warnings.
Required Tools
- Bash (badi dev bundle)
Procedure
Step 1: Build
npm run build
Step 2: Analyze
badi dev bundle
Step 3: What Is Shown
- Framework detection: Next.js, Vite, Webpack, Expo
- Build output: dist/, build/, .next/, out/, web-build/
- Total size: in MB
- 10 largest assets: JS, MJS, CSS
- Heavy dependencies: moment, lodash, axios, jquery — alternative suggestions
Step 4: Alert Thresholds
- Asset > 500KB: CRITICAL — apply code splitting
- Asset > 200KB: Attention — consider lazy loading
- Total > 5MB: Affects web vitals
Step 5: Deep Analysis
Framework-specific tools:
- Webpack:
npx webpack-bundle-analyzer - Vite:
npx vite-bundle-visualizer - Next.js:
npx @next/bundle-analyzer
Step 6: Common Fixes
- Code splitting:
import()dynamic imports - Tree shaking: ESM + sideEffects: false
- Lazy load: React.lazy, Vue defineAsyncComponent
- CDN externals: React/Vue from a CDN
- Minification: production mode
- Compression: gzip/brotli
Example
npm run build
/bundle-analyze
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 54 lines · 0 tokens per session scan A 39d435337402
bundle-analyze is a command published in the GitHub repository fatihkan/badi (7 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 359 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
audit-agents-skills
Audit quality of agents, skills, and commands in a Claude Code project.
sonarqube
Analyze SonarCloud quality issues for a specific PR.
land-and-deploy
Merge PR, wait for CI, verify deploy, run canary — the complete landing pipeline.
methodology-advisor
Analyzes your codebase and asks 3 targeted questions to recommend the right AI-assisted development methodology stack.
scaffold
Interactive coach that asks 4-5 questions to determine whether you need an agent, command, skill, hook, or rule — then generates a ready-to-use template. Usage: /scaffold (no arguments — starts the coaching session).
investigate
Systematic root-cause debugging — find the cause before writing any fix.