bun-runtime-expert
Skill75 starsChanged 38 days agoMITView on GitHub
Expert guide for Bun JavaScript/TypeScript runtime. Use when building, testing, or deploying applications with Bun / Panduan ahli untuk runtime JavaScript/TypeScript Bun. Digunakan saat membuat, menguji, atau meluncurkan aplikasi dengan Bun.
- Pipes a download into a shell
- Reads credentials
In this repository149 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/vibes-plug-core.mdcCursor rule
- accessibility-testing-expertSkill
- adaptive-model-cascadeSkill
- affective-computing-emotion-aiSkill
- agentic-coding-workflow-expertSkill
- agentic-memory-architectSkill
- agentic-micro-economy-architectSkill
- ai-code-review-autonomousSkill
- ai-llm-integration-expertSkill
- ai-media-generation-expertSkill
- ai-prompt-engineering-expertSkill
- ai-safety-governance-expertSkill
- angular-expertSkill
- anti-slopSkill
- api-design-expertSkill
- api-gateway-proxy-expertSkill
- app-analyzer-optimizerSkill
- apple-ecosystem-expertSkill
- app-promo-media-expertSkill
- astro-framework-expertSkill
- async-queue-temporal-expertSkill
- authentication-identity-expertSkill
- autonomous-api-drift-healerSkill
- autonomous-red-teamerSkill
- autonomous-tdd-debuggerSkill
- biome-linter-formatter-expertSkill
- blockchain-web3-expertSkill
- brainstormingSkill
- browser-automation-expertSkill
- chatbot-messaging-expertSkill
- ci-cd-devops-architectSkill
- cloud-hosting-expertSkill
- coderabbitSkill
- compliance-gdpr-privacy-expertSkill
- composable-mach-architectSkill
- context-window-engineerSkill
- cron-scheduler-expertSkill
- database-orm-expertSkill
- data-pipeline-etl-expertSkill
- data-telemetry-expertSkill
- data-visualization-expertSkill
- deep-research-analystSkill
- dependency-upgrade-migratorSkill
- design-system-architectSkill
- desktop-electron-expertSkill
- documentation-site-expertSkill
- doku-mcp-serverSkill
- doku-payment-gatewaySkill
- domain-driven-design-expertSkill
- e2e-testing-expertSkill
- ecommerce-expertSkill
- email-notification-expertSkill
- ephemeral-generative-ui-architectSkill
- ephemeral-wasm-sandbox-executorSkill
- error-resilience-expertSkill
- event-driven-architectSkill
- feature-flag-analytics-expertSkill
- file-upload-media-expertSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Use when scaffolding a new project with Bun as the runtime.
- Very specific: line 24
Use when building HTTP servers or APIs with Bun.serve().
- Very specific: line 25
Use when querying databases with Bun.sql (PostgreSQL, MySQL, SQLite).
- Very specific: line 26
Use when interacting with S3-compatible object storage via Bun.s3.
- Very specific: line 27
Use when bundling frontend or backend code with bun build.
- Very specific: line 28
Use when writing tests with bun:test.
- Very specific: line 29
Use when migrating an existing Node.js project to Bun.
- Distinctive: line 30
Use when optimizing package installation speed or lockfile management.
- Very specific: line 109
Performance: Use Bun.serve() directly or Hono for HTTP — avoid Express (slower compat layer).
- Very specific: line 110
Security: Always parameterize queries via template literals in Bun.sql (automatically prevents SQL injection).
- Very specific: line 111
Testing: Use bun:test — it's Jest-compatible and significantly faster.
- Distinctive: line 217
Use this skill only when the task involves the Bun runtime specifically.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bun Runtime Expert
English | Bahasa Indonesia
<a name="english"></a>
English
Orchestration & Integration
Connects and orchestrates with relevant domain skills like brainstorming, zero-to-prod-orchestrator, and session-memory-manager to ensure cohesive execution.
Expert-level guidance for building high-performance applications with the Bun JavaScript/TypeScript runtime (v1.1+). Covers Bun's built-in HTTP server, database clients, bundler, test runner, package manager, and Node.js migration strategies.
Trigger Conditions
- Use when scaffolding a new project with Bun as the runtime.
- Use when building HTTP servers or APIs with
Bun.serve(). - Use when querying databases with
Bun.sql(PostgreSQL, MySQL, SQLite). - Use when interacting with S3-compatible object storage via
Bun.s3. - Use when bundling frontend or backend code with
bun build. - Use when writing tests with
bun:test. - Use when migrating an existing Node.js project to Bun.
- Use when optimizing package installation speed or lockfile management.
Core Architecture
Why Bun?
Bun is a batteries-included JavaScript/TypeScript runtime that replaces Node.js, npm, Webpack/Vite, and Jest in a single binary:
| Capability | Bun Built-in | Node.js Equivalent |
| Runtime | bun run | node |
| Package Manager | bun install | npm / pnpm / yarn |
| Bundler | bun build | Webpack / Vite / esbuild |
| Test Runner | bun test | Jest / Vitest |
| HTTP Server | Bun.serve() | Express / Fastify |
| SQL Client | Bun.sql | pg / mysql2 / better-sqlite3 |
| S3 Client | Bun.s3 | @aws-sdk/client-s3 |
| Redis Client | Built-in | ioredis |
| TypeScript | Native (zero config) | ts-node / tsx |
.env loading | Native | dotenv |
Quick Start
1. Install Bun
# macOS / Linux
curl -fsSL https://bun.sh/install | bash
# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"
# Verify installation
bun --version2. Initialize a New Project
bun initThis generates package.json, tsconfig.json, and an index.ts entry point. TypeScript works out of the box with zero configuration.
3. Install Dependencies
# Install all dependencies (10-100x faster than npm)
bun install
# Add a package
bun add hono zod drizzle-orm
# Add dev dependency
bun add -d @types/bun vitestBun.serve() — High-Performance HTTP Server
Bun.serve() is a zero-dependency HTTP server with built-in TLS, WebSocket support, and hot module reloading.
Basic HTTP Server
Bun.serve({
port: 3000,
fetch(req) {
const url = new URL(req.url);
if (url.pathname === '/api/health') {
return Response.json({ status: 'ok', runtime: 'bun' });
}
return new Response('Not Found', { status: 404 });
},
});Bun.sql — Unified Database Client
Zero-dependency SQL client supporting PostgreSQL, MySQL/MariaDB, and SQLite via tagged template literals.
PostgreSQL
import { sql } from 'bun';
const users = await sql`SELECT * FROM users WHERE active = ${true}`;Best Practices
- Performance: Use
Bun.serve()directly or Hono for HTTP — avoid Express (slower compat layer). UseBun.file()for efficient file I/O. - Security: Always parameterize queries via template literals in
Bun.sql(automatically prevents SQL injection). - Testing: Use
bun:test— it's Jest-compatible and significantly faster.
<a name="bahasa-indonesia"></a>
Bahasa Indonesia
Integrasi Orkestrasi
Terhubung dan mengorkestrasi skill domain yang relevan seperti brainstorming, zero-to-prod-orchestrator, dan session-memory-manager untuk memastikan eksekusi yang kohesif.
Panduan tingkat ahli untuk membangun aplikasi berkinerja tinggi menggunakan runtime JavaScript/TypeScript Bun (v1.1+). Mencakup server HTTP bawaan, klien database, bundler, test runner, package manager, dan strategi migrasi dari Node.js.
Kondisi Pemicu
- Gunakan saat merancang proyek baru menggunakan Bun sebagai runtime.
- Gunakan saat membangun server HTTP atau API dengan
Bun.serve(). - Gunakan saat melakukan query database dengan
Bun.sql(PostgreSQL, MySQL, SQLite). - Gunakan saat berinteraksi dengan object storage yang kompatibel dengan S3 via
Bun.s3. - Gunakan saat membundel kode frontend atau backend dengan
bun build. - Gunakan saat menulis pengujian (testing) menggunakan
bun:test. - Gunakan saat memigrasikan proyek Node.js ke Bun.
- Gunakan saat mengoptimalkan kecepatan instalasi paket atau manajemen lockfile.
Arsitektur Inti
Mengapa Bun?
Bun adalah runtime JavaScript/TypeScript serba ada yang menggantikan Node.js, npm, Webpack/Vite, dan Jest dalam satu berkas biner tunggal:
| Kemampuan | Bawaan Bun | Setara di Node.js |
| Runtime | bun run | node |
| Package Manager | bun install | npm / pnpm / yarn |
| Bundler | bun build | Webpack / Vite / esbuild |
| Test Runner | bun test | Jest / Vitest |
| HTTP Server | Bun.serve() | Express / Fastify |
| SQL Client | Bun.sql | pg / mysql2 / better-sqlite3 |
| S3 Client | Bun.s3 | @aws-sdk/client-s3 |
| Redis Client | Built-in | ioredis |
| TypeScript | Native (tanpa config) | ts-node / tsx |
.env loading | Native | dotenv |
Memulai Cepat
1. Instal Bun
# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"
# macOS / Linux
curl -fsSL https://bun.sh/install | bash
# Verifikasi instalasi
bun --version2. Inisialisasi Proyek Baru
bun initIni menghasilkan package.json, tsconfig.json, dan file entry point index.ts. TypeScript langsung berfungsi tanpa konfigurasi tambahan.
3. Instal Dependensi
# Mengmenginstal semua dependensi (10-100x lebih cepat dari npm)
bun install
# Menambahkan paket
bun add hono zod drizzle-orm
# Menambahkan dev dependency
bun add -d @types/bun vitestBun.serve() — HTTP Server Berkinerja Tinggi
Bun.serve() adalah server HTTP tanpa dependensi eksternal dengan dukungan TLS bawaan, WebSocket, dan hot module reloading.
Server HTTP Dasar
Bun.serve({
port: 3000,
fetch(req) {
const url = new URL(req.url);
if (url.pathname === '/api/health') {
return Response.json({ status: 'ok', runtime: 'bun' });
}
return new Response('Not Found', { status: 404 });
},
});Bun.sql — Klien Database Terpadu
Klien SQL tanpa dependensi eksternal yang mendukung PostgreSQL, MySQL/MariaDB, dan SQLite melalui tagged template literals.
PostgreSQL
import { sql } from 'bun';
const users = await sql`SELECT * FROM users WHERE active = ${true}`;Praktik Terbaik
- Performa: Gunakan
Bun.serve()secara langsung atau bersama Hono — hindari Express (karena lapisan kompatibilitasnya lebih lambat). GunakanBun.file()untuk I/O file yang efisien. - Keamanan: Selalu gunakan parameterisasi query melalui template literals di
Bun.sqluntuk mencegah SQL Injection secara otomatis. - Pengujian: Gunakan
bun:testyang kompatibel dengan Jest namun jauh lebih cepat.
Limitations / Batasan
- Use this skill only when the task involves the Bun runtime specifically.
- Bun's Node.js compatibility is extensive but not 100%. Always verify critical
node:*API usage.
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.

