15-production-bundle — Claude Code prompt: what it does
15-production-bundle is a Claude Code prompt for configuring production bundling and packaging of CLI tools for Node.js 20+ and Bun 1.1+.
no license ★ 3,444 updated 2026-10-14
.claude/commands/15-production-bundle.mdWhat 15-production-bundle does
This prompt guides Claude Code through refining the production pipeline in scripts/build-bundle.ts. It enforces tree shaking to drop internal branches, sets build-time replacements via define, turns on minification, and attaches external source maps. Target runtimes are specifically locked to Bun 1.1+ and Node.js 20+.
The workflow details how to emit an executable dist/cli.mjs, create packaging helpers for npm, build an Alpine Docker image, and run end-to-end checks. Target bundle size stays under 10 MB, aiming below 5 MB. If Bun or Node.js are missing from your environment, verification commands will fail.
What it helps with
- configure esbuild for CLI minification and dead code removal
- package distribution assets for npm registries
- assemble a minimal multi-stage Alpine Dockerfile
- automate build verification checks inside a CI shell script
Example prompts for the agent
- Execute the production packaging steps from 15-production-bundle.md
- Configure esbuild replacements and minification following 15-production-bundle
- Generate the Dockerfile and CI test script outlined in 15-production-bundle
How to install 15-production-bundle
Manually: put the files in place
.claude/commands/15-production-bundle.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about 15-production-bundle
How to install 15-production-bundle in Claude Code?
Place the file into your repository under .claude/commands/15-production-bundle.md.
What does 15-production-bundle do?
It provides Claude Code with explicit tasks for build optimization, single-file bundling, packaging, and CI testing.
What dependencies does this build setup require?
The configuration targets Node.js 20+ and Bun 1.1+, using esbuild under the hood.