# 15-production-bundle

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+.

- prompt · `type=prompt` · Claude Code, ChatGPT · ★ 3444 repo stars
- Author: codeaashu
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codeaashu/claude-code/tree/HEAD/prompts/15-production-bundle.md
- Updated: 2026-10-14
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/prompts/15-production-bundle

## What it 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.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/15-production-bundle.md`

### ChatGPT

**How to use**
- Paste the text at the start of a chat or into project instructions

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/codeaashu/claude-code/tree/HEAD/prompts/15-production-bundle.md

## When to use it
- 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
- 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

## Similar
- [bundle-analyzable-paths](https://affpapa.org/en/nevibecode/rules/bundle-analyzable-paths.md) — rule · ★ 1216 repo stars
- [bundle-safety](https://affpapa.org/en/nevibecode/skills/bundle-safety.md) — skill · ★ 539 repo stars
- [devbox](https://affpapa.org/en/nevibecode/skills/devbox.md) — skill · ★ 341 repo stars
- [bun-runtime](https://affpapa.org/en/nevibecode/skills/bun-runtime.md) — skill · 6500 installs
- [bun-bundler](https://affpapa.org/en/nevibecode/skills/bun-bundler.md) — skill · 420 installs
- [docker-compose-production](https://affpapa.org/en/nevibecode/skills/docker-compose-production.md) — skill · 487 installs

From the same set: [codeaashu/claude-code](https://affpapa.org/en/nevibecode/by/codeaashu/claude-code.md) — 17 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
