Agent skill

Bun

by galfrevn in galfrevn/apollo

A skill your agent uses when building, running, testing, or bundling JavaScript/TypeScript applications.

MITAuto-check: notesTesting & QA

Install Bun

skills CLI
$ npx skills add galfrevn/apollo --skill bun -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install galfrevn/apollo bun --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/galfrevn/apollo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/bun .claude/skills/bun && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bun
GitHub stars
237
Token cost
~2k tokens
SKILL.md length
773 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when building, running, testing, or bundling JavaScript/TypeScript applications.

  • Works in 7 steps: Start a New Project → Add Dependencies → Write and Run Code → …
  • Bundling JavaScript/TypeScript applications
  • SKILL.md covers Product Summary, When to Use, Quick Reference and Decision Guidance, plus 4 more sections
  • Calls bun, bunx and tsc

What it does

Bun is an agent skill from galfrevn/apollo. Use when building, running, testing, or bundling JavaScript/TypeScript applications. Reach for Bun when you need to execute scripts, manage dependencies, run tests, or bundle code for production. Bun is a drop-in replacement for Node.js with integrated package manager, test runner, and bundler.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA. It works with TypeScript, Node.js, JavaScript and Bun. The repository describes itself as: The open-source brain for physical agentic devices, powered by Cloudflare Workers. The licence is MIT.

When your agent uses it

  • Bundling JavaScript/TypeScript applications

Example prompts

  • “/bun”

Requirements

  • Node.js

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Start a New Project
  2. Add Dependencies
  3. Write and Run Code
  4. Write Tests
  5. Build for Production
  6. Configure bunfig.toml (Optional)
  7. Deploy

What it can do on your machine

Read from SKILL.md and the folder at commit c7605d6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun
    • bunx
    • tsc

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • bun.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bun loads about 2k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 773 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:74
    | `.env` | Environment variables (auto-loaded) |
  • NoteMentions a .env fileSKILL.md:235
    **Environment variables auto-load from `.env`:** Disable with `env = false` in `bunfig.toml` if needed
  • NoteMentions a .env fileSKILL.md:256
    ] Environment variables are set (check `.env` or CI/CD config)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from galfrevn/apollo at commit c7605d6, republished under its MIT licence (© galfrevn). 773 words, ~2,001 tokens.

Download SKILL.mdSave it as .claude/skills/bun/SKILL.md (or your agent's skills folder).
name
bun
description
Use when building, running, testing, or bundling JavaScript/TypeScript applications. Reach for Bun when you need to execute scripts, manage dependencies, run tests, or bundle code for production. Bun is a drop-in replacement for Node.js with integrated package manager, test runner, and bundler.
metadata.mintlify-proj
bun
metadata.version
1.0

Bun Skill Reference

Product Summary

Bun is an all-in-one JavaScript/TypeScript runtime and toolkit. It replaces Node.js, npm, Jest, and esbuild with a single fast executable. Bun runs TypeScript and JSX natively without configuration, starts 4x faster than Node.js, and includes a package manager (30x faster than npm), test runner (Jest-compatible), and bundler.

Key files and commands:

  • bunfig.toml — Bun configuration (optional, in project root)
  • package.json — Standard Node.js manifest; Bun reads it directly
  • bun run <file> — Execute TypeScript/JavaScript files
  • bun install — Install dependencies (creates bun.lock)
  • bun test — Run tests (finds *.test.ts, *.spec.ts, etc.)
  • bun build — Bundle code for production
  • bunx <package> — Execute packages without installing

Primary docs: https://bun.com/docs


When to Use

Use this skill when:

  • Running TypeScript or JSX files directly without compilation
  • Installing or managing npm packages faster than npm/yarn/pnpm
  • Writing and running tests with a Jest-like API
  • Bundling JavaScript/TypeScript for browsers or servers
  • Building full-stack applications with HTML imports
  • Executing package.json scripts with bun run
  • Setting up a new project with bun init
  • Deploying to production with bun build

Do not use for:

  • Type checking (use tsc separately)
  • Generating TypeScript type declarations
  • Projects that require Node.js-specific APIs not yet in Bun (check compatibility)

Quick Reference

Essential Commands
TaskCommand
Run a filebun run index.ts or bun index.ts
Run a scriptbun run dev (from package.json scripts)
Install depsbun install
Add a packagebun add react
Add dev depbun add -d @types/react
Remove packagebun remove react
Run testsbun test
Watch testsbun test --watch
Bundle codebun build ./index.ts --outdir ./dist
Watch bundlerbun build ./index.ts --outdir ./dist --watch
Execute packagebunx cowsay "Hello"
Initialize projectbun init
File Conventions
PatternMeaning
*.test.ts, *.test.jsTest files (auto-discovered)
*_test.ts, *_spec.tsAlternative test patterns
bunfig.tomlBun configuration (optional)
bun.lockLockfile (text format, commit to git)
.envEnvironment variables (auto-loaded)
Configuration in bunfig.toml
toml
# Runtime
[serve]
port = 3000

[test]
root = "./__tests__"
coverage = true
timeout = 5000

[install]
optional = true
dev = true
production = false
linker = "hoisted"  # or "isolated"

[run]
shell = "system"
bun = true
silent = false

Decision Guidance

When to use bun run vs bun <file>
ScenarioUse
Running a script from package.jsonbun run dev
Running a file directlybun index.ts or bun run index.ts
Running with Bun flags (watch, etc.)bun --watch run index.ts
Running a system commandbun run ls (inside package.json script)
When to use bun install vs bun add
ScenarioUse
Install all dependencies from package.jsonbun install
Add a new packagebun add react
Add a dev dependencybun add -d typescript
Install in production (no devDeps)bun install --production
Frozen lockfile (CI/CD)bun install --frozen-lockfile
When to use hoisted vs isolated linker
ScenarioUse
Traditional npm behavior, shared node_moduleshoisted
Strict dependency isolation, prevent phantom depsisolated
New workspaces/monoreposisolated (default)
Existing projectshoisted (default for backward compat)
When to bundle vs run directly
ScenarioUse
Development, rapid iterationbun run (no bundling)
Production server codebun build --target bun
Browser/client codebun build --target browser
Node.js compatibilitybun build --target node
Single executablebun build --target bun --outfile app

Show full SKILL.md (298 more words)Show less

Workflow

1. Start a New Project
bash
bun init
# Choose template: Blank, React, or Library
cd my-app
bun run index.ts
2. Add Dependencies
bash
bun add react react-dom
bun add -d typescript @types/react
3. Write and Run Code
bash
# Edit index.ts with TypeScript/JSX
bun run index.ts

# Or watch for changes
bun --watch run index.ts
4. Write Tests

Create math.test.ts:

ts
import { test, expect } from "bun:test";

test("2 + 2 = 4", () => {
  expect(2 + 2).toBe(4);
});

Run tests:

bash
bun test
bun test --watch
bun test --coverage
5. Build for Production
bash
# Bundle for browser
bun build ./src/index.tsx --outdir ./dist --target browser

# Bundle for server
bun build ./src/server.ts --outdir ./dist --target bun

# Create single executable
bun build ./src/server.ts --outfile app --target bun
6. Configure bunfig.toml (Optional)
toml
[serve]
port = 8080

[test]
coverage = true
timeout = 10000

[install]
linker = "isolated"
7. Deploy
bash
# Build for production
bun build ./src/server.ts --outdir ./dist --minify

# Run in production
bun ./dist/server.js

Common Gotchas

  • TypeScript errors on Bun global: Install @types/bun and configure tsconfig.json with "lib": ["ESNext"]
  • Lifecycle scripts don't run by default: Add packages to trustedDependencies in package.json to allow postinstall scripts
  • bun run flags must come before the script name: Use bun --watch run dev, not bun run dev --watch
  • Test files must match patterns: Use *.test.ts, *_test.ts, *.spec.ts, or *_spec.ts
  • Environment variables auto-load from .env: Disable with env = false in bunfig.toml if needed
  • bun.lock is text format: Commit it to git; it's human-readable and mergeable
  • Peer dependencies install by default: Unlike npm, Bun installs peerDependencies automatically
  • Node.js compatibility is ongoing: Check Node.js compat docs for unsupported APIs
  • Bundler doesn't type-check: Run tsc --noEmit separately for type checking
  • Auto-install disabled in production: Set install.auto = "disable" in bunfig.toml for CI/CD

Verification Checklist

Before submitting work with Bun:

  • Tests pass: bun test runs without errors
  • No TypeScript errors: bunx tsc --noEmit (if using TypeScript)
  • Code runs locally: bun run index.ts or bun run dev
  • Dependencies are declared: bun add <package> (not manually edited package.json)
  • bun.lock is committed (if using version control)
  • bunfig.toml is configured for your use case (if needed)
  • Build succeeds: bun build ./src/index.ts --outdir ./dist
  • No console errors or warnings in output
  • Environment variables are set (check .env or CI/CD config)
  • Trusted dependencies are declared if using lifecycle scripts

Resources

Comprehensive navigation: https://bun.com/docs/llms.txt

Critical documentation pages:

  1. Bun Runtime — Execute files and scripts
  2. Package Manager — Install and manage dependencies
  3. Test Runner — Write and run tests
  4. Bundler — Bundle code for production
  5. HTTP Server — Build servers with Bun.serve

For additional documentation and navigation, see: https://bun.com/docs/llms.txt

© galfrevn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/bun of galfrevn/apollo.

Open the folder on GitHubat commit c7605d6

Compare with similar skills

Bun next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bun compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bun this skillgalfrevn/apollo237—~2kAutomated safety check: NotesMIT
Bunbastani-inc/atomic850—~2.8kAutomated safety check: PassCustom licence
Bun Runtime and Toolkitmweinbach/agent-coworker156—~2.2kAutomated safety check: NotesCustom licence
Javascript SDKaiskillstore/marketplace4301 repos~3.3kAutomated safety check: PassNone
Otel JSollygarden/opentelemetry-agent-skills106—~655Automated safety check: PassApache-2.0
Bun DevelopmentGabrielMartinMoran/mind14812 repos~3.5kAutomated safety check: NotesMIT

Similar skills

  • Bun

    bastani-inc/atomic

    A skill your agent uses when building, testing, and deploying JavaScript/TypeScript applications.

    850 GitHub stars~2.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Bun Runtime and Toolkit

    mweinbach/agent-coworker

    Quick reference for using Bun to run TypeScript and JavaScript, install packages, bundle code, run tests and serve HTTP, with the key files and commands.

    156 GitHub stars~2.2k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Javascript SDK

    aiskillstore/marketplace

    JavaScript/TypeScript SDK for inference.sh - run AI apps, build agents, integrate with all models.

    430 GitHub starsUsed in 1 repo~3.3k tokens
    Backend & APIsAuto-check passed
  • Otel JS

    ollygarden/opentelemetry-agent-skills

    OpenTelemetry in Node.js / JavaScript / TypeScript — NodeSDK, declarative YAML configuration, auto-instrumentations, ESM vs CJS import patterns.

    106 GitHub stars~655 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Bun Development

    GabrielMartinMoran/mind

    Modern JavaScript/TypeScript development with Bun runtime. An agent skill from GabrielMartinMoran/mind.

    148 GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • E2E Test

    crowdin/crowdin-api-client-js

    Run end-to-end tests against the real Crowdin or Crowdin Enterprise API using credentials from .env.

    139 GitHub stars~893 tokensUpdated 2 days ago
    Testing & QAAuto-check: notes

More from galfrevn/apollo

  • Greploop

    galfrevn/apollo

    Runs the Greptile CLI on the current local branch, fixes what the review finds, and reviews again, until the review comes back 5/5 with zero comments.

    237 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check: notes
  • Diagnose SEO

    galfrevn/apollo

    Structured diagnostic for technical SEO problems. An agent skill from galfrevn/apollo.

    237 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Optimize For AI

    galfrevn/apollo

    Optimize content for AI search engines — ChatGPT, Perplexity, Claude, Gemini, Google AI Overviews.

    237 GitHub stars~4.3k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Bun

What does Bun do?

A skill your agent uses when building, running, testing, or bundling JavaScript/TypeScript applications. Bun is an agent skill from galfrevn/apollo. Use when building, running, testing, or bundling JavaScript/TypeScript applications.

When should I use Bun?

Bun fits situations like: bundling JavaScript/TypeScript applications.

How do I install Bun in Claude Code?

Run `npx skills add galfrevn/apollo --skill bun -a claude-code`. Or copy the skill folder (.agents/skills/bun in galfrevn/apollo) into .claude/skills/bun in your project. Claude Code loads it when a task matches its description.

How do I install Bun in Codex?

Run `npx skills add galfrevn/apollo --skill bun -a codex`. Or copy the skill folder (.agents/skills/bun in galfrevn/apollo) into .agents/skills/bun in your project. Codex loads it when a task matches its description.

Can I use Bun in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add galfrevn/apollo --skill bun -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bun, .gemini/skills/bun, .github/skills/bun and .opencode/skills/bun in your project.

What does Bun need to run?

Going by SKILL.md and its folder, Bun needs the command-line tools its instructions call (bun, bunx and tsc). Our summary lists: Node.js.

Does Bun access the network?

SKILL.md names 1 domain. As links in the text: bun.com. This is read from the text; nothing was executed.

Is Bun safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Bun use?

Bun is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bun use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bun?

Skills that share tags, products or a category with Bun: Bun (bastani-inc/atomic, 850 stars), Bun Runtime and Toolkit (mweinbach/agent-coworker, 156 stars), Javascript SDK (aiskillstore/marketplace, 430 stars) and Otel JS (ollygarden/opentelemetry-agent-skills, 106 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bun?

galfrevn (a GitHub user) maintains it in galfrevn/apollo, which has 237 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on August 17, 2026.

Source: galfrevn/apollo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.