[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EMENH1ENF27DXKYZ4PTDAX":3,"skill-same:01M7EMENH1ENF27DXKYZ4PTDAX":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EMENH1ENF27DXKYZ4PTDAX","bun-pro",null,"Bun runtime guidance — fast installs, built-in bundler and test runner, Bun.serve APIs, and migration from Node.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-bun-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bun-pro\ndescription: Bun runtime guidance — fast installs, built-in bundler and test runner, Bun.serve APIs, and migration from Node.\ncategory: development\n---\n\n## Overview\n\nBun is an all-in-one JavaScript and TypeScript runtime built on JavaScriptCore that replaces Node plus npm plus your bundler plus your test runner with a single fast binary. Its headline features are near-instant installs, a native bundler, a Jest-compatible test runner, and a high-performance HTTP server API (`Bun.serve`). Bun also aims for broad Node.js compatibility, so most existing projects run with little or no change. This skill covers using Bun effectively, migrating from Node, and knowing where the edges still are.\n\n## When to use\n\n- Starting a new JS\u002FTS project where install speed and a single toolchain matter.\n- Migrating a Node project to reduce toolchain complexity (one binary for runtime, bundler, tests).\n- Building high-throughput HTTP services or WebSocket servers on `Bun.serve`.\n- Speeding up CI with faster installs and test runs.\n- Evaluating runtime tradeoffs between Bun, Node, and Deno.\n- Bundling frontend assets without a separate webpack\u002Fvite setup.\n- Writing CLIs where a single compiled binary simplifies distribution.\n\n## Core concepts\n\n- **One binary, four tools.** `bun run` (runtime), `bun install` (package manager), `bun build` (bundler), `bun test` (test runner). Learn all four before reaching for webpack\u002Fvite\u002Fjest equivalents — you often do not need them.\n- **Node compatibility layer.** Bun implements `node:` builtins and npm package semantics. Most pure-JS packages work; native addons and exotic `node_modules` layouts are where breaks happen — test before switching production.\n- **Bun.serve and WebSockets.** The native server API handles HTTP and WebSocket upgrades with far less overhead than framework stacks:\n  ```ts\n  Bun.serve({\n    port: 3000,\n    fetch(req) { return new Response(\"hi\"); },\n    websocket: { message(ws, msg) { ws.send(\"echo: \" + msg); } },\n  });\n  ```\n- **Built-in SQLite and FFI.** `bun:sqlite` gives a zero-dependency embedded database; `bun:ffi` calls native libraries directly. Both remove whole dependency classes for small services.\n- **Transpiler on by default.** Bun runs TypeScript, JSX\u002FTSX, and modern syntax natively — no tsconfig wrangling for runtime behavior (though you still want `tsc` or an editor for type errors).\n- **Workspaces and lockfile.** Bun supports npm-style workspaces with its own lockfile (`bun.lockb`, binary by default — text lockfile mode gives readable diffs). Commit it for reproducible installs.\n- **npm registry compatibility.** `bun install` reads the npm registry and respects `package.json` semantics, so migration is usually `bun install` plus `bun run` away.\n- **Hot reloading.** `--hot` watches and reloads on file changes — fast iteration in dev, never in production.\n- **Macros.** Compile-time code execution (`macro()`) for codegen-like patterns without a build plugin — powerful, but keep macros simple and deterministic.\n- **Environment and dotenv.** Bun loads `.env` files automatically — convenient, but ensure secrets still come from the environment in production, not committed files.\n\n## Practical workflow\n\n1. **Install and verify.** Use the official install script from the Bun website, then confirm the version your team pins with `bun --version`.\n   - Record the version in README\u002FCI; Bun moves fast and behavior changes between minors.\n2. **Migrate or scaffold.** In an existing Node project, run `bun install` (npm scripts keep working) or start fresh with `bun init`. Prefer the text lockfile for clean git diffs.\n3. **Replace the toolchain.** Swap scripts to `bun run`, tests to `bun test` (Jest-style `describe`\u002F`it`\u002F`expect` mostly works), and builds to `bun build .\u002Fsrc\u002Findex.ts --outdir=dist --target=bun`.\n   - Run the full test suite under both runtimes during migration; snapshot-test differences are the usual finding.\n4. **Build the server.** Use `Bun.serve` for hot paths; keep framework code (Elysia, Hono) for routing structure. Put SQLite behind `bun:sqlite` for local-first persistence.\n5. **Handle WebSockets properly.** Define `open`\u002F`message`\u002F`close` handlers, track connections in a Set with metadata, and implement application-level heartbeats — the same reliability rules as any socket server.\n   ```ts\n   const clients = new Set\u003CServerWebSocket\u003Cunknown>>();\n   Bun.serve({\n     fetch(req, server) {\n       if (server.upgrade(req)) return;\n       return new Response(\"websocket only\", { status: 400 });\n     },\n     websocket: {\n       open(ws) { clients.add(ws); },\n       close(ws) { clients.delete(ws); },\n       message(ws, msg) { \u002F* handle *\u002F },\n     },\n   });\n   ```\n6. **Compile for distribution.** `bun build --compile` produces a standalone executable — handy for CLIs and single-binary deploys without a runtime install.\n7. **Containerize.** Use the official Bun image, copy `package.json` plus lockfile, run `bun install --frozen-lockfile`, then copy source — same layer-caching discipline as Node images.\n8. **Monitor in production.** Track event-loop lag, memory, and request latency like any Node service; Bun's speed doesn't exempt it from observability.\n\n## Common pitfalls\n\n- **Assuming 100% Node parity** — check Bun's compatibility tracker for the APIs you use (streams edge cases, cluster, some `child_process` behaviors) before cutting over.\n- **Binary lockfile diffs** — `bun.lockb` is unreadable in PRs; use text lockfile mode if reviewability matters to your team.\n- **Native dependencies** built for Node's V8 ABI — some need rebuilds or do not work under JavaScriptCore; test on the target platform.\n- **Skipping type checking** — Bun runs TS without checking it; run `tsc --noEmit` in CI or type errors accumulate silently.\n- **Overusing watch mode in production** — `--hot` is for development; production needs a process manager and graceful shutdown.\n- **Ignoring `--frozen-lockfile` in CI** — without it, CI can install different versions than your machine.\n- **Treating Bun APIs as portable** — `Bun.serve`, `bun:sqlite`, and `bun:ffi` do not exist in Node\u002FDeno; isolate them behind adapters if you may switch runtimes.\n- **No graceful shutdown** — `Bun.serve` needs explicit signal handling to drain connections on deploy; don't rely on defaults.\n- **SQLite concurrency assumptions** — `bun:sqlite` is single-writer; high-write workloads need WAL mode or a client-server DB.\n- **Version churn** — pinning matters more with a fast-moving runtime; unpinned CI picks up breaking changes.\n- **No `.env` discipline** — auto-loaded `.env` files committed with secrets; keep them gitignored and document required vars.\n- **Forgetting `bun outdated`** — dependencies drifting because installs are so fast nobody audits; review updates regularly.\n","## Overview\n\nBun is an all-in-one JavaScript and TypeScript runtime built on JavaScriptCore that replaces Node plus npm plus your bundler plus your test runner with a single fast binary. Its headline features are near-instant installs, a native bundler, a Jest-compatible test runner, and a high-performance HTTP server API (`Bun.serve`). Bun also aims for broad Node.js compatibility, so most existing projects run with little or no change. This skill covers using Bun effectively, migrating from Node, and knowing where the edges still are.\n\n## When to use\n\n- Starting a new JS\u002FTS project where install speed and a single toolchain matter.\n- Migrating a Node project to reduce toolchain complexity (one binary for runtime, bundler, tests).\n- Building high-throughput HTTP services or WebSocket servers on `Bun.serve`.\n- Speeding up CI with faster installs and test runs.\n- Evaluating runtime tradeoffs between Bun, Node, and Deno.\n- Bundling frontend assets without a separate webpack\u002Fvite setup.\n- Writing CLIs where a single compiled binary simplifies distribution.\n\n## Core concepts\n\n- **One binary, four tools.** `bun run` (runtime), `bun install` (package manager), `bun build` (bundler), `bun test` (test runner). Learn all four before reaching for webpack\u002Fvite\u002Fjest equivalents — you often do not need them.\n- **Node compatibility layer.** Bun implements `node:` builtins and npm package semantics. Most pure-JS packages work; native addons and exotic `node_modules` layouts are where breaks happen — test before switching production.\n- **Bun.serve and WebSockets.** The native server API handles HTTP and WebSocket upgrades with far less overhead than framework stacks:\n  ```ts\n  Bun.serve({\n    port: 3000,\n    fetch(req) { return new Response(\"hi\"); },\n    websocket: { message(ws, msg) { ws.send(\"echo: \" + msg); } },\n  });\n  ```\n- **Built-in SQLite and FFI.** `bun:sqlite` gives a zero-dependency embedded database; `bun:ffi` calls native libraries directly. Both remove whole dependency classes for small services.\n- **Transpiler on by default.** Bun runs TypeScript, JSX\u002FTSX, and modern syntax natively — no tsconfig wrangling for runtime behavior (though you still want `tsc` or an editor for type errors).\n- **Workspaces and lockfile.** Bun supports npm-style workspaces with its own lockfile (`bun.lockb`, binary by default — text lockfile mode gives readable diffs). Commit it for reproducible installs.\n- **npm registry compatibility.** `bun install` reads the npm registry and respects `package.json` semantics, so migration is usually `bun install` plus `bun run` away.\n- **Hot reloading.** `--hot` watches and reloads on file changes — fast iteration in dev, never in production.\n- **Macros.** Compile-time code execution (`macro()`) for codegen-like patterns without a build plugin — powerful, but keep macros simple and deterministic.\n- **Environment and dotenv.** Bun loads `.env` files automatically — convenient, but ensure secrets still come from the environment in production, not committed files.\n\n## Practical workflow\n\n1. **Install and verify.** Use the official install script from the Bun website, then confirm the version your team pins with `bun --version`.\n   - Record the version in README\u002FCI; Bun moves fast and behavior changes between minors.\n2. **Migrate or scaffold.** In an existing Node project, run `bun install` (npm scripts keep working) or start fresh with `bun init`. Prefer the text lockfile for clean git diffs.\n3. **Replace the toolchain.** Swap scripts to `bun run`, tests to `bun test` (Jest-style `describe`\u002F`it`\u002F`expect` mostly works), and builds to `bun build .\u002Fsrc\u002Findex.ts --outdir=dist --target=bun`.\n   - Run the full test suite under both runtimes during migration; snapshot-test differences are the usual finding.\n4. **Build the server.** Use `Bun.serve` for hot paths; keep framework code (Elysia, Hono) for routing structure. Put SQLite behind `bun:sqlite` for local-first persistence.\n5. **Handle WebSockets properly.** Define `open`\u002F`message`\u002F`close` handlers, track connections in a Set with metadata, and implement application-level heartbeats — the same reliability rules as any socket server.\n   ```ts\n   const clients = new Set\u003CServerWebSocket\u003Cunknown>>();\n   Bun.serve({\n     fetch(req, server) {\n       if (server.upgrade(req)) return;\n       return new Response(\"websocket only\", { status: 400 });\n     },\n     websocket: {\n       open(ws) { clients.add(ws); },\n       close(ws) { clients.delete(ws); },\n       message(ws, msg) { \u002F* handle *\u002F },\n     },\n   });\n   ```\n6. **Compile for distribution.** `bun build --compile` produces a standalone executable — handy for CLIs and single-binary deploys without a runtime install.\n7. **Containerize.** Use the official Bun image, copy `package.json` plus lockfile, run `bun install --frozen-lockfile`, then copy source — same layer-caching discipline as Node images.\n8. **Monitor in production.** Track event-loop lag, memory, and request latency like any Node service; Bun's speed doesn't exempt it from observability.\n\n## Common pitfalls\n\n- **Assuming 100% Node parity** — check Bun's compatibility tracker for the APIs you use (streams edge cases, cluster, some `child_process` behaviors) before cutting over.\n- **Binary lockfile diffs** — `bun.lockb` is unreadable in PRs; use text lockfile mode if reviewability matters to your team.\n- **Native dependencies** built for Node's V8 ABI — some need rebuilds or do not work under JavaScriptCore; test on the target platform.\n- **Skipping type checking** — Bun runs TS without checking it; run `tsc --noEmit` in CI or type errors accumulate silently.\n- **Overusing watch mode in production** — `--hot` is for development; production needs a process manager and graceful shutdown.\n- **Ignoring `--frozen-lockfile` in CI** — without it, CI can install different versions than your machine.\n- **Treating Bun APIs as portable** — `Bun.serve`, `bun:sqlite`, and `bun:ffi` do not exist in Node\u002FDeno; isolate them behind adapters if you may switch runtimes.\n- **No graceful shutdown** — `Bun.serve` needs explicit signal handling to drain connections on deploy; don't rely on defaults.\n- **SQLite concurrency assumptions** — `bun:sqlite` is single-writer; high-write workloads need WAL mode or a client-server DB.\n- **Version churn** — pinning matters more with a fast-moving runtime; unpinned CI picks up breaking changes.\n- **No `.env` discipline** — auto-loaded `.env` files committed with secrets; keep them gitignored and document required vars.\n- **Forgetting `bun outdated`** — dependencies drifting because installs are so fast nobody audits; review updates regularly.\n",{"name":5,"category":24,"description":7},"development","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-bun-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill bun-pro",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill bun-pro",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill bun-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-bun-pro\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]