bundle-analyzer

bundle-analyzer is an agent for Claude Code from louisbrulenaudet/monorepo-template. It costs 78 tokens per session (728 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.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.svg" alt="Measured on agentmods" 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 728 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.00728
Opus 5 $0.00039 $0.00364
Sonnet 5 $0.00016 $0.00146
Haiku 4.5 $0.00008 $0.00073

Measured 8d ago against content hash 5b5a9b0f0e28, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 8d 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 · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 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 build prints one line per emitted chunk with raw, gzip, and brotli sizes (reportCompressedSize and rollup-plugin-visualizer are both configured with gzipSize/brotliSize). Rank from that table.
  • Do not try to read dist/stats.html. The visualiser writes a treemap there for a human to open in a browser, and permissions.deny blocks Read(**/dist/**) repo-wide, so the attempt will fail. That deny rule is intentional - do not work around it with cat, grep, or a script, and do not ask for it to be relaxed.
  • Chunk-splitting intent lives in apps/front-app/vite.config.ts (vendor chunks: react, tanstack-router, tanstack-query, workspace packages, catch-all node_modules). 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 deploy, or wrangler anything.
  • One build per invocation. Do not rebuild to "confirm" a number you already have.

Output format

At most 12 lines, no prose paragraphs:

Total (gzip): <size>   Chunks: <n>
Largest:
  <chunk> - <raw> / <gzip>
  … up to 5 entries, descending
Over threshold (>100 kB gzip): <chunk names, or "none">
Duplicated across chunks: <dependency names, or "none">
Note: <one line, only if something is actionable>

Read the full file on GitHub · 67 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. 8d 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 7d ago), licensed Apache-2.0. It adds 78 tokens to every session and 728 once invoked, about $0.0004 per session on Opus 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

ui-builder

Builds and changes UI in this repo — routes, components, marketing surfaces, forms, tables, empty/loading/error states. Carries the frontend rules, the craft moves and the anti-slop tells so the mistakes are not made in the first place, and self-measures with design:audit before returning. Use for ANY user-visible…

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

accessibility-checker

Reviews code for accessibility (a11y) compliance, ensuring WCAG standards and best practices are met. Use to ensure accessibility standards are met.

HKTITAN/cursor-best-practices · 34 tokens

contracts-reviewer

Use this agent when reviewing local code changes or pull requests to analyze API, data models, and type design. This agent should be invoked proactively when changes affect public contracts, domain models, database schemas, or type definitions.

NeoLabHQ/context-engineering-kit · 48 tokens

change-failure-agent

Use this agent to rate each changed file based on 2 criteria and output final list of 10 files that require most attention.

NeoLabHQ/context-engineering-kit · 31 tokens

migrator

Handles code migrations including framework upgrades, API changes, and systematic refactoring with careful change tracking. Use for dedicated migration tasks with validation.

HKTITAN/cursor-best-practices · 31 tokens

seo-agent

Search visibility and Core Web Vitals specialist. Expert in semantic HTML, schema markup, and performance optimization. Use for search visibility and on-page SEO.

mikailustuner/OmniRule · 33 tokens