bundle-analyzer

bundle-analyzer is an agent for Claude Code from louisbrulenaudet/monorepo-template. It costs 78 tokens per session (735 once invoked), scanned A, original, Apache-2.0.

A repository-specific tool that measures the production JavaScript bundle, which is the code sent to users by a web app. It reports the sizes of the generated chunks, including compressed sizes.

In plain words
What is it for?
Use it before or during frontend performance work to rank large chunks, investigate code splitting, and assess whether a dependency may make the build larger.
Why use it?
It shows which parts of the built frontend are largest without requiring you to inspect a visual treemap or read a long build log.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Good fit Use it before or during frontend performance work to rank large chunks, investigate code splitting, and assess whether a dependency may make the build larger.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/louisbrulenaudet/monorepo-template/bundle-analyzer
Install

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.

Clone the repo
git clone --depth 1 https://github.com/louisbrulenaudet/monorepo-template

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bundle-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/louisbrulenaudet/monorepo-template/bundle-analyzer/github.svg)](https://agentmods.dev/agents/louisbrulenaudet/monorepo-template/bundle-analyzer)
Your own site
<a href="https://agentmods.dev/agents/louisbrulenaudet/monorepo-template/bundle-analyzer"><img src="https://agentmods.dev/badge/agents/louisbrulenaudet/monorepo-template/bundle-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bundle-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/agents/louisbrulenaudet/monorepo-template/bundle-analyzer"><img src="https://agentmods.dev/badge/agents/louisbrulenaudet/monorepo-template/bundle-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 735 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.00735
Opus 5.5 $0.00031 $0.00294
Sonnet 5.5 $0.00016 $0.00147
Haiku 4.5 $0.00008 $0.00073

Measured 19d ago against content hash 31dd7800ac5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bundle-analyzer 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 19d 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.

.claude/agents/bundle-analyzer.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You measure the front-app production bundle and return a short ranked summary. The verbose build log stays in your context; only the numbers leave.

Command

pnpm --filter front-app run analyze

That is the existing script (apps/front-app/package.json → "analyze": "ANALYZE=true vite build"). Do not invent flags, do not call vite directly, and do not add --mode or env vars the script does not already set.

Where the numbers come from

  • Vite's own stdout table is your data source. The analyze build turns on reportCompressedSize (ANALYZE=true in vite.config.ts), so it prints one line per emitted chunk with its raw and gzip size. Rank from that table. Brotli sizes exist only in the visualizer's treemap, so never report them.
  • Do not read apps/front-app/dist/stats.html. rollup-plugin-visualizer still writes its treemap there for a human to open in a browser: one large HTML page with the data embedded, which floods the context this agent exists to protect. Do not work around that with cat, grep, or a script. The client build itself lands in apps/front-app/.cloudflare/output/v0/workers/default/assets/ (the cf Build Output), and the stdout table already names every chunk in it.
  • Chunk-splitting intent lives in codeSplitting.groups of apps/front-app/vite.config.ts. Read it to name a chunk, not to change it.

Rules

  • Never edit anything. Not vite.config.ts, not a package.json, not a source file. If the fix is obvious, describe it in one line and stop - the caller decides (see .claude/rules/core/guardrails.md).
  • Distinguish a real size regression from a build failure or a missing dependency. If the build fails, report the failing command and the error, and do not report sizes.
  • Do not run pnpm build, pnpm run deploy, pnpm run upload, or any cf or wrangler command.
  • One build per invocation. Do not rebuild to "confirm" a number you already have.

Output format

At most 12 lines, no prose paragraphs:

Read the full file on GitHub · 49 lines

Changes

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.

  1. 19d ago Changed 31dd7800ac5e
  2. 27d ago Changed fc5a3c5bf581
  3. 28d ago Changed 5d5568ebd53e
  4. 1mo ago Changed · -18 lines 2815feb858b9
  5. 1mo ago First seen · 67 lines · 78 tokens per session scan A 5b5a9b0f0e28

Subscribe to this mod's changes

bundle-analyzer is an agent published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed yesterday), licensed Apache-2.0. It adds 78 tokens to every session and 735 once invoked, about $0.0003 per session on Opus 5.5. 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-30.

Related

Other agents, from other repositories

planner

Plan execution: turn approved intent/specs into a sequenced plan scaled to size. Full subagent.

griddynamics/rosetta · 23 tokens

business-analyst

Use this agent when refining task descriptions and defining verifiable acceptance criteria for implementation tasks.

NeoLabHQ/context-engineering-kit · 22 tokens

tech-writer

Creates and maintains comprehensive, accessible technical documentation by transforming complex concepts into clear, structured content that helps users accomplish their tasks.

NeoLabHQ/context-engineering-kit · 27 tokens

judge

Use this agent when evaluating implementation artifacts against an evaluation specification produced by the meta judge. Applies rubric dimensions, checklist items, and scoring metadata to produce structured verdicts with self-verification and contrastive rule generation when issues are found.

NeoLabHQ/context-engineering-kit · 48 tokens

bug-hunter

Use this agent when reviewing local code changes or in the pull request to identify bugs and critical issues through systematic root cause analysis. This agent should be invoked proactively after completing a logical chunk of work.

NeoLabHQ/context-engineering-kit · 43 tokens

test-author

Writes and maintains the repo's unit tests. Every test must name the regression it catches, or it is not written. Use after implementing a feature or fix, and before ./scripts/verify.sh. Examples - "write tests for the new billing repository", "the upload size limit changed, update the tests", "cover the tagged-error…

SeanningTatum/cf-saas-starter-react-router · 88 tokens