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.
A skill your agent uses for Bun runtime, bunfig.toml, watch/hot modes, env vars, CLI flags, and module resolution.
$ npx skills add secondsky/claude-skills --skill bun-runtime -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install secondsky/claude-skills bun-runtime --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "bun-runtime" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-runtime into .claude/skills/bun-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-runtime", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-runtimeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add secondsky/claude-skills --skill bun-runtime -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install secondsky/claude-skills bun-runtime --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/bun/skills/bun-runtime .agents/skills/bun-runtime && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "bun-runtime" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-runtime into .agents/skills/bun-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-runtime", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill bun-runtime -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install secondsky/claude-skills bun-runtime --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/bun/skills/bun-runtime .cursor/skills/bun-runtime && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "bun-runtime" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-runtime into .cursor/skills/bun-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-runtime", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/secondsky/claude-skills.git --path plugins/bun/skills/bun-runtime--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add secondsky/claude-skills --skill bun-runtime -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install secondsky/claude-skills bun-runtime --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/bun/skills/bun-runtime .gemini/skills/bun-runtime && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "bun-runtime" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-runtime into .gemini/skills/bun-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-runtime", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install secondsky/claude-skills bun-runtimeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add secondsky/claude-skills --skill bun-runtime -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/bun/skills/bun-runtime .github/skills/bun-runtime && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "bun-runtime" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-runtime into .github/skills/bun-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-runtime", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill bun-runtime -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install secondsky/claude-skills bun-runtime --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/bun/skills/bun-runtime .opencode/skills/bun-runtime && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "bun-runtime" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-runtime into .opencode/skills/bun-runtime/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-runtime", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
bun-runtimeA 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. 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.
Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
bunFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
| `--env-file` | Load specific .env file |Bun automatically loads `.env` files:# Loads automatically: .env, .env.local, .env.developmentbun --env-file .env.production run index.tsAutomated 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.
The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 278 words, ~1,038 tokens.
.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.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.
# 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| Flag | Purpose |
|---|---|
--watch | Restart on file changes |
--hot | Hot module replacement (preserves state) |
--smol | Reduce memory usage (slower GC) |
--inspect | Enable debugger |
--preload | Load modules before execution |
--env-file | Load specific .env file |
-e, --eval | Evaluate code string |
Bun transpiles TypeScript and JSX on-the-fly:
bun run index.js
bun run index.ts
bun run index.jsx
bun run index.tsxImportant: Put Bun flags immediately after bun:
bun --watch run dev # Correct
bun run dev --watch # Wrong - flag passed to script# 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 viteBun respects lifecycle hooks (preclean, postclean, etc.).
| Mode | Flag | Behavior |
|---|---|---|
| Watch | --watch | Full process restart on changes |
| Hot | --hot | Replace modules, preserve state |
# Watch mode - full restart
bun --watch run server.ts
# Hot reloading - preserves connections/state
bun --hot run server.tsBun automatically loads .env files:
# 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 = falseAccess in code:
const apiKey = process.env.API_KEY;
const bunEnv = Bun.env.NODE_ENV;| Global | Source | Notes |
|---|---|---|
Bun | Bun | Main API object |
Buffer | Node.js | Binary data |
process | Node.js | Process info |
fetch | Web | HTTP requests |
Request/Response | Web | HTTP types |
WebSocket | Web | WebSocket client |
crypto | Web | Cryptography |
console | Web | Logging |
__dirname | Node.js | Current directory |
__filename | Node.js | Current file |
Load modules before your main script:
bun --preload ./setup.ts run index.tsOr in bunfig.toml:
preload = ["./setup.ts"]Use cases: polyfills, global setup, instrumentation.
# Pipe code to Bun
echo "console.log('Hello')" | bun run -
# Redirect file
bun run - < script.js# Run script in specific packages
bun run --filter 'pkg-*' build
# Run in all workspaces
bun run --filter '*' test# 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.tsConnect via Chrome DevTools or VS Code.
| Error | Cause | Fix |
|---|---|---|
Cannot find module | Missing dependency | Run bun install |
Top-level await | Using await outside async | Wrap in async function or use .mts |
--watch not working | Flag in wrong position | Put flag before run |
Load references/bunfig.md when:
Load references/cli-flags.md when:
Load references/module-resolution.md when:
© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files (references) in plugins/bun/skills/bun-runtime of secondsky/claude-skills.
Open the folder on GitHubat commit 8837836
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Bun Runtime this skillsecondsky/claude-skills | 227 | — | ~1k | Automated safety check: Notes | MIT | |
| Bun Runtime and Toolkitmweinbach/agent-coworker | 156 | — | ~2.2k | Automated safety check: Notes | Custom licence | |
| Bungalfrevn/apollo | 237 | — | ~2k | Automated safety check: Notes | MIT | |
| Bunbastani-inc/atomic | 846 | — | ~2.8k | Automated safety check: Pass | Custom licence | |
| Electron Multi-Process ArchitectureiOfficeAI/AionUi | 33k | 1 repos | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| OpenTUI Terminal Interfacescline/cline | 70k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 |
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.
galfrevn/apollo
A skill your agent uses when building, running, testing, or bundling JavaScript/TypeScript applications.
bastani-inc/atomic
A skill your agent uses when building, testing, and deploying JavaScript/TypeScript applications.
iOfficeAI/AionUi
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.
cline/cline
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.
GabrielMartinMoran/mind
Modern JavaScript/TypeScript development with Bun runtime. An agent skill from GabrielMartinMoran/mind.
secondsky/claude-skills
TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.
secondsky/claude-skills
AutoAnimate (@formkit/auto-animate) zero-config animations for React.
secondsky/claude-skills
MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.
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"…
secondsky/claude-skills
Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).
secondsky/claude-skills
Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.
Categories
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.
Bun Runtime fits situations like: watch/hot modes; module resolution.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.