ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 3/5

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/ivangdavila/bun
Or

What 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.nextTick race conditions, missing __dirname references in ESM, or binary bun.lockb merge 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

  1. "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?"
  2. "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?"
  3. "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.dir over legacy Node globals. Use queueMicrotask to ensure your asynchronous execution order is cross-runtime compatible.
  • Dependency Management: Treat bun.lockb as 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 vm module implementation; avoid using it for untrusted user code execution.
  • Type Checking: Since Bun runs TypeScript directly without implicit tsc checks, remember to include an explicit tsc --noEmit step in your pipeline to catch type errors before they reach production.

Metadata

Stars2190
Views1
Updated2026-03-07
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-ivangdavila-bun": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#bun#runtime#javascript#bundler#typescript
Safety Score: 3/5

Flags: file-read, file-write, code-execution