Bun
Build with Bun runtime avoiding Node.js compatibility traps, bundler pitfalls, and package manager gotchas.
Why use this skill?
Master Bun with OpenClaw. Solve Node.js compatibility traps, optimize bundler configurations, and manage dependencies with expert guidance.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ivangdavila/bunWhat This Skill Does
The Bun skill equips your OpenClaw agent with deep expertise in the Bun JavaScript runtime, bundler, and package manager. It acts as a specialized assistant for migrating legacy Node.js projects to Bun or building high-performance modern applications from scratch. The skill is engineered to navigate the specific technical pitfalls inherent in Bun, providing mitigation strategies for runtime compatibility, bundler configurations, and complex package management scenarios.
Installation
To integrate this skill into your environment, use the OpenClaw CLI:
clawhub install openclaw/skills/skills/ivangdavila/bun
Use Cases
- Project Migration: Transitioning existing Node.js servers to Bun to leverage its native performance and built-in SQLite/web API features.
- Bundling & Optimization: Configuring production builds for web clients or edge functions while avoiding silent tree-shaking bugs or broken CSS assets.
- Troubleshooting: Debugging issues like
process.nextTickrace conditions, missing__dirnamereferences in ESM, or binarybun.lockbmerge conflicts in team environments. - CI/CD Configuration: Setting up robust dependency installation scripts that account for Bun’s unique resolution logic compared to npm or yarn.
Example Prompts
- "I'm migrating a legacy Express app to Bun, but my file watcher using fs.watch isn't catching changes like it did in Node. How can I fix this?"
- "My Bun build is stripping out core dependencies when targeting the browser. Can you help me configure the bundler to mark specific node_modules as external?"
- "We are seeing production crashes in our bundled code that don't appear locally. How can I audit my minification settings or side-effect configurations to prevent aggressive tree-shaking?"
Tips & Limitations
- Runtime Awareness: Always prioritize
import.meta.dirover legacy Node globals. UsequeueMicrotaskto ensure your asynchronous execution order is cross-runtime compatible. - Dependency Management: Treat
bun.lockbas a build artifact. Because it is binary, ensure your team has a strict process for resolving Git merge conflicts by regenerating the lockfile rather than attempting manual edits. - Safety: Be cautious with Bun's partial
vmmodule implementation; avoid using it for untrusted user code execution. - Type Checking: Since Bun runs TypeScript directly without implicit
tscchecks, remember to include an explicittsc --noEmitstep in your pipeline to catch type errors before they reach production.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ivangdavila-bun": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution
Related Skills
Animations
Create performant web animations with proper accessibility and timing.
Arduino
Develop Arduino projects avoiding common wiring, power, and code pitfalls.
Bulgarian
Write Bulgarian that sounds human. Not formal, not robotic, not AI-generated.
Arabic
Write Arabic that sounds human. Not formal, not robotic, not AI-generated.
Assistant
Manage tasks, communications, and scheduling with proactive and organized support.