bun-runtime
Skill1 starsChanged 7 months agoMITView on GitHub
Use Bun as runtime, package manager, bundler, and test runner — when to choose Bun over Node, the Node.js compatibility gotchas, migration from npm/pnpm, the built-in HTTP server, SQLite, and Bun's built-in test runner. Use when starting a new TS/JS project or evaluating a switch from Node.
- Reads credentials
9 other projects use a version of this.
Adopted by
Most recently taken up by
- imMamdouhaboammar/tiktok-growth-automation-meshtheir own version, first seen Oct 1, 2026
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- LuigiColantuono/bun-docs-toolkittheir own version, first seen Aug 21, 2026
- SamuelNDCE/claude-super-skill-librarytheir own version, first seen Aug 1, 2026
- JunMystery/Agent-Guidance-Pythontheir own version, first seen Jul 21, 2026
- Jamkris/everything-gemini-codetheir own version, first seen Apr 27, 2026
Used with
Projects with it also use nuxt4-patterns, santa-method and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
mryeastcodeSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 5 projects that use this
mryeastcodeSkillsanta-method
Multi-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.
Also in 6 projects that use this
JamkrisSkillagent-sort
Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.
Also in 4 projects that use this
JamkrisSkilllead-intelligence
AI-native lead intelligence and outreach pipeline. Replaces Apollo, Clay, and ZoomInfo with agent-powered signal scoring, mutual ranking, warm path discovery, source-derived voice modeling, and channel-specific outreach across email, LinkedIn, and X. Use when the user wants to find, qualify, and reach high-value contacts.
Also in 4 projects that use this
JunMysterySkillecc-guide
Guide users through ECC's current agents, skills, commands, hooks, rules, install profiles, and project onboarding by reading the live repository surface before answering.
Also in 3 projects that use this
JunMysterySkillrecsys-pipeline-architect
Design composable recommendation, ranking, and feed pipelines using the six-stage Source→Hydrator→Filter→Scorer→Selector→SideEffect framework popularized by xAI's open-sourced For You algorithm. Use this skill whenever the user is building any system that picks "the top K items for a (user, context)" — social feeds, content CMSs, RAG rerankers, task prioritizers, notification triage, search reranking, ad ranking.
Also in 3 projects that use this
- +4 more from Jamkris
- +1 more from mryeastcode
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- loulanyue/awesome-claude-notes★ 272same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- Jamkris/everything-gemini-code★ 87same name
- JunMystery/Agent-Guidance-Python★ 2same name
- SamuelNDCE/claude-super-skill-library★ 1same name
- imMamdouhaboammar/tiktok-growth-automation-mesh★ 0same name
- LuigiColantuono/bun-docs-toolkit★ 0same name
- mryeastcode/ClaudeCode★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository50 other files it gives its agents.
- algolia-searchSkill
- audit-tautological-testsSkill
- blame-archaeologySkill
- brevo-emailSkill
- clerk-authSkill
- cloudflare-workersSkill
- dbt-data-modelingSkill
- explain-this-diffSkill
- extract-skill-from-sessionSkill
- fastapi-productionSkill
- find-dead-codeSkill
- find-real-bugSkill
- gdpr-dpiaSkill
- github-actions-ciSkill
- graphql-relaySkill
- grpc-servicesSkill
- hipaa-auditSkill
- india-dpdp-actSkill
- java-8-to-21Skill
- jest-to-vitestSkill
- kubernetes-helmSkill
- mongo-to-postgresSkill
- nextjs-pages-to-appSkill
- node-version-upgradeSkill
- opentelemetry-instrumentSkill
- pci-dss-checklistSkill
- plan-the-rollbackSkill
- python-2-to-3Skill
- razorpay-integrationSkill
- react-native-expoSkill
- scaffold-cli-toolSkill
- scaffold-fullstack-appSkill
- scaffold-go-microserviceSkill
- scaffold-new-appSkill
- scaffold-saas-starterSkill
- sentry-monitoringSkill
- shrink-this-prSkill
- soc2-evidenceSkill
- spec-from-conversationSkill
- stripe-integrationSkill
- supabase-backendSkill
- terraform-patternsSkill
- threat-modeling-strideSkill
- triage-stack-traceSkill
- wcag-accessibility-auditSkill
- webpack-to-viteSkill
- write-adrSkill
- write-commit-messageSkill
- write-pr-descriptionSkill
- write-runbookSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 142
Run your Node test suite under Bun before committing to it as runtime.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bun Runtime
Bun is a Node-compatible JS runtime, package manager, bundler, and test runner — all one binary, written in Zig. Faster than Node + pnpm + tsc + vitest combined for most workloads. Trade-off: 95% Node compatibility, not 100%.
When to use
- New TS/JS project — install speed alone is worth it.
- Build/test bottleneck on your CI.
- Edge-deploy compatible (Cloudflare Workers / Vercel) — Bun runs on Vercel as of 2025.
- CLI tools —
bun build --compileproduces single-binary executables.
When NOT to use
- Production runtime for a Node app with deep ecosystem deps you haven't tested.
- Apps using native modules that haven't been ported (rare; check your
node_modules). - Any case where "must be 100% Node identical" is a hard requirement.
What Bun replaces
| Tool | Replaced by |
| Node | bun run (runtime) |
| npm/pnpm/yarn | bun install |
| ts-node / tsx | Native — Bun runs .ts files directly |
| nodemon | bun --hot |
| webpack/esbuild/vite (for libs) | bun build |
| jest/vitest | bun test |
| dotenv | Built-in .env loading |
Migration from Node + pnpm
# In existing repo
bun install # reads package.json, replaces node_modules
bun pm ls # verify deps installed
# Run scripts
bun run dev # uses package.json scripts
bun run build
# Replace runtime
node server.js → bun server.js
ts-node script.ts → bun script.ts # no compile step
# Replace tests
vitest → bun test # if you used vitest's globalspackage.json scripts work as-is. bun install produces a bun.lockb (binary lockfile); commit it; delete pnpm-lock.yaml / package-lock.json when fully migrated.
Built-in HTTP server (zero deps)
// server.ts
const server = Bun.serve({
port: 3000,
async fetch(req) {
const url = new URL(req.url);
if (url.pathname === "/healthz") return new Response("ok");
if (url.pathname.startsWith("/api/")) return handleApi(req);
return new Response("not found", { status: 404 });
},
});
console.log(`Listening on ${server.port}`);Bun.serve is roughly 4x faster than Express for raw throughput. It speaks the standard Request/Response Web API — code is portable to Cloudflare Workers and Deno.
Built-in SQLite
import { Database } from "bun:sqlite";
const db = new Database("app.sqlite");
db.run("CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, email TEXT)");
const insert = db.prepare("INSERT INTO users (email) VALUES (?)");
insert.run("a@b.com");
const rows = db.query("SELECT * FROM users").all();Faster than better-sqlite3, no native compile step, ships with the runtime. Replaces a lot of "small persistent state" use cases for CLI tools.
Built-in test runner
// users.test.ts
import { describe, expect, test } from "bun:test";
import { greet } from "./users";
describe("greet", () => {
test("returns hello", () => {
expect(greet("Mahesh")).toBe("Hello, Mahesh");
});
});bun test # run all *.test.ts
bun test --coverage # built-in coverage
bun test --watch
bun test users # name filterJest-compatible API. Migration from Vitest is mostly imports.
.env loading (built-in)
Bun automatically loads .env, .env.local, .env.<NODE_ENV>. No dotenv package. .env.local overrides .env; both are loaded before your app code runs.
Building a single-binary CLI
bun build --compile --target=bun-linux-x64 --outfile=mycli ./src/cli.tsProduces a 50–80MB binary that includes the runtime. No node install needed on target machine. Cross-compile for darwin-x64, darwin-arm64, linux-x64, linux-arm64, win-x64.
Performance reality check
bun installis 5–25x faster thannpm install, 2–10x faster thanpnpm.bun runvsnoderuntime is 1.1–1.5x faster on typical Node workloads (not 3x like marketing claims).bun buildis comparable to esbuild.bun testis 2–5x faster than vitest.
The compounded CI win (install + test + build) is the real story. A 4-min CI becomes 90s.
Compatibility gotchas
| Issue | Workaround |
Some node: modules incomplete (node:cluster, node:vm) | Check bun --print 'process.versions.bun' and feature support before relying |
| Native modules requiring node-gyp | Most work; some need rebuilding. bun pm trust <pkg> |
npm-only postinstall hooks | Bun doesn't run lifecycle scripts by default — bun install --trust |
Differences in process.env mutation | Bun freezes process.env after start in production; mutate before serving |
| Worker threads API surface | Mostly works; some edge cases differ |
Run your Node test suite under Bun before committing to it as runtime.
Edge deploy
Cloudflare Workers: standard Worker syntax (no Bun APIs); use Bun for bun build step in CI.
Vercel: now supports Bun directly as runtime; specify in vercel.json "build": { "env": { "BUN_RUNTIME": "1" } } or use bun install in build step.
Anti-patterns
- Mixing
bun installandnpm installin the same repo — divergent lockfiles, irreproducible builds. Pick one. - Committing
node_modules"for safety" — lockfile +bun installis reproducible. - Using
bun:imports in code that may run on Node — breaks portability. Either commit fully or feature-detect. - Production runtime without testing the actual Node deps — 5% incompatibility usually means 1–2 packages bite. Test before betting prod on it.
- Relying on
bun buildfor production library bundling without testing the output — output differs from Vite/Rollup in subtle ways for libs. - Using
Bun.servethen trying to deploy to Lambda — Lambda expects a handler, not a server. Use Hono or similar abstraction. bun --hotin production — dev-only.bun runfor prod.- Running
bun testfor end-to-end browser tests — Bun doesn't have a browser. Use Playwright separately. - Skipping
bun test --coveragebecause "it might miss edges" — it works fine; the coverage tool is honest about what it sees.
Verify it worked
bun installin a fresh clone is < 5s for a typical app.bun testpasses the same suite that worked under Node + vitest.bun run buildproduces the expected output.- All native deps work (
bun pm ls --allshows no errors). - Production app under
bun server.jshandles the same load asnode server.jswithout crashing. - CI time is materially shorter than the Node baseline.
.env.localoverrides.envautomatically (nodotenvimport).- Single-binary
bun build --compileruns on a target machine without Node installed. bun --hotreloads the server on file change.- No mixing of
npm install/bun install— onlybun.lockbexists.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

