Agent skill

Bun Runtime

by secondsky in secondsky/claude-skills

A skill your agent uses for Bun runtime, bunfig.toml, watch/hot modes, env vars, CLI flags, and module resolution.

MITAuto-check: notesDevelopment

Install Bun Runtime

skills CLI
$ npx skills add secondsky/claude-skills --skill bun-runtime -a claude-code

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

GitHub CLI
$ gh skill install secondsky/claude-skills bun-runtime --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/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/bun/skills/bun-runtime .claude/skills/bun-runtime && 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-runtime
GitHub stars
227
Token cost
~1k tokens
SKILL.md length
278 words
Files
4 (incl. references)
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses for Bun runtime, bunfig.toml, watch/hot modes, env vars, CLI flags, and module resolution.

  • Watch/hot modes
  • SKILL.md covers Quick Start, Core CLI Flags, Running Files and Package.json Scripts, plus 9 more sections
  • Calls bun; needs API_KEY
  • Module resolution

What it does

Bun Runtime is an agent skill from secondsky/claude-skills. Use for Bun runtime, bunfig.toml, watch/hot modes, env vars, CLI flags, and module resolution.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/bunfig.md`, `references/cli-flags.md` and `references/module-resolution.md`).

It sits in Development. It works with Bun and Node.js. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • Watch/hot modes
  • Module resolution

Example prompts

  • “/bun-runtime”

Requirements

  • Node.js
  • A credential in API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. 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

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

  • Network

    No URLs in SKILL.md.

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY

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

Context cost

Bun Runtime loads about 1k tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 27 tokens; SKILL.md has 278 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.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:39
    | `--env-file` | Load specific .env file |
  • NoteMentions a .env fileSKILL.md:92
    Bun automatically loads `.env` files:
  • NoteMentions a .env fileSKILL.md:95
    # Loads automatically: .env, .env.local, .env.development
  • NoteMentions a .env fileSKILL.md:99
    bun --env-file .env.production run index.ts

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 secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 278 words, ~1,038 tokens.

Download SKILL.mdSave it as .claude/skills/bun-runtime/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
bun-runtime
description
Use for Bun runtime, bunfig.toml, watch/hot modes, env vars, CLI flags, and module resolution.
metadata.version
1.0.0
license
MIT

Bun Runtime

Bun is a fast all-in-one JavaScript runtime built on JavaScriptCore (Safari's engine). It provides 4x faster startup than Node.js on Linux.

Quick Start

bash
# Run a file
bun run index.ts
bun index.ts  # shorthand

# Run with watch mode
bun --watch run index.ts

# Run package.json script
bun run dev

# Run with hot reloading
bun --hot run server.ts

Core CLI Flags

FlagPurpose
--watchRestart on file changes
--hotHot module replacement (preserves state)
--smolReduce memory usage (slower GC)
--inspectEnable debugger
--preloadLoad modules before execution
--env-fileLoad specific .env file
-e, --evalEvaluate code string

Running Files

Bun transpiles TypeScript and JSX on-the-fly:

bash
bun run index.js
bun run index.ts
bun run index.jsx
bun run index.tsx

Important: Put Bun flags immediately after bun:

bash
bun --watch run dev    # Correct
bun run dev --watch    # Wrong - flag passed to script

Package.json Scripts

bash
# Run script
bun run dev
bun dev  # shorthand (if no Bun command conflicts)

# List available scripts
bun run

# Run with Bun instead of Node
bun run --bun vite

Bun respects lifecycle hooks (preclean, postclean, etc.).

Watch Mode vs Hot Reloading

ModeFlagBehavior
Watch--watchFull process restart on changes
Hot--hotReplace modules, preserve state
bash
# Watch mode - full restart
bun --watch run server.ts

# Hot reloading - preserves connections/state
bun --hot run server.ts

Environment Variables

Bun automatically loads .env files:

bash
# Loads automatically: .env, .env.local, .env.development
bun run index.ts

# Specify env file
bun --env-file .env.production run index.ts

# Disable auto-loading
# In bunfig.toml: env = false

Access in code:

typescript
const apiKey = process.env.API_KEY;
const bunEnv = Bun.env.NODE_ENV;

Globals Available

GlobalSourceNotes
BunBunMain API object
BufferNode.jsBinary data
processNode.jsProcess info
fetchWebHTTP requests
Request/ResponseWebHTTP types
WebSocketWebWebSocket client
cryptoWebCryptography
consoleWebLogging
__dirnameNode.jsCurrent directory
__filenameNode.jsCurrent file

Preload Scripts

Load modules before your main script:

bash
bun --preload ./setup.ts run index.ts

Or in bunfig.toml:

toml
preload = ["./setup.ts"]

Use cases: polyfills, global setup, instrumentation.

Stdin Execution

bash
# Pipe code to Bun
echo "console.log('Hello')" | bun run -

# Redirect file
bun run - < script.js

Workspaces & Monorepos

bash
# Run script in specific packages
bun run --filter 'pkg-*' build

# Run in all workspaces
bun run --filter '*' test

Debugging

bash
# Start debugger
bun --inspect run index.ts

# Wait for debugger connection
bun --inspect-wait run index.ts

# Break on first line
bun --inspect-brk run index.ts

Connect via Chrome DevTools or VS Code.

Common Errors

ErrorCauseFix
Cannot find moduleMissing dependencyRun bun install
Top-level awaitUsing await outside asyncWrap in async function or use .mts
--watch not workingFlag in wrong positionPut flag before run

When to Load References

Load references/bunfig.md when:

  • Configuring bunfig.toml
  • Setting up test configuration
  • Configuring package manager behavior
  • Setting JSX options

Load references/cli-flags.md when:

  • Need complete CLI flag reference
  • Configuring advanced runtime options
  • Setting up debugging

Load references/module-resolution.md when:

  • Troubleshooting import errors
  • Configuring path aliases
  • Understanding Bun's resolution algorithm

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

Files

SKILL.md and 3 other files (references) in plugins/bun/skills/bun-runtime of secondsky/claude-skills.

  • SKILL.md
  • references/bunfig.md
  • references/cli-flags.md
  • references/module-resolution.md

Open the folder on GitHubat commit 8837836

Compare with similar skills

Bun Runtime 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 Runtime compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bun Runtime this skillsecondsky/claude-skills227—~1kAutomated safety check: NotesMIT
Bun Runtime and Toolkitmweinbach/agent-coworker156—~2.2kAutomated safety check: NotesCustom licence
Bungalfrevn/apollo237—~2kAutomated safety check: NotesMIT
Bunbastani-inc/atomic846—~2.8kAutomated safety check: PassCustom licence
Electron Multi-Process ArchitectureiOfficeAI/AionUi33k1 repos~1.8kAutomated safety check: PassApache-2.0
OpenTUI Terminal Interfacescline/cline70k—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • 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 today
    DevelopmentAuto-check: notes
  • Bun

    galfrevn/apollo

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

    237 GitHub stars~2k tokensUpdated 1 mo ago
    Testing & QAAuto-check: notes
  • Bun

    bastani-inc/atomic

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

    846 GitHub stars~2.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Tells the agent where new code belongs in an Electron multi-process project and which APIs each process may use, with rules for new bridges, services, agents and workers.

    33k GitHub starsUsed in 1 repo~1.8k tokens
    DevelopmentAuto-check passed
  • Helps build terminal user interfaces with OpenTUI using its core imperative API or its React and Solid reconcilers, with references for layout, keyboard, animation and testing.

    70k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Bun Development

    GabrielMartinMoran/mind

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

    148 GitHub starsUsed in 11 repos~3.5k tokens
    Auto-check: notes

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 9 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 9 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 9 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 9 days ago
    Auto-check passed

Works with

Categories

Questions about Bun Runtime

What does Bun Runtime do?

A skill your agent uses for Bun runtime, bunfig.toml, watch/hot modes, env vars, CLI flags, and module resolution. Bun Runtime is an agent skill from secondsky/claude-skills.toml, watch/hot modes, env vars, CLI flags, and module resolution.

When should I use Bun Runtime?

Bun Runtime fits situations like: watch/hot modes; module resolution.

How do I install Bun Runtime in Claude Code?

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

How do I install Bun Runtime in Codex?

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

Can I use Bun Runtime 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 secondsky/claude-skills --skill bun-runtime -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-runtime, .gemini/skills/bun-runtime, .github/skills/bun-runtime and .opencode/skills/bun-runtime in your project.

What does Bun Runtime need to run?

Going by SKILL.md and its folder, Bun Runtime needs the command-line tools its instructions call (bun) and credentials named API_KEY. Our summary lists: Node.js; A credential in API_KEY.

Does Bun Runtime access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Bun Runtime 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 Runtime use?

Bun Runtime is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bun Runtime use?

About 1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.1k tokens, read only when the agent opens those files.

What are the alternatives to Bun Runtime?

Skills that share tags, products or a category with Bun Runtime: Bun Runtime and Toolkit (mweinbach/agent-coworker, 156 stars), Bun (galfrevn/apollo, 237 stars), Bun (bastani-inc/atomic, 846 stars) and Electron Multi-Process Architecture (iOfficeAI/AionUi, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bun Runtime?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

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