secondsky/claude-skills/bun-runtime
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use for Bun runtime, bunfig.toml, watch/hot modes, env vars, CLI flags, and module resolution.
Install
npx vskill@latest install secondsky/claude-skills/bun-runtimeSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
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
Core CLI Flags
| 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 |
Running Files
Bun transpiles TypeScript and JSX on-the-fly:
Important: Put Bun flags immediately after bun:
Package.json Scripts
Bun respects lifecycle hooks (preclean, postclean, etc.).
Watch Mode vs Hot Reloading
| Mode | Flag | Behavior | |
|---|---|---|---|
| Watch | --watch | Full process restart on changes | |
| Hot | --hot | Replace modules, preserve state |
Environment Variables
Bun automatically loads .env files:
Access in code:
Globals Available
| 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 |
Preload Scripts
Load modules before your main script:
Or in bunfig.toml:
Use cases: polyfills, global setup, instrumentation.
Stdin Execution
Workspaces & Monorepos
Debugging
Connect via Chrome DevTools or VS Code.
Common Errors
| 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 |
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
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/bun/skills/bun-runtime/SKILL.md
Popularity
- Repository stars
- 216
- Repository forks
- 31
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/secondsky/claude-skills/bun-runtime)