[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M785VWVXEPQCSZVTCP0541TF":3,"skill-same:01M785VWVXEPQCSZVTCP0541TF":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M785VWVXEPQCSZVTCP0541TF","bun",null,"Fast JavaScript runtime and all-in-one toolchain for building and deploying applications. Use Bun for package management, running TypeScript\u002FJSX directly, testing, bundling, building HTTP servers with Bun.serve(), managing workspaces, and CLI tooling. Covers monorepos, workspace dependencies, streaming, WebSocket support, and deployment.","killallservers\u002Fagentic","killallservers","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F282694183?v=4","01M785TJMJSH92SBQ2MQ3QP9AW","01M785TJNCCAQNZ9XZ6CPSPMX7",0,"MIT","https:\u002F\u002Fgithub.com\u002Fkillallservers\u002Fagentic\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fbun\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bun\ndescription: >\n  Fast JavaScript runtime and all-in-one toolchain for building and deploying applications.\n  Use Bun for package management, running TypeScript\u002FJSX directly, testing, bundling,\n  building HTTP servers with Bun.serve(), managing workspaces, and CLI tooling.\n  Covers monorepos, workspace dependencies, streaming, WebSocket support, and deployment.\ncompatibility: \"Bun 1.0+, TypeScript, JSX, Node.js compatibility layer\"\nreferences:\n  - https:\u002F\u002Fbun.com\u002Fdocs\n  - https:\u002F\u002Fbun.sh\u002Fllm.txt\n---\n\n## What is Bun?\n\nBun is a fast, all-in-one JavaScript runtime and toolchain built in Rust. It replaces Node.js, npm\u002Fpnpm\u002Fyarn, esbuild\u002Fwebpack, and Jest. Key advantages:\n\n- **3x faster than Node.js**: Native Rust implementation, optimized VM, JIT compilation\n- **Drop-in Node.js replacement**: High compatibility with existing Node.js code\n- **All-in-one**: Package manager, test runner, bundler, HTTP server, all built-in\n- **Zero-config development**: TypeScript, JSX work without setup\n- **Monorepo-native**: Built-in workspace support with dependency linking\n\n## Core Architecture\n\n### Files & Configuration\n\n- **bunfig.toml** — Optional configuration file (same dir as package.json)\n- **bun.lock** — Deterministic lockfile for reproducible installs\n- **package.json** — Dependencies, scripts, workspace definitions (same as Node.js)\n\n## Standard package.json Scripts\n\n**Always include these four scripts in package.json.** These are the standard Bun development and production commands:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"bun run src\u002Findex.ts --watch\",\n    \"build\": \"bun build .\u002Fsrc\u002Findex.ts --outdir .\u002Fdist --minify\",\n    \"start\": \"bun dist\u002Findex.js\",\n    \"test\": \"bun test\"\n  }\n}\n```\n\n- `dev`: Development server with hot reload\n- `build`: Production build (minified, bundled)\n- `start`: Run production build\n- `test`: Run test suite\n\n## Quick Commands Reference\n\n| Task | Command |\n|------|---------|\n| Run development | `bun run dev` |\n| Run build | `bun run build` |\n| Run production | `bun run start` |\n| Run tests | `bun run test` or `bun test` |\n| Run a file | `bun run file.ts` or `bun file.ts` |\n| Install deps | `bun install` |\n| Add package | `bun add package-name` |\n| Add dev dep | `bun add -d package-name` |\n| Add workspace dep | `bun add -w @workspace\u002Flib` |\n| Remove package | `bun remove package-name` |\n| Build bundle | `bun build .\u002Fsrc\u002Findex.ts --outdir .\u002Fdist` |\n| Build executable | `bun build .\u002Fsrc\u002Fcli.ts --target executable --outfile cli` |\n| Watch mode | `bun --watch run file.ts` or `bun build --watch` |\n| REPL | `bun repl` |\n| Version | `bun --version` |\n\n## Workspaces & Monorepos\n\nStructure your monorepo with `workspaces` in root `package.json`:\n\n```json\n{\n  \"name\": \"my-monorepo\",\n  \"workspaces\": [\"packages\u002Fapi\", \"packages\u002Fcli\", \"packages\u002Fshared\"]\n}\n```\n\n### Package structure\n```\nmy-monorepo\u002F\n├── packages\u002F\n│   ├── api\u002F\n│   │   ├── package.json  { \"name\": \"@workspace\u002Fapi\" }\n│   │   └── src\u002F\n│   ├── cli\u002F\n│   │   ├── package.json  { \"name\": \"@workspace\u002Fcli\" }\n│   │   └── src\u002F\n│   └── shared\u002F\n│       ├── package.json  { \"name\": \"@workspace\u002Fshared\" }\n│       └── src\u002F\n├── bunfig.toml\n└── package.json          (root with workspaces)\n```\n\n### Dependency linking\n\nIn workspace packages, reference each other:\n\n```json\n{\n  \"name\": \"@workspace\u002Fapi\",\n  \"dependencies\": {\n    \"@workspace\u002Fshared\": \"workspace:*\"\n  }\n}\n```\n\nRun `bun install` once in root—Bun symlinks workspace packages, no separate builds needed.\n\n### Running workspace scripts\n\n```bash\n# Run script in specific workspace\nbun run -w @workspace\u002Fapi dev\n\n# Or cd into the workspace\ncd packages\u002Fapi && bun run dev\n```\n\n## Fullstack Development Server\n\nBun's fullstack dev server is the centerpiece of modern Bun development. It intelligently bundles frontend assets and routes HTTP requests to handlers in one process—no separate dev server needed.\n\n### Complete Example\n\n**Project structure** (the canonical way):\n\n```\nproject\u002F\n├── src\u002F\n│   ├── index.html          (entry point, served at GET \u002F)\n│   ├── index.tsx           (React app, imported by index.html)\n│   ├── styles.css          (CSS bundled with entry)\n│   └── api\u002F\n│       ├── hello.ts        (route: GET \u002Fapi\u002Fhello)\n│       ├── users\u002F\n│       │   ├── index.ts    (route: GET \u002Fapi\u002Fusers, POST \u002Fapi\u002Fusers)\n│       │   └── [id].ts     (route: GET \u002Fapi\u002Fusers\u002F123)\n│       └── health.ts       (route: GET \u002Fapi\u002Fhealth)\n├── bunfig.toml\n└── package.json\n```\n\n**src\u002Findex.html** (entry point):\n\n```html\n\u003C!DOCTYPE html>\n\u003Chtml>\n\u003Chead>\n  \u003Cmeta charset=\"utf-8\" \u002F>\n  \u003Ctitle>My App\u003C\u002Ftitle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdiv id=\"root\">\u003C\u002Fdiv>\n  \u003Cscript type=\"module\" src=\".\u002Findex.tsx\">\u003C\u002Fscript>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n```\n\n**src\u002Findex.tsx** (React frontend):\n\n```typescript\nimport React from \"react\";\nimport { createRoot } from \"react-dom\u002Fclient\";\n\nexport default function App() {\n  const [users, setUsers] = React.useState([]);\n\n  React.useEffect(() => {\n    \u002F\u002F Fetch from API route\n    fetch(\"\u002Fapi\u002Fusers\").then(r => r.json()).then(setUsers);\n  }, []);\n\n  return (\n    \u003Cdiv>\n      \u003Ch1>Users\u003C\u002Fh1>\n      \u003Cul>\n        {users.map(u => \u003Cli key={u.id}>{u.name}\u003C\u002Fli>)}\n      \u003C\u002Ful>\n    \u003C\u002Fdiv>\n  );\n}\n\nconst root = createRoot(document.getElementById(\"root\")!);\nroot.render(\u003CApp \u002F>);\n```\n\n**src\u002Fapi\u002Fusers\u002Findex.ts** (API route):\n\n```typescript\n\u002F\u002F GET \u002Fapi\u002Fusers — list all users\nexport const GET = () => {\n  return Response.json([\n    { id: 1, name: \"Alice\" },\n    { id: 2, name: \"Bob\" },\n  ]);\n};\n\n\u002F\u002F POST \u002Fapi\u002Fusers — create a user\nexport const POST = async (req: Request) => {\n  const body = await req.json();\n  return Response.json({ created: body }, { status: 201 });\n};\n```\n\n**src\u002Fapi\u002Fusers\u002F[id].ts** (dynamic route):\n\n```typescript\n\u002F\u002F GET \u002Fapi\u002Fusers\u002F123\nexport const GET = (req: Request, server: any) => {\n  const { id } = server.params;\n  return Response.json({ id, name: `User ${id}` });\n};\n\n\u002F\u002F DELETE \u002Fapi\u002Fusers\u002F123\nexport const DELETE = (req: Request, server: any) => {\n  const { id } = server.params;\n  return new Response(null, { status: 204 });\n};\n```\n\n**bunfig.toml**:\n\n```toml\n[build]\nroot = \"src\"            # Where index.html lives\nentrypoints = [\"src\u002Findex.tsx\"]\ntarget = \"browser\"\n\n[build.naming]\nentry = \"[name].[ext]\"\nchunk = \"[name].[ext]\"\nasset = \"[name].[ext]\"\n\n[env]\nAPI_URL = \"http:\u002F\u002Flocalhost:3000\"\n```\n\n**Running the fullstack dev server**:\n\n```bash\nbun dev\n\n# Starts on http:\u002F\u002Flocalhost:3000\n# - Serves src\u002Findex.html at GET \u002F\n# - Auto-bundles src\u002Findex.tsx\n# - Routes requests to src\u002Fapi\u002F* handlers\n# - Hot-reloads on file changes\n```\n\nNo separate frontend build step. No separate API server. One process handles it all.\n\n### Best Practices\n\n**1. Keep API routes clean and focused**\n```typescript\n\u002F\u002F ✓ Good: One route per file\n\u002F\u002F src\u002Fapi\u002Fposts\u002F[id].ts\nexport const GET = (req, server) => {\n  return Response.json({ post: getPost(server.params.id) });\n};\n\n\u002F\u002F ✗ Avoid: Multiple unrelated handlers in one file\n```\n\n**2. Use dynamic routes for IDs and slugs**\n```typescript\n\u002F\u002F ✓ Good: src\u002Fapi\u002Fusers\u002F[id].ts handles \u002Fapi\u002Fusers\u002F:id\nexport const GET = (req, server) => {\n  const { id } = server.params;\n  \u002F\u002F handle by ID\n};\n\n\u002F\u002F ✗ Avoid: Manual URL parsing in every route\n```\n\n**3. Handle errors explicitly**\n```typescript\n\u002F\u002F ✓ Good: Return appropriate status codes\nexport const GET = (req, server) => {\n  const user = findUser(server.params.id);\n  if (!user) return new Response(\"Not found\", { status: 404 });\n  return Response.json(user);\n};\n\n\u002F\u002F ✗ Avoid: Letting exceptions bubble up without handling\n```\n\n**4. Use middleware for cross-cutting concerns**\n```typescript\n\u002F\u002F ✓ Good: Create middleware for logging, auth, etc.\nconst withAuth = (handler) => (req, server) => {\n  if (!req.headers.get(\"authorization\")) {\n    return new Response(\"Unauthorized\", { status: 401 });\n  }\n  return handler(req, server);\n};\n\nexport const GET = withAuth((req, server) => {\n  return Response.json({ protected: true });\n});\n```\n\n**5. Separate frontend from backend concerns**\n```typescript\n\u002F\u002F ✓ Good: API routes only return JSON\u002Fdata\n\u002F\u002F Frontend (src\u002Findex.tsx) handles all UI\n\n\u002F\u002F ✗ Avoid: Returning HTML from API routes in fullstack mode\n```\n\n**6. Type your routes for better dev experience**\n```typescript\n\u002F\u002F ✓ Good: Define request\u002Fresponse types\ntype GetUsersResponse = { id: number; name: string }[];\n\nexport const GET = (): Response => {\n  const data: GetUsersResponse = [{ id: 1, name: \"Alice\" }];\n  return Response.json(data);\n};\n\ntype CreateUserRequest = { name: string; email: string };\nexport const POST = async (req: Request) => {\n  const body = await req.json() as CreateUserRequest;\n  \u002F\u002F Now body is typed\n  return Response.json({ created: body }, { status: 201 });\n};\n```\n\n**7. Production builds**\n```bash\n# For production, build once and serve\nbun build .\u002Fsrc\u002Findex.html --outdir .\u002Fdist\n\n# Then serve the dist folder with a server\n# The bundled frontend + compiled routes go to dist\u002F\n```\n\n### Key Points to Remember\n\n- **One process**: Frontend bundling + API routing happens together\n- **Hot reload**: Both frontend and API routes hot-reload during dev\n- **Route structure**: `src\u002Fapi\u002F*` maps to `\u002Fapi\u002F*` HTTP endpoints\n- **Entry point**: `src\u002Findex.html` is served at GET \u002F\n- **Dynamic routes**: `[id].ts` and `[...slug].ts` for dynamic segments\n- **HTTP methods**: Export `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`\n- **No framework needed**: Plain Request\u002FResponse API (modern web standard)\n\n## HTTP Servers with Bun.serve()\n\nBun's native HTTP server is fast and easy:\n\n### Simple server\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    const path = new URL(req.url).pathname;\n    \n    if (path === \"\u002F\") return new Response(\"Hello, Bun!\");\n    if (path === \"\u002Fjson\") return Response.json({ message: \"Hello\" });\n    \n    return new Response(\"Not found\", { status: 404 });\n  },\n});\n\nconsole.log(`Server running on http:\u002F\u002Flocalhost:${server.port}`);\n```\n\n### Middleware pattern\n\n```typescript\ntype Handler = (req: Request, ctx: Context) => Promise\u003CResponse> | Response;\ntype Context = { params?: Record\u003Cstring, string> };\n\nconst handlers: Record\u003Cstring, Handler> = {\n  \"GET \u002F\": (req) => new Response(\"Home\"),\n  \"GET \u002Fapi\u002Fusers\u002F:id\": (req, ctx) => \n    Response.json({ id: ctx.params?.id }),\n  \"POST \u002Fapi\u002Fdata\": async (req) => {\n    const body = await req.json();\n    return Response.json({ received: body });\n  },\n};\n\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    const method = req.method;\n    const path = new URL(req.url).pathname;\n    const key = `${method} ${path}`;\n    \n    const handler = handlers[key];\n    if (handler) return handler(req, {});\n    \n    return new Response(\"Not found\", { status: 404 });\n  },\n});\n```\n\n### Request\u002FResponse utilities\n\n```typescript\n\u002F\u002F Parse JSON body\nconst data = await req.json();\n\n\u002F\u002F Parse FormData (file uploads, form submissions)\nconst form = await req.formData();\nconst file = form.get(\"file\"); \u002F\u002F File object\n\n\u002F\u002F Stream response\nconst stream = fs.createReadStream(\"large.json\");\nreturn new Response(stream);\n\n\u002F\u002F Headers\nconst headers = new Headers();\nheaders.set(\"X-Custom\", \"value\");\nheaders.set(\"Content-Type\", \"application\u002Fjson\");\nreturn new Response(\"...\", { headers });\n\n\u002F\u002F Cookies (via headers)\nheaders.set(\"Set-Cookie\", \"name=value; Path=\u002F; HttpOnly\");\n\n\u002F\u002F Redirect\nreturn new Response(null, {\n  status: 302,\n  headers: { Location: \"\u002Fnew-path\" },\n});\n```\n\n### WebSocket support\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    const url = new URL(req.url);\n    \n    if (url.pathname === \"\u002Fws\") {\n      const success = server.upgrade(req, {\n        data: { \u002F* custom context *\u002F },\n      });\n      return success \n        ? undefined \n        : new Response(\"WebSocket upgrade failed\", { status: 400 });\n    }\n    \n    return new Response(\"Not a WebSocket request\");\n  },\n  websocket: {\n    \u002F\u002F Called when client connects\n    open(ws) {\n      console.log(\"Client connected\");\n      ws.send(\"Welcome!\");\n    },\n    \u002F\u002F Called when client sends message\n    message(ws, message) {\n      console.log(\"Received:\", message);\n      ws.send(`Echo: ${message}`);\n    },\n    \u002F\u002F Called when client disconnects\n    close(ws) {\n      console.log(\"Client disconnected\");\n    },\n    \u002F\u002F Called on error\n    error(ws, error) {\n      console.error(\"WebSocket error:\", error);\n    },\n  },\n});\n```\n\n### Server-Sent Events (SSE)\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    if (new URL(req.url).pathname === \"\u002Fevents\") {\n      return new Response(\n        \u002F\u002F Return a ReadableStream that sends events\n        new ReadableStream({\n          start(controller) {\n            let count = 0;\n            const interval = setInterval(() => {\n              controller.enqueue(\n                `data: ${JSON.stringify({ count: ++count })}\\n\\n`\n              );\n              if (count >= 10) {\n                clearInterval(interval);\n                controller.close();\n              }\n            }, 1000);\n          },\n        }),\n        {\n          headers: {\n            \"Content-Type\": \"text\u002Fevent-stream\",\n            \"Cache-Control\": \"no-cache\",\n            \"Connection\": \"keep-alive\",\n          },\n        }\n      );\n    }\n    return new Response(\"Not found\", { status: 404 });\n  },\n});\n```\n\n## Testing with Bun\n\nBun has a built-in Jest-compatible test runner:\n\n```typescript\n\u002F\u002F math.test.ts\nimport { test, expect, describe, beforeEach, afterEach } from \"bun:test\";\n\ndescribe(\"Math utilities\", () => {\n  test(\"addition\", () => {\n    expect(1 + 1).toBe(2);\n  });\n\n  test(\"strings\", () => {\n    expect(\"hello\").toContain(\"ell\");\n    expect(\"world\").toMatch(\u002Fwor\u002F);\n  });\n\n  test(\"arrays\", () => {\n    expect([1, 2, 3]).toContain(2);\n    expect([1, 2, 3]).toHaveLength(3);\n  });\n\n  test(\"objects\", () => {\n    expect({ a: 1 }).toEqual({ a: 1 });\n    expect({ a: 1, b: 2 }).toHaveProperty(\"a\");\n  });\n\n  test(\"async\", async () => {\n    const result = await Promise.resolve(42);\n    expect(result).toBe(42);\n  });\n\n  beforeEach(() => {\n    console.log(\"Before each test\");\n  });\n\n  afterEach(() => {\n    console.log(\"After each test\");\n  });\n});\n```\n\nRun tests:\n```bash\nbun test                          # Run all *.test.ts files\nbun test path\u002Fto\u002Ftest.ts          # Specific file\nbun test --watch                  # Watch mode\nbun test --timeout 5000           # Timeout (ms)\nbun test --bail                   # Stop on first failure\n```\n\n### Mocking\n\n```typescript\nimport { test, expect, mock } from \"bun:test\";\nimport { fetchUser } from \".\u002Fapi\";\n\ntest(\"mocked fetch\", async () => {\n  const mockFetch = mock(() => Promise.resolve({ id: 1, name: \"Alice\" }));\n  \n  \u002F\u002F Temporarily replace global fetch\n  const original = global.fetch;\n  global.fetch = mockFetch as any;\n  \n  const user = await fetchUser(1);\n  \n  expect(mockFetch).toHaveBeenCalledTimes(1);\n  expect(user.name).toBe(\"Alice\");\n  \n  global.fetch = original;\n});\n```\n\n## Bundling with Bun\n\n```bash\n# Bundle for browser\nbun build .\u002Fsrc\u002Findex.ts --outdir .\u002Fdist\n\n# Bundle for Node.js\nbun build .\u002Fsrc\u002Findex.ts --target node --outdir .\u002Fdist\n\n# Minify\nbun build .\u002Fsrc\u002Findex.ts --minify\n\n# Source maps\nbun build .\u002Fsrc\u002Findex.ts --sourcemap=external\n\n# Watch mode\nbun build .\u002Fsrc\u002Findex.ts --watch --outdir .\u002Fdist\n\n# Code splitting\nbun build .\u002Fsrc\u002Findex.ts --splitting --outdir .\u002Fdist\n```\n\n### bunfig.toml for bundler\n\n```toml\n[build]\ntarget = \"browser\"  # or \"node\", \"bun\"\nminify = true\nsourcemap = \"external\"\nsplitting = true\nentrypoints = [\"src\u002Findex.ts\"]\noutdir = \"dist\"\n\n# Asset naming\n[build.naming]\nentry = \"[dir]\u002F[name]-[hash].[ext]\"\nchunk = \"[name]-[hash].[ext]\"\nasset = \"[name]-[hash].[ext]\"\n\n[build.define]\nVERSION = \"1.0.0\"\n```\n\n## Native TOML Reader\u002FParser\n\nBun can parse TOML files natively (no dependencies needed):\n\n### Reading bunfig.toml\n\n```typescript\nimport { readFileSync } from \"fs\";\nimport TOML from \"bun:toml\";\n\n\u002F\u002F Parse bunfig.toml\nconst config = TOML.parse(readFileSync(\"bunfig.toml\", \"utf-8\"));\n\nconsole.log(config.build.target);        \u002F\u002F \"browser\"\nconsole.log(config.build.splitting);     \u002F\u002F true\nconsole.log(config.env.DATABASE_URL);    \u002F\u002F \"postgresql:\u002F\u002F...\"\n```\n\n### Parsing TOML strings\n\n```typescript\nimport TOML from \"bun:toml\";\n\nconst tomlString = `\n[database]\nhost = \"localhost\"\nport = 5432\nname = \"mydb\"\n\n[server]\nport = 3000\ndebug = true\n`;\n\nconst config = TOML.parse(tomlString);\nconsole.log(config.database.host);   \u002F\u002F \"localhost\"\nconsole.log(config.server.debug);    \u002F\u002F true\n```\n\n### Writing TOML\n\n```typescript\nimport TOML from \"bun:toml\";\nimport { writeFileSync } from \"fs\";\n\nconst config = {\n  database: {\n    host: \"localhost\",\n    port: 5432,\n  },\n  server: {\n    port: 3000,\n  },\n};\n\nconst tomlString = TOML.stringify(config);\nwriteFileSync(\"config.toml\", tomlString);\n```\n\n### Complete bunfig.toml example\n\n```toml\n# Bundler configuration\n[build]\ntarget = \"browser\"\nentrypoints = [\"src\u002Findex.ts\"]\noutdir = \"dist\"\nminify = true\nsourcemap = \"external\"\nsplitting = true\n\n# Asset naming patterns\n[build.naming]\nentry = \"[dir]\u002F[name]-[hash].[ext]\"\nchunk = \"[name]-[hash].[ext]\"\nasset = \"[name]-[hash].[ext]\"\n\n# Define compile-time constants\n[build.define]\nVERSION = \"1.0.0\"\nAPI_URL = \"https:\u002F\u002Fapi.example.com\"\nDEBUG = false\n\n# Bundler optimizations\n[build.optimization]\nremoveUnusedCode = true\ntreeshaking = true\n\n# Development server\n[serve]\nport = 3000\nhostname = \"localhost\"\nstaticDir = \"public\"\nhot = true\n\n# Environment variables\n[env]\nDATABASE_URL = \"postgresql:\u002F\u002Flocalhost\u002Fmydb\"\nNODE_ENV = \"development\"\n```\n\n### Loading environment from bunfig.toml\n\nBun automatically loads `[env]` section from bunfig.toml into `process.env`:\n\n```toml\n[env]\nDATABASE_URL = \"postgresql:\u002F\u002Flocalhost\"\nAPI_KEY = \"secret-key\"\n```\n\n```typescript\nconsole.log(process.env.DATABASE_URL);  \u002F\u002F Automatically loaded\n```\n\n## File I\u002FO\n\nBun extends Node.js fs with faster operations:\n\n```typescript\n\u002F\u002F Read file\nconst content = await Bun.file(\"path\u002Fto\u002Ffile.txt\").text();\nconst buffer = await Bun.file(\"path\u002Fto\u002Ffile.bin\").arrayBuffer();\nconst json = await Bun.file(\"data.json\").json();\n\n\u002F\u002F Write file\nawait Bun.write(\"output.txt\", \"content\");\nawait Bun.write(\"data.json\", JSON.stringify(obj, null, 2));\n\n\u002F\u002F Glob files\nfor (const file of await glob(\"src\u002F**\u002F*.ts\")) {\n  console.log(file);\n}\n```\n\n## Environment Variables\n\n```typescript\n\u002F\u002F .env file (auto-loaded)\nDATABASE_URL=postgresql:\u002F\u002F...\nAPI_KEY=secret123\n\n\u002F\u002F In code\nconst dbUrl = process.env.DATABASE_URL;\nconst apiKey = process.env.API_KEY;\n\n\u002F\u002F bunfig.toml\n[env]\nDATABASE_URL = \"postgresql:\u002F\u002Flocalhost\u002Fmydb\"\n```\n\n## Package Management Features\n\n### Trusting packages\n\n```bash\nbun install --trust    # Trust all packages (skip audit)\n```\n\n### Peer dependencies\n\n```bash\nbun add -P react@18    # Add as peer dependency\n```\n\n### Workspace dependencies\n\n```bash\nbun add @workspace\u002Fshared -w   # Add from workspace\n```\n\n### Git dependencies\n\n```bash\nbun add git+https:\u002F\u002Fgithub.com\u002Fuser\u002Frepo.git#main\n```\n\n### Lockfile\n\n- **bun.lock** — Always commit this (like package-lock.json)\n- Deterministic and fast to parse\n- Not meant for human editing\n\n## TypeScript Support\n\nBun has best-in-class TypeScript support with zero configuration:\n\n### Running TypeScript directly\n\n```bash\n# No compilation needed\nbun run app.ts\nbun app.ts\nbun --watch app.ts\n```\n\n### TypeScript 5+ features\n\n- **Enums** — Full enum support\n- **Decorators** — Experimental decorators\n- **Namespaces** — TypeScript namespaces\n- **Generic constraints** — Advanced type constraints\n- **Module augmentation** — Extend types from libraries\n\n```typescript\n\u002F\u002F Full TypeScript support out of the box\ninterface Config {\n  port: number;\n  debug: boolean;\n}\n\ntype ApiResponse\u003CT> = {\n  data: T;\n  status: \"success\" | \"error\";\n};\n\nconst config: Config = {\n  port: 3000,\n  debug: true,\n};\n\nasync function fetchUser(id: string): Promise\u003CApiResponse\u003CUser>> {\n  return { data: { id }, status: \"success\" };\n}\n```\n\n### Type-checking\n\n```bash\n# Check types without running\nbun check        # Check for type errors\n\n# In watch mode\nbun check --watch\n```\n\n### tsconfig.json\n\nBun respects tsconfig.json, but works without it:\n\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"ES2022\",\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2022\"],\n    \"strict\": true,\n    \"jsx\": \"react-jsx\",\n    \"skipLibCheck\": true\n  }\n}\n```\n\n### JSX support\n\nBun handles `.tsx` files natively:\n\n```typescript\n\u002F\u002F app.tsx - no build step needed\nexport function App() {\n  return \u003Ch1>Hello from Bun!\u003C\u002Fh1>;\n}\n```\n\n## SQLite Database\n\nBun has a built-in, fast SQLite driver:\n\n### Basic usage\n\n```typescript\nimport { Database } from \"bun:sqlite\";\n\n\u002F\u002F Open\u002Fcreate database\nconst db = new Database(\"myapp.db\");\n\n\u002F\u002F Execute SQL\ndb.exec(`\n  CREATE TABLE IF NOT EXISTS users (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    email TEXT UNIQUE NOT NULL,\n    name TEXT,\n    created_at DATETIME DEFAULT CURRENT_TIMESTAMP\n  )\n`);\n\n\u002F\u002F Insert with prepared statements\nconst insert = db.prepare(\"INSERT INTO users (email, name) VALUES (?, ?)\");\ninsert.run(\"alice@example.com\", \"Alice\");\ninsert.run(\"bob@example.com\", \"Bob\");\n\n\u002F\u002F Query all rows\nconst users = db.query(\"SELECT * FROM users\").all();\nconsole.log(users);\n\n\u002F\u002F Query single row\nconst user = db.query(\"SELECT * FROM users WHERE email = ?\").get(\"alice@example.com\");\nconsole.log(user);\n\n\u002F\u002F Query with parameters\nconst stmt = db.prepare(\"SELECT * FROM users WHERE id > ?\");\nconst filtered = stmt.all(1);\n\n\u002F\u002F Close database\ndb.close();\n```\n\n### Transactions\n\n```typescript\nconst db = new Database(\"myapp.db\");\n\nconst insert = db.prepare(\"INSERT INTO users (email, name) VALUES (?, ?)\");\n\n\u002F\u002F Transaction\ndb.transaction(() => {\n  insert.run(\"alice@example.com\", \"Alice\");\n  insert.run(\"bob@example.com\", \"Bob\");\n  insert.run(\"charlie@example.com\", \"Charlie\");\n})();  \u002F\u002F Execute transaction\n\n\u002F\u002F Rollback on error\ntry {\n  db.transaction(() => {\n    insert.run(\"dave@example.com\", \"Dave\");\n    throw new Error(\"Oops!\");\n  })();\n} catch (e) {\n  console.log(\"Transaction rolled back\");\n}\n```\n\n### Column affinity and type safety\n\n```typescript\ninterface User {\n  id: number;\n  email: string;\n  name: string | null;\n  created_at: string;\n}\n\nconst db = new Database(\"myapp.db\");\n\nconst query = db.query\u003CUser>(\n  \"SELECT * FROM users WHERE email = ?\"\n);\n\nconst user = query.get(\"alice@example.com\");\n\u002F\u002F user is typed as User | null\nconsole.log(user?.name);\n```\n\n### Performance features\n\n```typescript\nconst db = new Database(\"myapp.db\");\n\n\u002F\u002F Batch inserts are fastest\nconst insert = db.prepare(\"INSERT INTO users (email, name) VALUES (?, ?)\");\n\nconst batchInsert = db.batch([\n  insert,\n  insert,\n  insert,\n]);\n\nbatchInsert(\n  [\"alice@example.com\", \"Alice\"],\n  [\"bob@example.com\", \"Bob\"],\n  [\"charlie@example.com\", \"Charlie\"]\n);\n```\n\n### Common patterns\n\n```typescript\n\u002F\u002F Pagination\nconst query = db.query(\"SELECT * FROM users LIMIT ? OFFSET ?\");\nconst page = query.all(10, 0);  \u002F\u002F First 10\n\n\u002F\u002F Count\nconst count = db.query(\"SELECT COUNT(*) as count FROM users\").get() as { count: number };\nconsole.log(`Total users: ${count.count}`);\n\n\u002F\u002F Aggregation\nconst stats = db.query(`\n  SELECT \n    COUNT(*) as total,\n    MAX(created_at) as last_created\n  FROM users\n`).get();\n```\n\n## SQL Query Builder\n\nBun supports raw SQL and works well with query builders like Drizzle:\n\n```typescript\n\u002F\u002F With Drizzle ORM (recommended for complex apps)\nimport { drizzle } from \"drizzle-orm\u002Fbun-sqlite\";\nimport { Database } from \"bun:sqlite\";\n\nconst sqlite = new Database(\"myapp.db\");\nconst db = drizzle(sqlite);\n\n\u002F\u002F Type-safe queries with Drizzle\nconst users = await db\n  .select()\n  .from(usersTable)\n  .where(eq(usersTable.email, \"alice@example.com\"));\n```\n\nFor simple use cases, use raw SQLite API. For complex schemas and type safety, use Drizzle ORM.\n\n## Key Differences from Node.js\n\n| Feature | Node.js | Bun |\n|---------|---------|-----|\n| TypeScript | Needs ts-node or tsx | Native, zero-config |\n| JSX | Needs build step | Native support |\n| Package manager | npm\u002Fyarn\u002Fpnpm | Built-in `bun install` |\n| Test runner | Jest, Vitest | Built-in `bun test` |\n| Bundler | esbuild, webpack | Built-in `bun build` |\n| HTTP server | express, http module | Native `Bun.serve()` |\n| Performance | Standard | 3x faster (Rust VM) |\n| CommonJS | Supported | Supported (with caveats) |\n\n## Ecosystem Integration\n\nPopular frameworks with Bun:\n- **Web**: Express, Hono, Elysia, Next.js, Vite\n- **ORM**: Drizzle, Prisma, Mongoose\n- **Database**: PostgreSQL, MongoDB, Redis, SQLite\n- **Deployment**: Vercel, Railway, DigitalOcean, AWS Lambda, Google Cloud Run\n- **Testing**: Bun's built-in test runner (Jest-compatible)\n- **Monorepos**: Turborepo (or use Bun workspaces)\n\n## Performance Tips\n\n1. **Use Bun's native APIs**: `Bun.serve()`, `Bun.file()`, `Bun.build()` are faster than Node.js equivalents\n2. **Leverage workspaces**: No separate build steps for shared code\n3. **Bundle for production**: Use `bun build` with `--minify` and `--splitting`\n4. **HTTP streaming**: For large responses, use streams or `ReadableStream`\n5. **Worker threads**: Use Bun's worker support for CPU-bound tasks (via `new Worker()`)\n\n## Common Patterns\n\n### Environment-specific configuration\n\n```typescript\nconst isDev = process.env.NODE_ENV === \"development\";\nconst isTest = process.env.NODE_ENV === \"test\";\n\nconst config = {\n  port: parseInt(process.env.PORT || \"3000\"),\n  debug: isDev,\n  database: process.env.DATABASE_URL,\n};\n```\n\n### Graceful shutdown\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    return new Response(\"OK\");\n  },\n});\n\nprocess.on(\"SIGTERM\", () => {\n  console.log(\"Shutting down...\");\n  server.stop();\n  process.exit(0);\n});\n```\n\n### Environment detection\n\n```typescript\nif (import.meta.env.PROD) {\n  console.log(\"Running in production\");\n}\n\nif (process.platform === \"win32\") {\n  console.log(\"Running on Windows\");\n}\n```\n\n## When to Use Bun\n\n✓ **Best for:**\n- Full-stack TypeScript applications\n- CLI tools and scripts\n- HTTP APIs and servers (Bun.serve())\n- Monorepos with shared code (workspaces)\n- Development speed (fast hot reload, rapid testing)\n- Projects where you want everything built-in\n\n## Resources\n\n- [Bun Documentation](https:\u002F\u002Fbun.com\u002Fdocs)\n- [Bun GitHub](https:\u002F\u002Fgithub.com\u002Foven-sh\u002Fbun)\n","## What is Bun?\n\nBun is a fast, all-in-one JavaScript runtime and toolchain built in Rust. It replaces Node.js, npm\u002Fpnpm\u002Fyarn, esbuild\u002Fwebpack, and Jest. Key advantages:\n\n- **3x faster than Node.js**: Native Rust implementation, optimized VM, JIT compilation\n- **Drop-in Node.js replacement**: High compatibility with existing Node.js code\n- **All-in-one**: Package manager, test runner, bundler, HTTP server, all built-in\n- **Zero-config development**: TypeScript, JSX work without setup\n- **Monorepo-native**: Built-in workspace support with dependency linking\n\n## Core Architecture\n\n### Files & Configuration\n\n- **bunfig.toml** — Optional configuration file (same dir as package.json)\n- **bun.lock** — Deterministic lockfile for reproducible installs\n- **package.json** — Dependencies, scripts, workspace definitions (same as Node.js)\n\n## Standard package.json Scripts\n\n**Always include these four scripts in package.json.** These are the standard Bun development and production commands:\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"bun run src\u002Findex.ts --watch\",\n    \"build\": \"bun build .\u002Fsrc\u002Findex.ts --outdir .\u002Fdist --minify\",\n    \"start\": \"bun dist\u002Findex.js\",\n    \"test\": \"bun test\"\n  }\n}\n```\n\n- `dev`: Development server with hot reload\n- `build`: Production build (minified, bundled)\n- `start`: Run production build\n- `test`: Run test suite\n\n## Quick Commands Reference\n\n| Task | Command |\n|------|---------|\n| Run development | `bun run dev` |\n| Run build | `bun run build` |\n| Run production | `bun run start` |\n| Run tests | `bun run test` or `bun test` |\n| Run a file | `bun run file.ts` or `bun file.ts` |\n| Install deps | `bun install` |\n| Add package | `bun add package-name` |\n| Add dev dep | `bun add -d package-name` |\n| Add workspace dep | `bun add -w @workspace\u002Flib` |\n| Remove package | `bun remove package-name` |\n| Build bundle | `bun build .\u002Fsrc\u002Findex.ts --outdir .\u002Fdist` |\n| Build executable | `bun build .\u002Fsrc\u002Fcli.ts --target executable --outfile cli` |\n| Watch mode | `bun --watch run file.ts` or `bun build --watch` |\n| REPL | `bun repl` |\n| Version | `bun --version` |\n\n## Workspaces & Monorepos\n\nStructure your monorepo with `workspaces` in root `package.json`:\n\n```json\n{\n  \"name\": \"my-monorepo\",\n  \"workspaces\": [\"packages\u002Fapi\", \"packages\u002Fcli\", \"packages\u002Fshared\"]\n}\n```\n\n### Package structure\n```\nmy-monorepo\u002F\n├── packages\u002F\n│   ├── api\u002F\n│   │   ├── package.json  { \"name\": \"@workspace\u002Fapi\" }\n│   │   └── src\u002F\n│   ├── cli\u002F\n│   │   ├── package.json  { \"name\": \"@workspace\u002Fcli\" }\n│   │   └── src\u002F\n│   └── shared\u002F\n│       ├── package.json  { \"name\": \"@workspace\u002Fshared\" }\n│       └── src\u002F\n├── bunfig.toml\n└── package.json          (root with workspaces)\n```\n\n### Dependency linking\n\nIn workspace packages, reference each other:\n\n```json\n{\n  \"name\": \"@workspace\u002Fapi\",\n  \"dependencies\": {\n    \"@workspace\u002Fshared\": \"workspace:*\"\n  }\n}\n```\n\nRun `bun install` once in root—Bun symlinks workspace packages, no separate builds needed.\n\n### Running workspace scripts\n\n```bash\n# Run script in specific workspace\nbun run -w @workspace\u002Fapi dev\n\n# Or cd into the workspace\ncd packages\u002Fapi && bun run dev\n```\n\n## Fullstack Development Server\n\nBun's fullstack dev server is the centerpiece of modern Bun development. It intelligently bundles frontend assets and routes HTTP requests to handlers in one process—no separate dev server needed.\n\n### Complete Example\n\n**Project structure** (the canonical way):\n\n```\nproject\u002F\n├── src\u002F\n│   ├── index.html          (entry point, served at GET \u002F)\n│   ├── index.tsx           (React app, imported by index.html)\n│   ├── styles.css          (CSS bundled with entry)\n│   └── api\u002F\n│       ├── hello.ts        (route: GET \u002Fapi\u002Fhello)\n│       ├── users\u002F\n│       │   ├── index.ts    (route: GET \u002Fapi\u002Fusers, POST \u002Fapi\u002Fusers)\n│       │   └── [id].ts     (route: GET \u002Fapi\u002Fusers\u002F123)\n│       └── health.ts       (route: GET \u002Fapi\u002Fhealth)\n├── bunfig.toml\n└── package.json\n```\n\n**src\u002Findex.html** (entry point):\n\n```html\n\u003C!DOCTYPE html>\n\u003Chtml>\n\u003Chead>\n  \u003Cmeta charset=\"utf-8\" \u002F>\n  \u003Ctitle>My App\u003C\u002Ftitle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Cdiv id=\"root\">\u003C\u002Fdiv>\n  \u003Cscript type=\"module\" src=\".\u002Findex.tsx\">\u003C\u002Fscript>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n```\n\n**src\u002Findex.tsx** (React frontend):\n\n```typescript\nimport React from \"react\";\nimport { createRoot } from \"react-dom\u002Fclient\";\n\nexport default function App() {\n  const [users, setUsers] = React.useState([]);\n\n  React.useEffect(() => {\n    \u002F\u002F Fetch from API route\n    fetch(\"\u002Fapi\u002Fusers\").then(r => r.json()).then(setUsers);\n  }, []);\n\n  return (\n    \u003Cdiv>\n      \u003Ch1>Users\u003C\u002Fh1>\n      \u003Cul>\n        {users.map(u => \u003Cli key={u.id}>{u.name}\u003C\u002Fli>)}\n      \u003C\u002Ful>\n    \u003C\u002Fdiv>\n  );\n}\n\nconst root = createRoot(document.getElementById(\"root\")!);\nroot.render(\u003CApp \u002F>);\n```\n\n**src\u002Fapi\u002Fusers\u002Findex.ts** (API route):\n\n```typescript\n\u002F\u002F GET \u002Fapi\u002Fusers — list all users\nexport const GET = () => {\n  return Response.json([\n    { id: 1, name: \"Alice\" },\n    { id: 2, name: \"Bob\" },\n  ]);\n};\n\n\u002F\u002F POST \u002Fapi\u002Fusers — create a user\nexport const POST = async (req: Request) => {\n  const body = await req.json();\n  return Response.json({ created: body }, { status: 201 });\n};\n```\n\n**src\u002Fapi\u002Fusers\u002F[id].ts** (dynamic route):\n\n```typescript\n\u002F\u002F GET \u002Fapi\u002Fusers\u002F123\nexport const GET = (req: Request, server: any) => {\n  const { id } = server.params;\n  return Response.json({ id, name: `User ${id}` });\n};\n\n\u002F\u002F DELETE \u002Fapi\u002Fusers\u002F123\nexport const DELETE = (req: Request, server: any) => {\n  const { id } = server.params;\n  return new Response(null, { status: 204 });\n};\n```\n\n**bunfig.toml**:\n\n```toml\n[build]\nroot = \"src\"            # Where index.html lives\nentrypoints = [\"src\u002Findex.tsx\"]\ntarget = \"browser\"\n\n[build.naming]\nentry = \"[name].[ext]\"\nchunk = \"[name].[ext]\"\nasset = \"[name].[ext]\"\n\n[env]\nAPI_URL = \"http:\u002F\u002Flocalhost:3000\"\n```\n\n**Running the fullstack dev server**:\n\n```bash\nbun dev\n\n# Starts on http:\u002F\u002Flocalhost:3000\n# - Serves src\u002Findex.html at GET \u002F\n# - Auto-bundles src\u002Findex.tsx\n# - Routes requests to src\u002Fapi\u002F* handlers\n# - Hot-reloads on file changes\n```\n\nNo separate frontend build step. No separate API server. One process handles it all.\n\n### Best Practices\n\n**1. Keep API routes clean and focused**\n```typescript\n\u002F\u002F ✓ Good: One route per file\n\u002F\u002F src\u002Fapi\u002Fposts\u002F[id].ts\nexport const GET = (req, server) => {\n  return Response.json({ post: getPost(server.params.id) });\n};\n\n\u002F\u002F ✗ Avoid: Multiple unrelated handlers in one file\n```\n\n**2. Use dynamic routes for IDs and slugs**\n```typescript\n\u002F\u002F ✓ Good: src\u002Fapi\u002Fusers\u002F[id].ts handles \u002Fapi\u002Fusers\u002F:id\nexport const GET = (req, server) => {\n  const { id } = server.params;\n  \u002F\u002F handle by ID\n};\n\n\u002F\u002F ✗ Avoid: Manual URL parsing in every route\n```\n\n**3. Handle errors explicitly**\n```typescript\n\u002F\u002F ✓ Good: Return appropriate status codes\nexport const GET = (req, server) => {\n  const user = findUser(server.params.id);\n  if (!user) return new Response(\"Not found\", { status: 404 });\n  return Response.json(user);\n};\n\n\u002F\u002F ✗ Avoid: Letting exceptions bubble up without handling\n```\n\n**4. Use middleware for cross-cutting concerns**\n```typescript\n\u002F\u002F ✓ Good: Create middleware for logging, auth, etc.\nconst withAuth = (handler) => (req, server) => {\n  if (!req.headers.get(\"authorization\")) {\n    return new Response(\"Unauthorized\", { status: 401 });\n  }\n  return handler(req, server);\n};\n\nexport const GET = withAuth((req, server) => {\n  return Response.json({ protected: true });\n});\n```\n\n**5. Separate frontend from backend concerns**\n```typescript\n\u002F\u002F ✓ Good: API routes only return JSON\u002Fdata\n\u002F\u002F Frontend (src\u002Findex.tsx) handles all UI\n\n\u002F\u002F ✗ Avoid: Returning HTML from API routes in fullstack mode\n```\n\n**6. Type your routes for better dev experience**\n```typescript\n\u002F\u002F ✓ Good: Define request\u002Fresponse types\ntype GetUsersResponse = { id: number; name: string }[];\n\nexport const GET = (): Response => {\n  const data: GetUsersResponse = [{ id: 1, name: \"Alice\" }];\n  return Response.json(data);\n};\n\ntype CreateUserRequest = { name: string; email: string };\nexport const POST = async (req: Request) => {\n  const body = await req.json() as CreateUserRequest;\n  \u002F\u002F Now body is typed\n  return Response.json({ created: body }, { status: 201 });\n};\n```\n\n**7. Production builds**\n```bash\n# For production, build once and serve\nbun build .\u002Fsrc\u002Findex.html --outdir .\u002Fdist\n\n# Then serve the dist folder with a server\n# The bundled frontend + compiled routes go to dist\u002F\n```\n\n### Key Points to Remember\n\n- **One process**: Frontend bundling + API routing happens together\n- **Hot reload**: Both frontend and API routes hot-reload during dev\n- **Route structure**: `src\u002Fapi\u002F*` maps to `\u002Fapi\u002F*` HTTP endpoints\n- **Entry point**: `src\u002Findex.html` is served at GET \u002F\n- **Dynamic routes**: `[id].ts` and `[...slug].ts` for dynamic segments\n- **HTTP methods**: Export `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`\n- **No framework needed**: Plain Request\u002FResponse API (modern web standard)\n\n## HTTP Servers with Bun.serve()\n\nBun's native HTTP server is fast and easy:\n\n### Simple server\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    const path = new URL(req.url).pathname;\n    \n    if (path === \"\u002F\") return new Response(\"Hello, Bun!\");\n    if (path === \"\u002Fjson\") return Response.json({ message: \"Hello\" });\n    \n    return new Response(\"Not found\", { status: 404 });\n  },\n});\n\nconsole.log(`Server running on http:\u002F\u002Flocalhost:${server.port}`);\n```\n\n### Middleware pattern\n\n```typescript\ntype Handler = (req: Request, ctx: Context) => Promise\u003CResponse> | Response;\ntype Context = { params?: Record\u003Cstring, string> };\n\nconst handlers: Record\u003Cstring, Handler> = {\n  \"GET \u002F\": (req) => new Response(\"Home\"),\n  \"GET \u002Fapi\u002Fusers\u002F:id\": (req, ctx) => \n    Response.json({ id: ctx.params?.id }),\n  \"POST \u002Fapi\u002Fdata\": async (req) => {\n    const body = await req.json();\n    return Response.json({ received: body });\n  },\n};\n\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    const method = req.method;\n    const path = new URL(req.url).pathname;\n    const key = `${method} ${path}`;\n    \n    const handler = handlers[key];\n    if (handler) return handler(req, {});\n    \n    return new Response(\"Not found\", { status: 404 });\n  },\n});\n```\n\n### Request\u002FResponse utilities\n\n```typescript\n\u002F\u002F Parse JSON body\nconst data = await req.json();\n\n\u002F\u002F Parse FormData (file uploads, form submissions)\nconst form = await req.formData();\nconst file = form.get(\"file\"); \u002F\u002F File object\n\n\u002F\u002F Stream response\nconst stream = fs.createReadStream(\"large.json\");\nreturn new Response(stream);\n\n\u002F\u002F Headers\nconst headers = new Headers();\nheaders.set(\"X-Custom\", \"value\");\nheaders.set(\"Content-Type\", \"application\u002Fjson\");\nreturn new Response(\"...\", { headers });\n\n\u002F\u002F Cookies (via headers)\nheaders.set(\"Set-Cookie\", \"name=value; Path=\u002F; HttpOnly\");\n\n\u002F\u002F Redirect\nreturn new Response(null, {\n  status: 302,\n  headers: { Location: \"\u002Fnew-path\" },\n});\n```\n\n### WebSocket support\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    const url = new URL(req.url);\n    \n    if (url.pathname === \"\u002Fws\") {\n      const success = server.upgrade(req, {\n        data: { \u002F* custom context *\u002F },\n      });\n      return success \n        ? undefined \n        : new Response(\"WebSocket upgrade failed\", { status: 400 });\n    }\n    \n    return new Response(\"Not a WebSocket request\");\n  },\n  websocket: {\n    \u002F\u002F Called when client connects\n    open(ws) {\n      console.log(\"Client connected\");\n      ws.send(\"Welcome!\");\n    },\n    \u002F\u002F Called when client sends message\n    message(ws, message) {\n      console.log(\"Received:\", message);\n      ws.send(`Echo: ${message}`);\n    },\n    \u002F\u002F Called when client disconnects\n    close(ws) {\n      console.log(\"Client disconnected\");\n    },\n    \u002F\u002F Called on error\n    error(ws, error) {\n      console.error(\"WebSocket error:\", error);\n    },\n  },\n});\n```\n\n### Server-Sent Events (SSE)\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    if (new URL(req.url).pathname === \"\u002Fevents\") {\n      return new Response(\n        \u002F\u002F Return a ReadableStream that sends events\n        new ReadableStream({\n          start(controller) {\n            let count = 0;\n            const interval = setInterval(() => {\n              controller.enqueue(\n                `data: ${JSON.stringify({ count: ++count })}\\n\\n`\n              );\n              if (count >= 10) {\n                clearInterval(interval);\n                controller.close();\n              }\n            }, 1000);\n          },\n        }),\n        {\n          headers: {\n            \"Content-Type\": \"text\u002Fevent-stream\",\n            \"Cache-Control\": \"no-cache\",\n            \"Connection\": \"keep-alive\",\n          },\n        }\n      );\n    }\n    return new Response(\"Not found\", { status: 404 });\n  },\n});\n```\n\n## Testing with Bun\n\nBun has a built-in Jest-compatible test runner:\n\n```typescript\n\u002F\u002F math.test.ts\nimport { test, expect, describe, beforeEach, afterEach } from \"bun:test\";\n\ndescribe(\"Math utilities\", () => {\n  test(\"addition\", () => {\n    expect(1 + 1).toBe(2);\n  });\n\n  test(\"strings\", () => {\n    expect(\"hello\").toContain(\"ell\");\n    expect(\"world\").toMatch(\u002Fwor\u002F);\n  });\n\n  test(\"arrays\", () => {\n    expect([1, 2, 3]).toContain(2);\n    expect([1, 2, 3]).toHaveLength(3);\n  });\n\n  test(\"objects\", () => {\n    expect({ a: 1 }).toEqual({ a: 1 });\n    expect({ a: 1, b: 2 }).toHaveProperty(\"a\");\n  });\n\n  test(\"async\", async () => {\n    const result = await Promise.resolve(42);\n    expect(result).toBe(42);\n  });\n\n  beforeEach(() => {\n    console.log(\"Before each test\");\n  });\n\n  afterEach(() => {\n    console.log(\"After each test\");\n  });\n});\n```\n\nRun tests:\n```bash\nbun test                          # Run all *.test.ts files\nbun test path\u002Fto\u002Ftest.ts          # Specific file\nbun test --watch                  # Watch mode\nbun test --timeout 5000           # Timeout (ms)\nbun test --bail                   # Stop on first failure\n```\n\n### Mocking\n\n```typescript\nimport { test, expect, mock } from \"bun:test\";\nimport { fetchUser } from \".\u002Fapi\";\n\ntest(\"mocked fetch\", async () => {\n  const mockFetch = mock(() => Promise.resolve({ id: 1, name: \"Alice\" }));\n  \n  \u002F\u002F Temporarily replace global fetch\n  const original = global.fetch;\n  global.fetch = mockFetch as any;\n  \n  const user = await fetchUser(1);\n  \n  expect(mockFetch).toHaveBeenCalledTimes(1);\n  expect(user.name).toBe(\"Alice\");\n  \n  global.fetch = original;\n});\n```\n\n## Bundling with Bun\n\n```bash\n# Bundle for browser\nbun build .\u002Fsrc\u002Findex.ts --outdir .\u002Fdist\n\n# Bundle for Node.js\nbun build .\u002Fsrc\u002Findex.ts --target node --outdir .\u002Fdist\n\n# Minify\nbun build .\u002Fsrc\u002Findex.ts --minify\n\n# Source maps\nbun build .\u002Fsrc\u002Findex.ts --sourcemap=external\n\n# Watch mode\nbun build .\u002Fsrc\u002Findex.ts --watch --outdir .\u002Fdist\n\n# Code splitting\nbun build .\u002Fsrc\u002Findex.ts --splitting --outdir .\u002Fdist\n```\n\n### bunfig.toml for bundler\n\n```toml\n[build]\ntarget = \"browser\"  # or \"node\", \"bun\"\nminify = true\nsourcemap = \"external\"\nsplitting = true\nentrypoints = [\"src\u002Findex.ts\"]\noutdir = \"dist\"\n\n# Asset naming\n[build.naming]\nentry = \"[dir]\u002F[name]-[hash].[ext]\"\nchunk = \"[name]-[hash].[ext]\"\nasset = \"[name]-[hash].[ext]\"\n\n[build.define]\nVERSION = \"1.0.0\"\n```\n\n## Native TOML Reader\u002FParser\n\nBun can parse TOML files natively (no dependencies needed):\n\n### Reading bunfig.toml\n\n```typescript\nimport { readFileSync } from \"fs\";\nimport TOML from \"bun:toml\";\n\n\u002F\u002F Parse bunfig.toml\nconst config = TOML.parse(readFileSync(\"bunfig.toml\", \"utf-8\"));\n\nconsole.log(config.build.target);        \u002F\u002F \"browser\"\nconsole.log(config.build.splitting);     \u002F\u002F true\nconsole.log(config.env.DATABASE_URL);    \u002F\u002F \"postgresql:\u002F\u002F...\"\n```\n\n### Parsing TOML strings\n\n```typescript\nimport TOML from \"bun:toml\";\n\nconst tomlString = `\n[database]\nhost = \"localhost\"\nport = 5432\nname = \"mydb\"\n\n[server]\nport = 3000\ndebug = true\n`;\n\nconst config = TOML.parse(tomlString);\nconsole.log(config.database.host);   \u002F\u002F \"localhost\"\nconsole.log(config.server.debug);    \u002F\u002F true\n```\n\n### Writing TOML\n\n```typescript\nimport TOML from \"bun:toml\";\nimport { writeFileSync } from \"fs\";\n\nconst config = {\n  database: {\n    host: \"localhost\",\n    port: 5432,\n  },\n  server: {\n    port: 3000,\n  },\n};\n\nconst tomlString = TOML.stringify(config);\nwriteFileSync(\"config.toml\", tomlString);\n```\n\n### Complete bunfig.toml example\n\n```toml\n# Bundler configuration\n[build]\ntarget = \"browser\"\nentrypoints = [\"src\u002Findex.ts\"]\noutdir = \"dist\"\nminify = true\nsourcemap = \"external\"\nsplitting = true\n\n# Asset naming patterns\n[build.naming]\nentry = \"[dir]\u002F[name]-[hash].[ext]\"\nchunk = \"[name]-[hash].[ext]\"\nasset = \"[name]-[hash].[ext]\"\n\n# Define compile-time constants\n[build.define]\nVERSION = \"1.0.0\"\nAPI_URL = \"https:\u002F\u002Fapi.example.com\"\nDEBUG = false\n\n# Bundler optimizations\n[build.optimization]\nremoveUnusedCode = true\ntreeshaking = true\n\n# Development server\n[serve]\nport = 3000\nhostname = \"localhost\"\nstaticDir = \"public\"\nhot = true\n\n# Environment variables\n[env]\nDATABASE_URL = \"postgresql:\u002F\u002Flocalhost\u002Fmydb\"\nNODE_ENV = \"development\"\n```\n\n### Loading environment from bunfig.toml\n\nBun automatically loads `[env]` section from bunfig.toml into `process.env`:\n\n```toml\n[env]\nDATABASE_URL = \"postgresql:\u002F\u002Flocalhost\"\nAPI_KEY = \"secret-key\"\n```\n\n```typescript\nconsole.log(process.env.DATABASE_URL);  \u002F\u002F Automatically loaded\n```\n\n## File I\u002FO\n\nBun extends Node.js fs with faster operations:\n\n```typescript\n\u002F\u002F Read file\nconst content = await Bun.file(\"path\u002Fto\u002Ffile.txt\").text();\nconst buffer = await Bun.file(\"path\u002Fto\u002Ffile.bin\").arrayBuffer();\nconst json = await Bun.file(\"data.json\").json();\n\n\u002F\u002F Write file\nawait Bun.write(\"output.txt\", \"content\");\nawait Bun.write(\"data.json\", JSON.stringify(obj, null, 2));\n\n\u002F\u002F Glob files\nfor (const file of await glob(\"src\u002F**\u002F*.ts\")) {\n  console.log(file);\n}\n```\n\n## Environment Variables\n\n```typescript\n\u002F\u002F .env file (auto-loaded)\nDATABASE_URL=postgresql:\u002F\u002F...\nAPI_KEY=secret123\n\n\u002F\u002F In code\nconst dbUrl = process.env.DATABASE_URL;\nconst apiKey = process.env.API_KEY;\n\n\u002F\u002F bunfig.toml\n[env]\nDATABASE_URL = \"postgresql:\u002F\u002Flocalhost\u002Fmydb\"\n```\n\n## Package Management Features\n\n### Trusting packages\n\n```bash\nbun install --trust    # Trust all packages (skip audit)\n```\n\n### Peer dependencies\n\n```bash\nbun add -P react@18    # Add as peer dependency\n```\n\n### Workspace dependencies\n\n```bash\nbun add @workspace\u002Fshared -w   # Add from workspace\n```\n\n### Git dependencies\n\n```bash\nbun add git+https:\u002F\u002Fgithub.com\u002Fuser\u002Frepo.git#main\n```\n\n### Lockfile\n\n- **bun.lock** — Always commit this (like package-lock.json)\n- Deterministic and fast to parse\n- Not meant for human editing\n\n## TypeScript Support\n\nBun has best-in-class TypeScript support with zero configuration:\n\n### Running TypeScript directly\n\n```bash\n# No compilation needed\nbun run app.ts\nbun app.ts\nbun --watch app.ts\n```\n\n### TypeScript 5+ features\n\n- **Enums** — Full enum support\n- **Decorators** — Experimental decorators\n- **Namespaces** — TypeScript namespaces\n- **Generic constraints** — Advanced type constraints\n- **Module augmentation** — Extend types from libraries\n\n```typescript\n\u002F\u002F Full TypeScript support out of the box\ninterface Config {\n  port: number;\n  debug: boolean;\n}\n\ntype ApiResponse\u003CT> = {\n  data: T;\n  status: \"success\" | \"error\";\n};\n\nconst config: Config = {\n  port: 3000,\n  debug: true,\n};\n\nasync function fetchUser(id: string): Promise\u003CApiResponse\u003CUser>> {\n  return { data: { id }, status: \"success\" };\n}\n```\n\n### Type-checking\n\n```bash\n# Check types without running\nbun check        # Check for type errors\n\n# In watch mode\nbun check --watch\n```\n\n### tsconfig.json\n\nBun respects tsconfig.json, but works without it:\n\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"ES2022\",\n    \"module\": \"ESNext\",\n    \"lib\": [\"ES2022\"],\n    \"strict\": true,\n    \"jsx\": \"react-jsx\",\n    \"skipLibCheck\": true\n  }\n}\n```\n\n### JSX support\n\nBun handles `.tsx` files natively:\n\n```typescript\n\u002F\u002F app.tsx - no build step needed\nexport function App() {\n  return \u003Ch1>Hello from Bun!\u003C\u002Fh1>;\n}\n```\n\n## SQLite Database\n\nBun has a built-in, fast SQLite driver:\n\n### Basic usage\n\n```typescript\nimport { Database } from \"bun:sqlite\";\n\n\u002F\u002F Open\u002Fcreate database\nconst db = new Database(\"myapp.db\");\n\n\u002F\u002F Execute SQL\ndb.exec(`\n  CREATE TABLE IF NOT EXISTS users (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    email TEXT UNIQUE NOT NULL,\n    name TEXT,\n    created_at DATETIME DEFAULT CURRENT_TIMESTAMP\n  )\n`);\n\n\u002F\u002F Insert with prepared statements\nconst insert = db.prepare(\"INSERT INTO users (email, name) VALUES (?, ?)\");\ninsert.run(\"alice@example.com\", \"Alice\");\ninsert.run(\"bob@example.com\", \"Bob\");\n\n\u002F\u002F Query all rows\nconst users = db.query(\"SELECT * FROM users\").all();\nconsole.log(users);\n\n\u002F\u002F Query single row\nconst user = db.query(\"SELECT * FROM users WHERE email = ?\").get(\"alice@example.com\");\nconsole.log(user);\n\n\u002F\u002F Query with parameters\nconst stmt = db.prepare(\"SELECT * FROM users WHERE id > ?\");\nconst filtered = stmt.all(1);\n\n\u002F\u002F Close database\ndb.close();\n```\n\n### Transactions\n\n```typescript\nconst db = new Database(\"myapp.db\");\n\nconst insert = db.prepare(\"INSERT INTO users (email, name) VALUES (?, ?)\");\n\n\u002F\u002F Transaction\ndb.transaction(() => {\n  insert.run(\"alice@example.com\", \"Alice\");\n  insert.run(\"bob@example.com\", \"Bob\");\n  insert.run(\"charlie@example.com\", \"Charlie\");\n})();  \u002F\u002F Execute transaction\n\n\u002F\u002F Rollback on error\ntry {\n  db.transaction(() => {\n    insert.run(\"dave@example.com\", \"Dave\");\n    throw new Error(\"Oops!\");\n  })();\n} catch (e) {\n  console.log(\"Transaction rolled back\");\n}\n```\n\n### Column affinity and type safety\n\n```typescript\ninterface User {\n  id: number;\n  email: string;\n  name: string | null;\n  created_at: string;\n}\n\nconst db = new Database(\"myapp.db\");\n\nconst query = db.query\u003CUser>(\n  \"SELECT * FROM users WHERE email = ?\"\n);\n\nconst user = query.get(\"alice@example.com\");\n\u002F\u002F user is typed as User | null\nconsole.log(user?.name);\n```\n\n### Performance features\n\n```typescript\nconst db = new Database(\"myapp.db\");\n\n\u002F\u002F Batch inserts are fastest\nconst insert = db.prepare(\"INSERT INTO users (email, name) VALUES (?, ?)\");\n\nconst batchInsert = db.batch([\n  insert,\n  insert,\n  insert,\n]);\n\nbatchInsert(\n  [\"alice@example.com\", \"Alice\"],\n  [\"bob@example.com\", \"Bob\"],\n  [\"charlie@example.com\", \"Charlie\"]\n);\n```\n\n### Common patterns\n\n```typescript\n\u002F\u002F Pagination\nconst query = db.query(\"SELECT * FROM users LIMIT ? OFFSET ?\");\nconst page = query.all(10, 0);  \u002F\u002F First 10\n\n\u002F\u002F Count\nconst count = db.query(\"SELECT COUNT(*) as count FROM users\").get() as { count: number };\nconsole.log(`Total users: ${count.count}`);\n\n\u002F\u002F Aggregation\nconst stats = db.query(`\n  SELECT \n    COUNT(*) as total,\n    MAX(created_at) as last_created\n  FROM users\n`).get();\n```\n\n## SQL Query Builder\n\nBun supports raw SQL and works well with query builders like Drizzle:\n\n```typescript\n\u002F\u002F With Drizzle ORM (recommended for complex apps)\nimport { drizzle } from \"drizzle-orm\u002Fbun-sqlite\";\nimport { Database } from \"bun:sqlite\";\n\nconst sqlite = new Database(\"myapp.db\");\nconst db = drizzle(sqlite);\n\n\u002F\u002F Type-safe queries with Drizzle\nconst users = await db\n  .select()\n  .from(usersTable)\n  .where(eq(usersTable.email, \"alice@example.com\"));\n```\n\nFor simple use cases, use raw SQLite API. For complex schemas and type safety, use Drizzle ORM.\n\n## Key Differences from Node.js\n\n| Feature | Node.js | Bun |\n|---------|---------|-----|\n| TypeScript | Needs ts-node or tsx | Native, zero-config |\n| JSX | Needs build step | Native support |\n| Package manager | npm\u002Fyarn\u002Fpnpm | Built-in `bun install` |\n| Test runner | Jest, Vitest | Built-in `bun test` |\n| Bundler | esbuild, webpack | Built-in `bun build` |\n| HTTP server | express, http module | Native `Bun.serve()` |\n| Performance | Standard | 3x faster (Rust VM) |\n| CommonJS | Supported | Supported (with caveats) |\n\n## Ecosystem Integration\n\nPopular frameworks with Bun:\n- **Web**: Express, Hono, Elysia, Next.js, Vite\n- **ORM**: Drizzle, Prisma, Mongoose\n- **Database**: PostgreSQL, MongoDB, Redis, SQLite\n- **Deployment**: Vercel, Railway, DigitalOcean, AWS Lambda, Google Cloud Run\n- **Testing**: Bun's built-in test runner (Jest-compatible)\n- **Monorepos**: Turborepo (or use Bun workspaces)\n\n## Performance Tips\n\n1. **Use Bun's native APIs**: `Bun.serve()`, `Bun.file()`, `Bun.build()` are faster than Node.js equivalents\n2. **Leverage workspaces**: No separate build steps for shared code\n3. **Bundle for production**: Use `bun build` with `--minify` and `--splitting`\n4. **HTTP streaming**: For large responses, use streams or `ReadableStream`\n5. **Worker threads**: Use Bun's worker support for CPU-bound tasks (via `new Worker()`)\n\n## Common Patterns\n\n### Environment-specific configuration\n\n```typescript\nconst isDev = process.env.NODE_ENV === \"development\";\nconst isTest = process.env.NODE_ENV === \"test\";\n\nconst config = {\n  port: parseInt(process.env.PORT || \"3000\"),\n  debug: isDev,\n  database: process.env.DATABASE_URL,\n};\n```\n\n### Graceful shutdown\n\n```typescript\nconst server = Bun.serve({\n  port: 3000,\n  fetch(req) {\n    return new Response(\"OK\");\n  },\n});\n\nprocess.on(\"SIGTERM\", () => {\n  console.log(\"Shutting down...\");\n  server.stop();\n  process.exit(0);\n});\n```\n\n### Environment detection\n\n```typescript\nif (import.meta.env.PROD) {\n  console.log(\"Running in production\");\n}\n\nif (process.platform === \"win32\") {\n  console.log(\"Running on Windows\");\n}\n```\n\n## When to Use Bun\n\n✓ **Best for:**\n- Full-stack TypeScript applications\n- CLI tools and scripts\n- HTTP APIs and servers (Bun.serve())\n- Monorepos with shared code (workspaces)\n- Development speed (fast hot reload, rapid testing)\n- Projects where you want everything built-in\n\n## Resources\n\n- [Bun Documentation](https:\u002F\u002Fbun.com\u002Fdocs)\n- [Bun GitHub](https:\u002F\u002Fgithub.com\u002Foven-sh\u002Fbun)\n",{"name":5,"references":23,"description":26,"compatibility":27},[24,25],"https:\u002F\u002Fbun.com\u002Fdocs","https:\u002F\u002Fbun.sh\u002Fllm.txt","Fast JavaScript runtime and all-in-one toolchain for building and deploying applications. Use Bun for package management, running TypeScript\u002FJSX directly, testing, bundling, building HTTP servers with Bun.serve(), managing workspaces, and CLI tooling. Covers monorepos, workspace dependencies, streaming, WebSocket support, and deployment.\n","Bun 1.0+, TypeScript, JSX, Node.js compatibility layer","main","c397ae3526932b4521e1d24d2f2878d52835aa8f","templates\u002Fskills\u002Fbun","https:\u002F\u002Fgithub.com\u002Fkillallservers\u002Fagentic","https:\u002F\u002Fgithub.com\u002Fkillallservers","2026-07-07 04:53:29",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add killallservers\u002Fagentic --skill bun",{"tool":40,"command":41},"bunx","bunx skills add killallservers\u002Fagentic --skill bun",{"tool":43,"command":44},"pnpm","pnpm dlx skills add killallservers\u002Fagentic --skill bun","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkillallservers\u002Fagentic\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fbun\u002FSKILL.md",true,[],[49,56,63,70,75,81],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M785W854K0Y0W5WJ7P60F1Z0","hono","Ultrafast, lightweight web framework for building APIs and full-stack applications on Bun. Use Hono whenever you need to build HTTP APIs, serverless functions, or full-stack apps with type-safe routing, middleware, authentication, and database integration. Covers routing patterns, middleware (auth, CORS, compression), Drizzle ORM integration, validation, file uploads, JSX rendering, and deployment on Bun.","https:\u002F\u002Fgithub.com\u002Fkillallservers\u002Fagentic\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fhono\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":18},"01M785W2MJEJTMN4V96YDXNDZ4","drizzle-orm","Generate Drizzle ORM 1.x code for Bun SQLite. Use this whenever a user mentions Drizzle, databases, schemas, queries, or needs help with database code. Covers schema generation, type-safe queries, Relational Queries v2, migrations (Folders v3), relations, and setup — all for Drizzle 1.x (use latest beta if not released). Always use this skill when the user is working with Drizzle on Bun or needs database code generation in TypeScript.","https:\u002F\u002Fgithub.com\u002Fkillallservers\u002Fagentic\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fdrizzle\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":18},"01M785VRFE9NBRXYZN7PYPT5XY","biome","Fast formatter and linter for TypeScript, JavaScript, and JSX.\nUse this skill whenever you need to configure Biome (biome.jsonc), set up linting\u002Fformatting, migrate from ESLint\u002FPrettier, fix code style issues, or optimize TypeScript project tooling. Always include biome commands in package.json scripts so the team has consistent, discoverable commands.","https:\u002F\u002Fgithub.com\u002Fkillallservers\u002Fagentic\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fbiome\u002FSKILL.md",[],[],{"skillNo":71,"name":51,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M785VQGBYB3SSMNNEEYXD4PS","https:\u002F\u002Fgithub.com\u002Fkillallservers\u002Fagentic\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhono\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M785VP9ZWP5JYZV08ZV7SHDM","drizzle","https:\u002F\u002Fgithub.com\u002Fkillallservers\u002Fagentic\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdrizzle\u002FSKILL.md",[],[],{"skillNo":82,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M785VNCNZFDDYPF24PN5WVK1","https:\u002F\u002Fgithub.com\u002Fkillallservers\u002Fagentic\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbun\u002FSKILL.md",[],[]]