bunlisted
Install: claude install-skill Claudient/Claudient
# Bun Skill
## When to activate
- Building a new API or service with Bun as the runtime
- Using Elysia framework (the Hono/Express equivalent for Bun)
- Migrating a Node.js application to Bun for performance gains
- Using Bun's built-in SQLite for edge or embedded databases
- Setting up Bun's built-in test runner (no Jest needed)
## When NOT to use
- Cloudflare Workers — use the hono skill (Bun runs on servers, not Cloudflare edge)
- Next.js projects — Next.js uses Node.js; Bun compatibility is improving but not complete
- Projects with native Node.js addons that don't support Bun yet
## Instructions
### Project setup
```bash
# Install Bun
curl -fsSL https://bun.sh/install | bash
# Create a new project
mkdir my-api && cd my-api
bun init # creates package.json, index.ts, tsconfig.json
# Or scaffold with Elysia
bun create elysia my-api
cd my-api && bun install
# Run
bun run index.ts # or: bun index.ts
bun --watch index.ts # hot reload
# Package management (drop-in npm replacement, 10-100x faster)
bun install # install from package.json
bun add express # add a package
bun remove express # remove a package
bun update # update all
```
### Bun native HTTP server
```typescript
Build a Bun HTTP server for [use case].
// index.ts — Bun's built-in server (no framework needed for simple APIs)
const server = Bun.serve({
port: 3000,
hostname: '0.0.0.0',
async fetch(req) {
const url = new URL(req.url)
// Ro