bun

Execute shell commands, file I/O, and tests using Bun runtime APIs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reference for Bun runtime APIs used in this project. Use this skill whenever writing code that runs shell commands (Bun.$ or Bun.spawn), reading/writing files (Bun.file/Bun.write), running tests (bun test), or configuring the monorepo (workspaces, bunfig.toml). Prefer Bun APIs over Node.js equivalents — use Bun.$ instead of child_process, Bun.file() instead of fs.readFile, bun:test instead of jest.

Core Features & Use Cases

  • Shell automation with Bun.$ and Bun.spawn for reliable command execution.
  • File I/O with Bun.file and Bun.write for fast, Bun-backed reads and writes.
  • Testing and monorepo tooling with bun test, bunfig.toml, and workspace configurations.

Quick Start

Install Bun and create a small script that prints a file's contents with Bun.file and runs a command with Bun.$.

Frequently Asked Questions about bun

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

FAQPage Schema
How do I run shell commands in Bun scripts instead of using Node child_process?

Use Bun.$ or Bun.spawn to execute shell commands in Bun scripts, replacing Node.js child_process. Bun.$ provides a template literal interface for direct command execution, while Bun.spawn handles process spawning with fine-grained control.

What is the best way to read and write files using Bun runtime APIs?

Use Bun.file to read and Bun.write to write files using Bun runtime APIs. These native functions provide fast file I/O operations, replacing Node.js fs methods for reading file contents and writing data directly to disk.

Can I use bun test for running tests in a monorepo with workspaces?

Yes, bun test executes test suites within monorepo workspaces. You can configure workspace definitions and bunfig.toml to orchestrate test execution across multiple packages, providing a built-in alternative to Jest for monorepo projects.

Does Bun support configuring monorepo workspaces and test execution?

Bun supports monorepo configuration through workspace definitions in package.json and bunfig.toml settings. You can manage multiple packages, define workspace boundaries, and configure test execution settings to orchestrate tasks across the monorepo.

Why should I prefer Bun APIs over Node.js equivalents for scripting and automation?

Prefer Bun APIs over Node.js equivalents for scripting and automation to leverage faster runtime performance. Bun.$ replaces child_process, Bun.file replaces fs.readFile, and bun:test replaces Jest, providing optimized native operations for command execution and file I/O.