bun

Runs, bundles, tests, and manages dependencies for JavaScript and TypeScript projects with Bun.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/samline/forms --skill bun-samline
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bun
Source: https://github.com/samline/forms/tree/main/.agents/skills/bun
Command: npx skills add https://github.com/samline/forms --skill bun-samline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing JavaScript/TypeScript projects typically requires juggling separate tools for running code, installing packages, bundling, and testing. This Skill consolidates those workflows into Bun's single unified toolchain, helping you execute scripts, manage dependencies, build bundles, and run tests correctly. ## Core Features & Use Cases - Script Execution & Dependency Management: Run TypeScript files directly with bun run, install packages with bun install, and configure behavior via bunfig.toml. - Bundling & Testing: Build production bundles with bun build, compile standalone executables, and run Jest-compatible tests with bun test. - Use Case: You are scaffolding a new TypeScript API server. Use this Skill to initialize the project with bun init, add dependencies, start an HTTP server with Bun.serve(), write tests, and ship a compiled single-file executable. ## Quick Start Use the bun skill to initialize a new TypeScript project, install its dependencies, and run the test suite.

Frequently Asked Questions about bun

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

FAQPage Schema
How do I run a TypeScript file with Bun?▼

Run TypeScript files directly with `bun run file.ts` or the short form `bun file.ts`. Bun transpiles TypeScript on-the-fly, so no separate compilation step or tsconfig setup is required for execution.

Bun vs npm for installing packages, which is faster?▼

Bun installs packages significantly faster than npm, roughly 25x in benchmarks, and generates a text-based `bun.lock` lockfile. Commands like `bun install`, `bun add`, and `bun remove` mirror npm workflows while updating package.json automatically.

Does Bun support running Jest tests?▼

Bun includes a built-in Jest-compatible test runner invoked with `bun test`. It automatically discovers `*.test.ts` and `*.spec.ts` files and supports imports from `bun:test` with familiar `test` and `expect` APIs.

Why does bun build not catch TypeScript type errors?▼

Bun's bundler transpiles without type checking, so type errors are silently ignored during builds. Run `tsc --noEmit` separately to validate types before shipping production bundles.

When should I not use Bun for a project?▼

Avoid Bun when you need exact Node.js compatibility for native modules, since Bun implements most but not all Node.js APIs. It also does not generate type declarations or perform type checking, so keep `tsc` in your workflow.

Why are postinstall scripts not running after bun install?▼

Bun disables lifecycle scripts like postinstall by default for security. Add the packages that need them to `trustedDependencies` in package.json to allow their scripts to execute.