bun-runtime

Standardize JavaScript and TypeScript projects with Bun as runtime and package manager.

1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/hughescr/claude-code-config --skill bun-runtime-hughescr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bun-runtime
Source: https://github.com/hughescr/claude-code-config/tree/main/plugins/javascript/skills/bun-runtime
Command: npx skills add https://github.com/hughescr/claude-code-config --skill bun-runtime-hughescr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill standardizes JavaScript/TypeScript development around Bun, eliminating inconsistent runtimes and package managers by promoting Bun-first workflows.

Core Features & Use Cases

  • Bun as runtime & package manager: bun install, bun add, bun remove, bun update, and bun run for scripts.
  • Script-driven workflows: Always prefer package.json scripts via bun run to ensure project configurations are respected.
  • Testing and tooling with Bun: bun test and Bun's built-in tooling to run and test code, with guidance on fake timers when applicable.
  • No build step under Bun development: Run code directly; bundle only when distributing with bun build.

Quick Start

On a new or existing project, install Bun, then replace npm commands with Bun equivalents:

  • Install dependencies: bun install
  • Add a package: bun add <package>
  • Run a script: bun run <script> or bun <script> if no conflict
  • Run tests: bun test
  • Install Bun: curl -fsSL https://bun.sh/install | bash

Frequently Asked Questions about bun-runtime

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

FAQPage Schema
How do I run TypeScript files directly without a build step?

You can run TypeScript files directly without a build step by using Bun as your runtime. Bun natively executes TypeScript and JavaScript code without transpilation, allowing you to run scripts immediately and only requiring bun build for distribution bundles.

What is the best way to manage npm packages with Bun?

Managing npm packages with Bun involves using built-in commands like bun install, bun add, and bun update. This standardizes package management across npm-compatible ecosystems, replacing standard npm commands to ensure consistent dependency resolution and faster installation.

How do I run scripts in package.json using Bun?

Run package.json scripts with Bun by executing bun run <script>. This script-driven workflow ensures project configurations are properly respected. You can also use bun <script> directly if there are no command conflicts in your environment.

Does Bun include a built-in test runner for JavaScript and TypeScript?

Bun includes a built-in test runner for JavaScript and TypeScript projects. Execute tests using the bun test command. This integrated tooling runs and tests code directly within the Bun runtime, providing guidance on features like fake timers when applicable.

Can I replace my existing package manager with Bun for an existing project?

You can replace your existing package manager with Bun in current projects. Install Bun, then replace standard npm commands with Bun equivalents like bun install and bun add. This standardizes JavaScript and TypeScript development around a single, consistent runtime environment.