bun

bun is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 80 tokens per session (4,850 once invoked), scanned A, original, MIT.

A guide for building software with Bun, a JavaScript and TypeScript runtime that also includes a package manager, test runner, bundler, and built-in utilities.

In plain words
What is it for?
Creating TypeScript applications, running tests, managing packages, bundling code, using SQLite or WebSockets, writing shell scripts, and choosing between Bun, Node.js, and Deno.
Why use it?
It helps developers choose Bun's built-in features consistently and decide when Node.js or Deno would be a better fit.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { orderService } from '../../src/services/order.service';.

Good fit Creating TypeScript applications, running tests, managing packages, bundling code, using SQLite or WebSockets, writing shell scripts, and choosing between Bun, Node.js, and Deno.

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/j4flmao/agent-skills
agentmods
npx agentmods add skills/j4flmao/agent-skills/bun

Made for: Claude Code, Codex.

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/j4flmao/agent-skills/bun/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/bun)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/bun"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/bun/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/bun"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/bun.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,850 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 125
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Excessive Agency · line 98
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00080 $0.04850
Opus 5 $0.00040 $0.02425
Sonnet 5 $0.00016 $0.00970
Haiku 4.5 $0.00008 $0.00485

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

Security

Grade A, and why

bun scanned grade A with 2 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 8d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(req: Request) {

Runs shell commandslowCapability

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

| Shell scripting | Bun.shell (built-in) | execa/child_process | Deno.Command |
skills/backend/bun/SKILL.md · 601 lines

How it starts

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

Bun

Purpose

Build high-performance TypeScript/JavaScript applications with Bun runtime — built-in APIs, test runner, package manager, bundler, and shell scripting.

Architecture Decision Trees

Runtime Selection: Bun vs Node.js vs Deno

Criterion Bun Node.js Deno
Startup time ~5ms ~50ms ~20ms
npm compatibility ~95% 100% ~80%
TypeScript native Yes (transpiled) No (ts-node/esbuild) Yes (compiled)
Built-in APIs SQLite, fetch, WebSocket, password hashing None (npm) Web APIs, KV, FFI
Test runner Built-in (Jest-compatible) Mocha/Jest/Vitest Built-in
Bundler Built-in (esbuild-level) esbuild/webpack/rollup Built-in
Package manager Built-in (10x faster) npm/pnpm/yarn Custom
Shell scripting Bun.shell (built-in) execa/child_process Deno.Command
Windows support Experimental (native) Mature Mature
Docker image size ~200MB ~350MB ~200MB

Decision: Bun for new projects prioritizing DX and speed. Node.js for max ecosystem compatibility. Deno for security-first or edge computing.

Server Framework Decision

Criterion Bun.serve (raw) Elysia Hono Express (compat)
Performance ~100k req/s ~80k req/s ~90k req/s ~30k req/s
Bundle size 0 Tiny Tiny Medium
TypeScript Manual Full (Eden) Full (TypeBox) Partial
Plugins None Rich Growing Largest
Learning curve Low Medium Low Low
Best for APIs, microservices Full-stack TypeScript Edge, Workers, API Migration from Node

Decision: Elysia for new full-stack TypeScript apps. Bun.serve for minimal APIs. Hono for edge/Cloudflare Workers.

Bun.sqlite vs External DB

Criterion Bun.sqlite PostgreSQL MySQL
Latency <1ms (in-process) 1-5ms (network) 1-5ms (network)
Concurrent writes WAL mode (good) Excellent Excellent
Data size <100GB practical Unlimited Unlimited
Replication None Streaming + cascading Group replication
Full-text search FTS5 built-in tsvector Fulltext index
Backup .backup command pg_dump/WAL archiving mysqldump

Read the full file on GitHub · 601 lines

Files

What ships with it

6 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. 8d ago First seen · 601 lines · 80 tokens per session scan A b2a48a1b60d9

Subscribe to this mod's changes

bun is a skill published in the GitHub repository j4flmao/agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 80 tokens to every session and 4,850 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, 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

nifra

Use when writing, reviewing, or debugging code in a Nifra project (@nifrajs/ packages, nifra CLI, server()/defineContract, loaders and actions, file routes under routes/). Explains how to reach Nifra's live MCP tools so signatures come from the installed version instead of memory, and which sibling skill to load for…

nifrajs/nifra · 83 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/federal-reserve-mcp-server · 54 tokens

bun

Bun all-in-one JavaScript runtime and toolkit reference. Covers runtime APIs (file I/O, HTTP server, SQLite, shell), ultra-fast package manager, built-in bundler with plugins, test runner with mocking, TypeScript support, and Node.js compatibility.

bytesagain/ai-skills · 55 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/earthquake-mcp-server · 54 tokens

api-utils

API reference for all utilities exported from @cyanheads/mcp-ts-core/utils. Use when looking up utility method signatures, options, peer dependencies, or usage patterns.

cyanheads/faa-aircraft-registry-mcp-server · 37 tokens

adapter-express

Mount tRPC as Express middleware with createExpressMiddleware() from @trpc/server/adapters/express. Access Express req/res in createContext via CreateExpressContextOptions. Mount at a path prefix like app.use('/trpc', ...). Avoid global express.json() conflicting with tRPC body parsing for FormData.

trpc/trpc · 67 tokens