bun-skills

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

Bun Skills

Agent skills for AI coding assistants working with Bun JavaScript runtime. These skills follow the Agent Skills standard and are distributed through skills.sh.

Installation

Install all skills:

npx skills add daleseo/bun-skills

Or in Claude Code:

/install-skill https://github.com/daleseo/bun-skills

The interactive installation process guides you through selecting specific skills, choosing target agents, determining installation scope (project or global), and selecting installation method (symlink or copy).

Available Skills

bun-init

Initialize new Bun projects with TypeScript and optimal configuration. Use when: (1) starting a new Bun project, (2) converting a directory to a Bun project, (3) setting up CLI tools, web apps, APIs, or libraries.

node-to-bun

Migrate Node.js projects to Bun with compatibility analysis. Use when: (1) converting existing npm/pnpm/yarn projects to Bun, (2) auditing dependencies for Bun compatibility, (3) updating build configurations.

deno-to-bun

Migrate Deno projects to Bun with API compatibility analysis. Use when: (1) converting Deno.* APIs to Bun equivalents, (2) migrating from Deno Deploy, (3) updating permissions model and import maps.

cloudflare-to-bun

Migrate Cloudflare Workers to Bun with runtime compatibility analysis. Use when: (1) converting Workers to Bun, (2) migrating from Cloudflare bindings (KV, R2, D1, Durable Objects), (3) moving from edge to server deployment.

bun-dev-server

Set up high-performance development servers with Hot Module Replacement. Use when: (1) creating dev servers for web applications, (2) setting up React Fast Refresh, (3) configuring API servers with live reload.

bun-test

Configure Bun's built-in test runner with Jest-compatible APIs. Use when: (1) setting up testing infrastructure, (2) writing unit/integration/snapshot tests, (3) migrating from Jest to Bun test. 3-10x faster than Jest.

bun-build

Create optimized production bundles with Bun's native bundler. Use when: (1) building applications for production, (2) optimizing bundle sizes, (3) setting up multi-environment builds, (4) replacing webpack/esbuild/rollup.

bun-deploy

Generate optimized Docker images for Bun applications. Use when: (1) deploying to containers, (2) minimizing image sizes (88MB+ reduction vs Node.js), (3) setting up CI/CD pipelines, (4) deploying to Kubernetes.

Usage

Skills activate automatically when relevant tasks are detected. You can explicitly invoke skills through:

  • Claude Code: Slash commands (e.g., /bun-init)
  • Cursor: File pattern rules and project context
  • Other agents: Tool-specific mechanisms

Structure

Each skill contains:

  • SKILL.md - Main skill instructions with frontmatter metadata
  • references/ - Optional supplementary documentation loaded on demand
bun-skills/
├── skills/
│   ├── bun-init/
│   │   └── SKILL.md
│   ├── node-to-bun/
│   │   ├── SKILL.md
│   │   └── references/
│   │       └── compatibility-matrix.md
│   ├── deno-to-bun/
│   │   ├── SKILL.md
│   │   └── references/
│   │       ├── api-mapping.md
│   │       └── permissions.md
│   ├── cloudflare-to-bun/
│   │   ├── SKILL.md
│   │   └── references/
│   │       ├── runtime-apis.md
│   │       ├── bindings.md
│   │       └── deployment.md
│   ├── bun-dev-server/
│   │   ├── SKILL.md
│   │   └── references/
│   │       └── hmr-examples.md
│   ├── bun-test/
│   │   ├── SKILL.md
│   │   └── references/
│   │       ├── jest-migration.md
│   │       ├── mocking.md
│   │       └── examples.md
│   ├── bun-build/
│   │   ├── SKILL.md
│   │   └── references/
│   │       ├── targets.md
│   │       ├── optimization.md
│   │       └── plugins.md
│   └── bun-deploy/
│       ├── SKILL.md
│       └── references/
│           ├── dockerfile-templates.md
│           ├── kubernetes.md
│           ├── ci-cd.md
│           └── multi-platform.md
└── README.md

Why Bun?

Bun is a fast, all-in-one JavaScript runtime that provides:

  • 3x faster package installation than npm
  • 🧪 Built-in test runner (Jest-compatible, 3-10x faster)
  • 📦 Native bundler and transpiler
  • 🔧 Drop-in Node.js replacement
  • 🚀 90% faster startup times
  • 🐳 88MB+ smaller Docker images

These skills help you leverage Bun's unique advantages while avoiding common migration pitfalls.

Additional Resources

Contributing

Contributions are welcome! To add new skills or improve existing ones:

  1. Fork this repository
  2. Create a new branch for your changes
  3. Follow the Agent Skills specification
  4. Ensure SKILL.md follows frontmatter standards
  5. Test your skill locally with npx skills add file:///path/to/skill
  6. Submit a pull request

Skill Development Guidelines

  • Keep SKILL.md under 500 lines (move details to references/)
  • Use progressive disclosure (load references on demand)
  • Include compatibility metadata for environment requirements
  • Specify required tools in allowed-tools
  • Provide concrete examples and patterns
  • Test skills with real use cases

License

MIT

Author

Created by @dale