bun-build

bun-build is a skill for Claude Code from DaleSeo/bun-skills. It costs 41 tokens per session (2,184 once invoked), scanned C, original, MIT.

A build setup for using Bun's built-in tool to turn application or library source files into production bundles.

In plain words
What is it for?
Use it to configure browser, Node.js, Bun, or command-line builds, including minification, code splitting, plugins, and source maps.
Why use it?
It helps replace separate bundlers such as webpack, esbuild, or Rollup and organize output for different environments and formats.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to configure browser, Node.js, Bun, or command-line builds, including minification, code splitting, plugins, and source maps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/daleseo/bun-skills/bun-build
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.

Any agent
npx skills add DaleSeo/bun-skills --skill bun-build
Clone the repo
git clone --depth 1 https://github.com/DaleSeo/bun-skills

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 bun-build

README.md
[![agentmods](https://agentmods.dev/badge/skills/daleseo/bun-skills/bun-build/github.svg)](https://agentmods.dev/skills/daleseo/bun-skills/bun-build)
Your own site
<a href="https://agentmods.dev/skills/daleseo/bun-skills/bun-build"><img src="https://agentmods.dev/badge/skills/daleseo/bun-skills/bun-build/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bun-build

Your own site · 80×15
<a href="https://agentmods.dev/skills/daleseo/bun-skills/bun-build"><img src="https://agentmods.dev/badge/skills/daleseo/bun-skills/bun-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,184 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00041 $0.02184
Opus 5 $0.00020 $0.01092
Sonnet 5 $0.00008 $0.00437
Haiku 4.5 $0.00004 $0.00218

Measured 11d ago against content hash da3f5018107e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade C, and why

bun-build scanned grade C with 1 finding 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 11d ago.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

"clean": "rm -rf dist"
skills/bun-build/SKILL.md · 393 lines

How it starts

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

Bun Production Build Configuration

Set up production builds using Bun's native bundler - fast, optimized bundle creation without webpack or esbuild.

Quick Reference

For detailed patterns, see:

  • Build Targets: targets.md - Browser, Node.js, library, CLI configurations
  • Optimization: optimization.md - Tree shaking, code splitting, analysis
  • Plugins: plugins.md - Custom loaders and transformations

Core Workflow

1. Check Prerequisites

# Verify Bun installation
bun --version

# Check project structure
ls -la package.json src/

2. Determine Build Requirements

Ask the user about their build needs:

  • Application Type: Frontend SPA, Node.js backend, CLI tool, or library
  • Target Platform: Browser, Node.js, Bun runtime, or Cloudflare Workers
  • Output Format: ESM (modern), CommonJS (legacy), or both

3. Create Basic Build Script

Create build.ts in project root:

#!/usr/bin/env bun

const result = await Bun.build({
  entrypoints: ['./src/index.ts'],
  outdir: './dist',
  target: 'browser', // or 'node', 'bun'
  format: 'esm', // or 'cjs', 'iife'
  minify: true,
  splitting: true,
  sourcemap: 'external',
});

if (!result.success) {
  console.error('Build failed');
  for (const message of result.logs) {
    console.error(message);
  }
  process.exit(1);
}

console.log('✅ Build successful');
console.log(`📦 ${result.outputs.length} files generated`);

// Show bundle sizes
for (const output of result.outputs) {
  const size = (output.size / 1024).toFixed(2);
  console.log(`  ${output.path} - ${size} KB`);
}

4. Configure for Target Platform

For Browser/Frontend:

await Bun.build({
  entrypoints: ['./src/index.tsx'],
  outdir: './dist',
  target: 'browser',
  format: 'esm',
  minify: true,
  splitting: true,
  define: {
    'process.env.NODE_ENV': '"production"',
  },
  loader: {
    '.png': 'file',
    '.svg': 'dataurl',
    '.css': 'css',
  },
});

Read the full file on GitHub · 393 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 393 lines · 41 tokens per session scan C da3f5018107e

Subscribe to this mod's changes

bun-build is a skill published in the GitHub repository DaleSeo/bun-skills (4 stars, last pushed 7mo ago), licensed MIT. It adds 41 tokens to every session and 2,184 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

opengeni-sites

Build, inspect, edit, validate, and publish OpenGeni Sites as ordinary Bun + React source projects compiled to one self-contained HTML artifact. Use for interactive pages, dashboards, visualizations, workflows, and focused apps that may call workspace tools through the typed Site bridge.

Cloudgeni-ai/opengeni · 60 tokens

frontend-philosophy

Visual & UI philosophy (The 5 Pillars of Intentional UI). Understand deeply to avoid "AI slop" and create distinctive, memorable interfaces.

kdcokenny/ocx · 36 tokens

tauri-django-react

Agents should invoke this skill for Tauri + Django + React desktop apps, especially backend lifecycle, CORS/auth, frontend integration, mandatory light/dark theming, German/English i18n, build packaging, dual desktop/web deployment, Rust commands, and platform-specific gotchas.

Firstp1ck/pi-coding-agent-forge · 63 tokens

shoo-auth

Use when evaluating, implementing, reviewing, or debugging Shoo auth (shoo.dev) Google sign-in in browser apps, including @shoojs/react, @shoojs/auth, hosted shoo.js, Convex custom JWT integration, PKCE callbacks, session checks, and server-side idtoken verification. Do not use for unrelated auth systems.

Firstp1ck/pi-coding-agent-forge · 75 tokens

frontend-design

Use when building or reviewing any frontend interface. Covers the full design lifecycle: context detection, pre-build planning, design laws (OKLCH color, theme forcing function, layout rhythm, absolute bans on AI-slop patterns), implementation guidance, and visual verification. Use for landing pages, dashboards…

marcusrbrown/systematic · 73 tokens

frontend-design

Use when building a new web interface or reshaping an existing one. Guides distinctive visual direction, typography, layout, motion, and interface copy without falling back to templated AI design.

Firstp1ck/pi-coding-agent-forge · 40 tokens