bun-development

Guides JavaScript and TypeScript development with the Bun runtime including bundling, testing, and Node.js migration.

1|Updated May 10, 2026
One-click install
npx skills add https://github.com/Tgoldi/claude-skills --skill bun-development-tgoldi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-development
Source: https://github.com/Tgoldi/claude-skills/tree/main/bun-development
Command: npx skills add https://github.com/Tgoldi/claude-skills --skill bun-development-tgoldi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working with the Bun runtime need accurate, up-to-date guidance on its package manager, built-in bundler, test runner, and native APIs, plus a clear path for migrating existing Node.js projects without breaking compatibility. ## Core Features & Use Cases - Project Setup & Package Management: Initialize projects with bun init, manage dependencies with bun add/remove/update, and configure Bun-optimized tsconfig.json settings. - Built-in APIs & Tooling: Use Bun.serve for HTTP/WebSocket servers, Bun.file for fast file I/O, bun:sqlite for embedded databases, and Bun.password for hashing. - Testing & Bundling: Run tests with the built-in bun test runner (matchers, mocking, coverage) and bundle or compile standalone executables with bun build. - Use Case: You inherit a Node.js Express API and want to migrate it to Bun. Follow the migration steps to swap the package manager, update scripts, replace Express with Bun.serve or Elysia, and convert Jest tests to bun test. ## Quick Start Ask the assistant to help you initialize a new Bun TypeScript project with a basic HTTP server and a test file.

Frequently Asked Questions about bun-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a Node.js project to Bun?

Install Bun, delete node_modules and package-lock.json, then run bun install. Update package.json scripts to use bun run and bun test, add @types/bun as a dev dependency, and replace Node-specific patterns like require with import statements.

How do I run tests with Bun's built-in test runner?

Write tests using describe, it, and expect imported from bun:test, then execute bun test in your project root. It supports watch mode, coverage reports, pattern filtering with --grep, and mocking via mock and spyOn.

Bun vs Node.js: what are the main differences?

Bun runs TypeScript and JSX natively without a transpiler, starts faster, and includes a built-in bundler, test runner, and package manager. Most Node.js APIs like fs, path, Buffer, and process work out of the box, but require.resolve and setImmediate have Bun-specific equivalents.

Does Bun support building standalone executables?

Yes, bun build with the --compile flag produces a standalone executable from your entry file. You can cross-compile for other platforms using --target, such as bun-linux-x64 or bun-darwin-arm64, and embed assets with --embed.

How do I create an HTTP server with Bun?

Use Bun.serve with a port and a fetch handler that returns Response objects based on the request URL. It also supports WebSocket upgrades through the websocket handler option and is significantly faster than frameworks like Express.