bundle-build-audit

Audits build pipeline configuration and bundle output against an opinionated baseline.

3|5|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/BenSheridanEdwards/ArchitectPlaybook --skill bundle-build-audit-bensheridanedwards
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bundle-build-audit
Source: https://github.com/BenSheridanEdwards/ArchitectPlaybook/tree/main/bundle-build-audit
Command: npx skills add https://github.com/BenSheridanEdwards/ArchitectPlaybook --skill bundle-build-audit-bensheridanedwards

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend build pipelines and bundle output often drift from best practices silently: oversized bundles, missing code splitting, unpinned build tools, and absent CI size budgets. This Skill statically audits a TypeScript frontend's build configuration, bundle composition, asset hygiene, and build performance against an opinionated baseline, then offers an implementation plan for the gaps. ## Core Features & Use Cases - Four-layer audit: Checks build configuration soundness, bundle composition and size, asset and dependency hygiene, and build performance, each graded as present, partial, missing, or violation. - Static-first with optional stats enrichment: Runs fully read-only by default; pass --with-stats to consume an existing bundle-stats artefact (webpack-bundle-analyzer, rollup-plugin-visualizer, @next/bundle-analyzer) for real size numbers. - Two-phase workflow: Writes findings.md, findings.json, snapshot.md, and metadata.json to .architect-audits/bundle-build-audit/, then asks before generating a descriptive implementation plan. - Use Case: Run /bundle-build-audit --with-stats on a Vite React app to discover that lodash is imported as a default import in four files, the initial bundle exceeds 250kb gzipped, and no bundle-size budget is enforced in CI, then generate a remediation plan. ## Quick Start Ask the AI to run /bundle-build-audit on this repository to audit the build pipeline and bundle output, optionally adding --with-stats if a bundle-stats artefact exists.

Frequently Asked Questions about bundle-build-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit bundle size and build configuration in a Vite or Next.js project?▼

Run /bundle-build-audit in the project root. It statically reads your build config, package.json, lockfiles, and CI workflows, then grades checks across four layers and writes findings to .architect-audits/bundle-build-audit/.

How do I get real bundle size numbers instead of static estimates?▼

Pass --with-stats after producing a stats artefact with a bundle analyser such as webpack-bundle-analyzer, rollup-plugin-visualizer, or @next/bundle-analyzer. The skill reads the artefact from conventional paths or a custom --stats-path.

Which build tools does bundle-build-audit support?▼

It supports Vite, Next.js (App Router and Pages Router), Remix, Create React App, plain Webpack, plain Rollup, and Turbopack. Parcel and direct esbuild app builds are out of scope; unsupported tools degrade to partial evaluation of tool-independent checks.

Does the audit run the build or modify my project files?▼

No. The audit is fully read-only and never executes the build, installs packages, or modifies files outside .architect-audits/bundle-build-audit/. The implementation plan it optionally generates is descriptive only.

Can I change the default bundle size and build time thresholds?▼

Yes. Use --threshold-initial-bundle, --threshold-total-bundle, --threshold-build-time, and --threshold-incremental-build-time with human-friendly units like 300kb or 90s. Defaults are 250kb initial, 1mb total, 60s clean build, and 10s incremental.

What happens when --with-stats is set but no stats artefact exists?▼

The audit continues with stats-required checks degraded to partial and records the searched paths in the snapshot. It suggests running /preflight --audit=bundle-build --install to add a bundle analyser, then building and re-running.