Vite · inspect by default

/vite-bundle

Analyze bundle composition and measured size reductions

Use for bundle composition and size; vite-chunks focuses on loading boundaries.

Make it your own.

In Claude Code, use the slash command and add your context. In Codex, select vite-bundle from the just-vibe skill picker, then send the same brief.

Version 0.11.0 also supports /jv vite-bundle, /just-vibe vite-bundle and /jv:vite-bundle in Claude. See shortcut setup and context examples.

Example · inspect
/just-vibe:vite-bundle Analyze the supplied production bundle statistics and prioritize size reductions.
edge · apply
/just-vibe:vite-bundle Reduce initial bytes without breaking a lazily loaded editor.
blocked · inspect
/just-vibe:vite-bundle Review available bundle stats without installing an analyzer or inventing timing gains.

What the agent does

  1. Record the installed versions, command, mode, route and baseline artifact. Separate raw output, compressed size and actual transferred bytes; compare equivalent build and cache conditions.
  2. Trace a large or duplicate module to imports and the user journey that loads it. Distinguish startup cost from total application cost and verify whether an existing lazy boundary is defeated by an eager import.
  3. Choose a focused change based on the observed cost. Splitting a module can add a waterfall or alter side-effect order; avoid generic manual-chunk rules or removing dependencies solely because they are large.
  4. Build and exercise affected entry/lazy routes, direct navigation and failure recovery. Report comparable before/after measurements plus functional checks; a smaller output file alone does not prove faster interaction.

Inputs

  • saved build stats/artifacts and size/performance goal.

Optional context: scope, references, constraints, successCriteria, environment, mode, budget.

Scope

Reads
Bundle composition and measured reductions, not arbitrary dependency removal.
Writes
Inspect/plan: inspect or propose; save requested artifacts only. Apply: edit the requested local implementation and perform relevant bounded checks while preserving unrelated work. Live data changes, remote actions and paid jobs require their resolved target and existing session authorization.
Mode
Inspect for analysis; apply for a requested size change. Requires saved build stats/artifacts and a size/performance goal; a comparison build is bounded local execution with output in an owned temporary directory.
Prerequisites
Project manifests, lockfile, Vite/framework/plugin versions, and existing build scripts. Verify current version-specific documentation when changing configuration. Requested isolated verification may generate disposable build/cache artifacts; inspect their scripts first and preserve product files.

Expected output

  • Size breakdown, cause, changes made in apply mode, and comparable before/after results.
  • Import path, size metric, loaded route and before/after build conditions.

How the work is checked

  • Measurements share build/mode/version assumptions, and affected initial and lazy routes still load correctly. Raw bytes are not mislabeled as transfer size or user-perceived performance.

When to stop or clarify

  • Do not equate smaller bytes with faster UX without timing evidence. Missing stats limit numerical conclusions.

Handling missing context

Infer
Read manifests, lockfile, installed Vite/plugins, entry points, aliases, modes and current build scripts.
Assume
Preserve existing tooling and base-path conventions; in apply mode, make a local focused change when the brief identifies the behavior, and otherwise propose it.
Ask
Ask if the intended serving subpath or deployment target cannot be inferred and would change generated URLs; do not ask for versions present in the lockfile.

Technical guidance

Evidence
Read production stats or source maps, entry imports and real route loading with identical build conditions.
Method
Attribute large modules to reachable imports and compare raw, compressed and transferred sizes separately.
Pitfall
Removing a named import or counting source file sizes does not prove tree-shaking or network improvement.
Check
Rebuild and exercise representative routes; record comparable bytes and loading behavior, including any new lazy-load waterfall.

Situational decisions

When a dependency is large but loaded only after an optional interaction: Measure its contribution to that interaction rather than attributing it to initial load.

The coding agent follows this workflow using its available tools. Installation does not grant service access or guarantee an outcome. Read the compatibility notes.

Keep exploring