bun

bun is a skill for Claude Code, Codex from bendrucker/claude. It costs 34 tokens per session (503 once invoked), scanned A, original, MIT.

Reference guidance for Bun, a JavaScript and TypeScript runtime and package manager. It covers commands, dependency lockfiles, shell execution, subprocesses, and file access.

In plain words
What is it for?
Use it when running Bun commands, editing package files or bun.lock, writing TypeScript scripts for Bun, or developing Claude Code plugins.
Why use it?
It helps an agent use Bun’s command syntax and project conventions correctly instead of guessing or applying Node-specific patterns.

Skill for Claude CodeCodex

Part of the bun plugin — 1 skill shipped together

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.

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

Made for: Claude Code, Codex.

Or install bun, the plugin that ships this one along with the rest of its 1 skill.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/bendrucker/claude/bun.svg)](https://agentmods.dev/skills/bendrucker/claude/bun)
Your own site
<a href="https://agentmods.dev/skills/bendrucker/claude/bun"><img src="https://agentmods.dev/badge/skills/bendrucker/claude/bun.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00034 $0.00503
Opus 5 $0.00017 $0.00251
Sonnet 5 $0.00007 $0.00101
Haiku 4.5 $0.00003 $0.00050

Measured 5d ago against content hash 79f6a8874bfb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bun scanned grade A 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 5d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

`Bun.spawn` spawns subprocesses with streaming I/O; `Bun.spawnSync` runs synchronously. Configure stdin/stdout/stderr, environment variables, and working directory. Check `exitCode` for errors.
plugins/bun/skills/bun/SKILL.md · 49 lines

What it actually says

Bun

bunx

Put --bun before the executable name to force the Bun runtime over Node shebangs. Use -p/--package when the binary name differs from the package name (e.g., bunx -p @angular/cli ng).

See references/bunx.md

Lockfile

bun.lock is a text-based lockfile. Resolve merge conflicts by deleting it and running bun install to regenerate — never merge it.

See references/lockfile.md

Resolution

Runtime flags must precede the script path: bun --cwd ./packages/app run dev. Never use .js extensions in TypeScript imports — Bun resolves them natively.

See references/resolution.md

Shell

Bun.$ is a tagged template for shell execution. Use response methods (.text(), .json(), .lines()) to extract output, .nothrow() to handle failures without exceptions, and pipe/redirect syntax to compose commands.

See references/shell.md

Subprocess

Bun.spawn spawns subprocesses with streaming I/O; Bun.spawnSync runs synchronously. Configure stdin/stdout/stderr, environment variables, and working directory. Check exitCode for errors.

See references/spawn.md

File I/O

Bun.file() creates file handles with .text(), .json(), .arrayBuffer(), and .stream() methods. Bun.write() writes content to files or stdout/stderr. Both support streaming for large files.

See references/file-io.md

Testing

Bun runs tests in a single process. Use describe/it/test for structure, expect matchers for assertions, lifecycle hooks (beforeEach, afterEach) for setup/teardown, mock() for function mocking, and .toMatchSnapshot() for snapshot testing. Set AGENT=1 to suppress passing test output.

See references/testing.md

Files

What ships with it

7 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. 5d ago First seen · 49 lines · 34 tokens per session scan A 79f6a8874bfb

Subscribe to this mod's changes

bun is a skill published in the GitHub repository bendrucker/claude (16 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 503 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

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

better-auth

Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC features.

secondsky/claude-skills · 53 tokens

bun-bundler

This skill should be used when the user asks about "bun build", "Bun.build", "bundling with Bun", "code splitting", "tree shaking", "minification", "sourcemaps", "bundle optimization", "esbuild alternative", "building for production", "bundling TypeScript", "bundling for browser", "bundling for Node", or…

secondsky/claude-skills · 90 tokens

bun-file-io

Use for Bun file I/O: Bun.file, Bun.write, streams, directories, glob patterns, metadata.

secondsky/claude-skills · 27 tokens

bun-hot-reloading

Use when implementing hot reloading with Bun (--hot, --watch), HMR, or automatic code reloading during development. Covers watch mode, hot mode, and HTTP server reload.

secondsky/claude-skills · 42 tokens

typescript-rules

React/TypeScript frontend development rules including type safety, component design, state management, and error handling. Use when implementing React components, TypeScript code, or frontend features.

shinpr/claude-code-workflows · 39 tokens