From bun
Provides Bun runtime guidance including bunx, shell scripting, lockfile management, resolution, and testing patterns. Use when working with Bun projects or needing Bun-specific advice.
How this skill is triggered — by the user, by Claude, or both
Slash command
/bun:bun-runtimeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides comprehensive guidance for working with the Bun runtime.
This skill provides comprehensive guidance for working with the Bun runtime.
Use this skill when:
mise install bun to manage Bun versions| Instead of | Use |
|---|---|
node file.ts | bun file.ts |
npx package | bunx package |
npm install | bun install |
npm run script | bun run script |
jest / vitest | bun test |
dotenv | Built-in (auto-loads .env) |
For detailed guidance on specific topics, load the appropriate reference:
references/bunx.mdreferences/lockfile.mdreferences/resolution.mdreferences/shell.mdreferences/testing.md# Install latest Bun
mise install bun
# Install specific version
mise install [email protected]
# Set global default
mise use -g bun@latest
# Project-specific version (creates .mise.toml)
mise use [email protected]
// File I/O
const file = Bun.file("path/to/file");
const text = await file.text();
await Bun.write("output.txt", "content");
// Shell commands
const result = await Bun.$`ls -la`;
// HTTP server
Bun.serve({
port: 3000,
fetch(req) {
return new Response("Hello!");
},
});
// SQLite
import { Database } from "bun:sqlite";
const db = new Database("mydb.sqlite");
// Testing
import { test, expect } from "bun:test";
# No compilation step needed
bun run src/index.ts
# With watch mode
bun --watch src/index.ts
# With hot reload (for servers)
bun --hot src/server.ts
Bun auto-loads .env files:
# .env is loaded automatically
bun run script.ts
# Specify different env file
bun --env-file=.env.local run script.ts
{
"scripts": {
"dev": "bun --hot src/index.ts",
"test": "bun test",
"build": "bun build src/index.ts --outdir dist"
}
}
| Issue | Solution |
|---|---|
| Module not found | Check references/resolution.md |
| Lockfile conflicts | Check references/lockfile.md |
| bunx package fails | Check references/bunx.md |
| Tests not running | Check references/testing.md |
Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub meaganewaller/marketplace --plugin bun