# Bun Runtime

> Bun runtime management, scripting, package management, and server deployment. Use when this capability is needed.

- Skill: `tomevault-io/bun-runtime-2` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/bun-runtime-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/bun-runtime-2/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/bun-runtime-2

---

# Bun Skill

Use Bun as the fastest JavaScript/TypeScript runtime. Package management, bundling, testing, and servers.

## Core Principles
- **Bun is drop-in Node.js replacement** + faster.
- Native **TypeScript**, **JSX**, **fetch**, **WebSocket** support.
- **Zero-config** bundling/testing/watch.

## Modular Behaviors
- **Project Setup**: `bun init -y`. `bun add <pkg>` replaces `npm`. `bun install` once.
- **Scripts**: `bun run dev` (auto watch/restart). `bun build` for production.
- **Package Management**: `bun add -d typescript @types/node`. Lockfile is `bun.lockb`.
- **Servers**: `Bun.serve({ port: 3000, fetch(req) { ... } })`. Native WebSocket support.
- **Testing**: `bun test` (native vitest). `--watch` for dev.
- **TypeScript**: No `tsconfig.json` needed. Native `.tsx` support.
- **Database**: `bun:sqlite` for local dev. Migrate with `drizzle-kit`.
- **Deployment**: `bun build --target=bun ./index.ts --outfile=app.js`. Docker: `FROM oven/bun`.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/ultraxn) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-14 -->

