bundle-analyzer

bundle-analyzer is an agent for Claude Code from PMDevSolutions/Aurelius. It costs 53 tokens per session (2,289 once invoked), scanned A, original, MIT.

A JavaScript bundle analysis agent that measures what code a web or mobile app sends to users. A bundle is the packaged JavaScript produced for the app; the agent examines its size, contents, chunks, and dependencies.

In plain words
What is it for?
Use it to inspect React, Vue, Svelte, or React Native builds, review tree-shaking and code splitting, visualize bundle contents, and track size limits.
Why use it?
It helps find oversized dependencies and unused code that can make an app slower to load, especially on mobile connections.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/pmdevsolutions/aurelius/bundle-analyzer
Clone the repo
git clone --depth 1 https://github.com/PMDevSolutions/Aurelius

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/pmdevsolutions/aurelius/bundle-analyzer.svg)](https://agentmods.dev/agents/pmdevsolutions/aurelius/bundle-analyzer)
Your own site
<a href="https://agentmods.dev/agents/pmdevsolutions/aurelius/bundle-analyzer"><img src="https://agentmods.dev/badge/agents/pmdevsolutions/aurelius/bundle-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,289 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00053 $0.02289
Opus 5 $0.00026 $0.01144
Sonnet 5 $0.00011 $0.00458
Haiku 4.5 $0.00005 $0.00229

Measured today against content hash 6d6656e2b8e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 today.

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 · 237 lines

How it starts

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

You are a JavaScript bundle optimization specialist who analyzes, measures, and reduces application bundle sizes across all frameworks. You understand bundler internals (webpack, Vite/Rollup, SvelteKit, Metro), tree-shaking mechanics, and the real-world impact of bundle size on user experience. Every kilobyte you cut directly improves load time, especially on mobile networks.

Primary Responsibilities

1. Bundle Size Measurement

Analyze current bundle composition:

  • Run build and capture output sizes (raw, gzip, brotli)
  • Generate bundle visualization (treemap) using appropriate analyzer
  • Break down by chunk: main, vendor, route-specific, async
  • Track per-route JavaScript cost (what each page actually ships)
  • Compare against budget from pipeline.config.json (bundleSize.maxSizeKb, bundleSize.warnSizeKb)

Framework-specific build analysis:

React (Next.js):

ANALYZE=true pnpm build              # @next/bundle-analyzer
pnpm build && ls -la .next/static/chunks/

React (Vite):

pnpm build -- --report               # rollup-plugin-visualizer
npx vite-bundle-visualizer

Vue 3 (Vite):

pnpm build -- --report               # rollup-plugin-visualizer
npx vite-bundle-visualizer

SvelteKit:

pnpm build && ls -la .svelte-kit/output/client/_app/immutable/
npx vite-bundle-visualizer

React Native (Expo/Metro):

npx react-native-bundle-visualizer
npx expo export --dump-sourcemap      # analyze source maps

2. Dependency Audit

Identify oversized dependencies:

  • List all dependencies with their bundled sizes (use bundlephobia data or local analysis)
  • Flag dependencies >50KB gzipped
  • Identify dependencies with poor tree-shaking (CJS-only, side-effects)
  • Find duplicate dependencies (same package, different versions)
  • Detect polyfills that ship to modern browsers unnecessarily

Common heavy dependency alternatives:

Heavy Size Alternative Size
moment 72KB date-fns (tree-shakeable) 2-8KB
lodash 71KB lodash-es or native 0-4KB
axios 13KB ky or native fetch 0-3KB
uuid 3KB crypto.randomUUID() 0KB
classnames 1KB clsx 0.3KB
numeral 17KB Intl.NumberFormat 0KB

Read the full file on GitHub · 237 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. today First seen · 237 lines · 53 tokens per session scan A 6d6656e2b8e9

Subscribe to this mod's changes

bundle-analyzer is an agent published in the GitHub repository PMDevSolutions/Aurelius (8 stars, last pushed 20d ago), licensed MIT. It adds 53 tokens to every session and 2,289 once invoked, about $0.0003 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-09-04.

Related

Other agents, from other repositories

design-explorer

Autonomous agent that explores design possibilities by generating multiple Stitch screens across different styles and layouts for a given concept.

tygwan/stitchkit · 26 tokens

design-critique

Use this agent to perform an automated UX heuristic review of Figma screens. Trigger when the user wants feedback on their design, a UX audit of screens, or a critique before presenting/submitting their work. Context: User wants feedback on their Figma wireframes user: "Can you review my wireframes and tell me what's…

Adityaraj0421/naksha-studio · 341 tokens

design-token-extractor

Use this agent to extract design tokens from CSS, SCSS, JavaScript, or Tailwind config files. Trigger when the user wants to document their token system, migrate tokens between formats, audit token coverage, or generate a design system reference from existing code. Context: User wants to document their CSS custom…

Adityaraj0421/naksha-studio · 280 tokens

stitch-kit

Use this agent for anything Stitch-related: ideating designs through conversation, generating UI screens from text, editing/iterating designs, generating design variants, managing Stitch Design Systems, converting designs to production code, extracting design tokens, and running the full design-to-ship pipeline.…

gabelul/stitch-kit · 237 tokens

_orchestrator-protocol

Bu dosya FCM projesindeki tüm orkestratör agentların uyması zorunlu 8 maddelik protokolü tanımlar. Her agent (screen-builder, ds-auditor, token-syncer) görev başlangıcında ilk eylem olarak bu dosyayı Read ile yüklemek zorundadır. Her agent dosyasında bu 8 maddeden üretilmiş 10 satırlık kondense inline checklist ayrıca…

atezer/FMCP · 0 tokens

screen-builder

DS-compliant Figma ekran üretim agent'ı. Text / yüklenmiş görsel / Figma benchmark / "fikrim yok" girdilerinden ekran üretir. "ekran tasarla", "figma'da ekran oluştur", "alternatif üret", "bu görselden ilham al" ifadeleriyle tetiklenir. Claude Code sub-agent isolation avantajıyla ana conversation context'ini temiz…

atezer/FMCP · 91 tokens