bun-bundler

bun-bundler is a skill for Claude Code from secondsky/claude-skills. It costs 90 tokens per session (2,022 once invoked), scanned A, original, MIT.

A guide to Bun's tool for combining JavaScript and TypeScript files into deployable output. It covers browser, Bun, and Node targets, along with splitting, minifying, and source maps.

In plain words
What is it for?
Use it to bundle applications, workers, and libraries, create multiple entry points, and prepare smaller production files.
Why use it?
It removes the need to assemble separate build-tool settings for production bundles.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bun build ./src/index.ts --outdir ./dist.

Part of the bun plugin — 27 skills, 6 commands, 3 agents, 2 hooks shipped together

not rated 217repo +3 today A scan Socket: passSnyk: passSkillSpector: pass 90 tokens original MIT

Good fit Use it to bundle applications, workers, and libraries, create multiple entry points, and prepare smaller production files.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills
agentmods
npx agentmods add skills/secondsky/claude-skills/bun-bundler

Made for: Claude Code.

Or install bun, the plugin that ships this one along with the rest of its 27 skills, 6 commands, 3 agents, 2 hooks.

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-bundler

README.md
[![agentmods](https://agentmods.dev/badge/skills/secondsky/claude-skills/bun-bundler/github.svg)](https://agentmods.dev/skills/secondsky/claude-skills/bun-bundler)
Your own site
<a href="https://agentmods.dev/skills/secondsky/claude-skills/bun-bundler"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/bun-bundler/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-bundler

Your own site · 80×15
<a href="https://agentmods.dev/skills/secondsky/claude-skills/bun-bundler"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/bun-bundler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,022 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 3 Apr 2026
  • Snyk pass 3 Apr 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00090 $0.02022
Opus 5 $0.00045 $0.01011
Sonnet 5 $0.00018 $0.00404
Haiku 4.5 $0.00009 $0.00202

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

Security

Grade A, and why

bun-bundler scanned grade A with 0 findings 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 7d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/bun/skills/bun-bundler/SKILL.md · 330 lines

How it starts

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

Bun Bundler

Bun's bundler is a fast JavaScript/TypeScript bundler built on the same engine as Bun's runtime. It's an esbuild-compatible alternative with native performance.

Quick Start

CLI

# Basic bundle
bun build ./src/index.ts --outdir ./dist

# Production build
bun build ./src/index.ts --outdir ./dist --minify

# Multiple entry points
bun build ./src/index.ts ./src/worker.ts --outdir ./dist

JavaScript API

// Since Bun 1.2, Bun.build REJECTS on failure (throws).
// Wrap in try/catch to handle errors; pass { throw: false } to restore the
// old resolve-with-{ success, logs } contract if you prefer that style.
try {
  const result = await Bun.build({
    entrypoints: ["./src/index.ts"],
    outdir: "./dist",
  });
  console.log(`Built ${result.outputs.length} files`);
} catch (err) {
  console.error("Build failed:", err);
  process.exit(1);
}

Bun.build Options

await Bun.build({
  // Entry points (required)
  entrypoints: ["./src/index.ts"],

  // Output directory
  outdir: "./dist",

  // Target environment
  target: "browser",  // "browser" | "bun" | "node"

  // Output format
  format: "esm",  // "esm" | "cjs" | "iife"

  // Minification
  minify: true,  // or { whitespace: true, identifiers: true, syntax: true }

  // Code splitting
  splitting: true,

  // Source maps
  sourcemap: "external",  // "none" | "inline" | "external" | "linked"

  // Naming patterns
  naming: {
    entry: "[dir]/[name].[ext]",
    chunk: "[name]-[hash].[ext]",
    asset: "[name]-[hash].[ext]",
  },

  // Define globals
  define: {
    "process.env.NODE_ENV": JSON.stringify("production"),
  },

  // External packages
  external: ["react", "react-dom"],

  // Loaders
  loader: {
    ".svg": "text",
    ".png": "file",
  },

  // Plugins
  plugins: [myPlugin],

  // Root directory
  root: "./src",

  // Public path for assets
  publicPath: "/static/",
});

CLI Flags

bun build <entrypoints> [flags]
Flag Description
--outdir Output directory
--outfile Output single file
--target browser, bun, node
--format esm, cjs, iife
--minify Enable minification
--minify-whitespace Minify whitespace only
--minify-identifiers Minify identifiers only
--minify-syntax Minify syntax only
--splitting Enable code splitting
--sourcemap none, inline, external, linked
--external Mark packages as external
--define Define compile-time constants
--loader Custom loaders for extensions
--public-path Public path for assets
--root Root directory
--entry-naming Entry point naming pattern
--chunk-naming Chunk naming pattern
--asset-naming Asset naming pattern

Read the full file on GitHub · 330 lines

Files

What ships with it

1 file 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. 7d ago First seen · 330 lines · 90 tokens per session scan A f4ee876e535d

Subscribe to this mod's changes

bun-bundler is a skill published in the GitHub repository secondsky/claude-skills (217 stars, last pushed today), licensed MIT. It adds 90 tokens to every session and 2,022 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

avoid-for

Avoid for loops (C-style, for...of, for...in) in TypeScript/JavaScript. Prefer higher-order Array methods like map, filter, find, some, every, reduce. Use when writing or reviewing loops or iteration over arrays, objects, Map, Set, or String.

ncaq/konoka · 63 tokens

async-state-type

Avoid contradictory state types for async data fetching. Use Suspense or discriminated unions instead. Use when writing or reviewing async data fetching code in React/TypeScript.

ncaq/konoka · 37 tokens

file-naming

File and directory naming conventions for TypeScript/JavaScript projects. Use when creating new files or directories.

ncaq/konoka · 25 tokens

senior-frontend

Frontend development skill for React, Next.js, TypeScript, and Tailwind CSS applications. Use when building React components, optimizing Next.js performance, analyzing bundle sizes, scaffolding frontend projects, implementing accessibility, or reviewing frontend code quality.

composio-community/awesome-claude-plugins · 52 tokens

nextjs-typescript-engineer

This skill should be used when the user asks to "set up a Next.js TypeScript project", "define code conventions", "organize project structure", "implement component patterns", "enforce type safety", or mentions "next.js project", "typescript convention", "code style", "project structure", "component pattern", "api…

iwritec0de/app-dev · 102 tokens

frontend-ai-guide

Applies React/TypeScript-specific technical decision criteria, anti-pattern detection, debugging, and frontend quality gates. Use when reviewing components, hooks, browser behavior, or frontend implementation completeness.

shinpr/claude-code-workflows · 41 tokens