Skill

Bun Guidelines

Bun runtime preferences and version management

From bun
Install
1
Run in your terminal
$
npx claudepluginhub kingstinct/.github --plugin bun
Tool Access

This skill uses the workspace's default tool permissions.

Skill Content

Bun Guidelines

Always prefer Bun over Node.js for all operations.

Command Preferences

UseInstead of
bunnode
bunxnpx
bun installnpm install, yarn, pnpm install
bun run <script>npm run, yarn run
bun testjest, vitest
bun buildwebpack, esbuild

Version Management

Prefer packageManager in package.json over other methods:

{
  "packageManager": "bun@1.2.3"
}

This is the recommended approach because:

  • GitHub Actions automatically picks it up via corepack
  • It's version-controlled with the project
  • It's the standard Node.js ecosystem approach

Fallback Order

The setup script checks for Bun version in this order:

  1. .bun-version file
  2. package.jsonpackageManager field
  3. .env.githubBUN_VERSION=x.x.x

When setting up a new project, use packageManager in package.json.

Bun-Specific APIs

Prefer Bun's built-in APIs:

// File I/O
const file = Bun.file('path/to/file');
const text = await file.text();
await Bun.write('output.txt', 'content');

// SQLite
import { Database } from 'bun:sqlite';
const db = new Database('app.db');

// HTTP Server
Bun.serve({
  port: 3000,
  fetch(req) {
    return new Response('Hello');
  }
});

// Shell commands
import { $ } from 'bun';
await $`ls -la`;

// Environment (auto-loaded from .env)
const apiKey = process.env.API_KEY;

Don't Use

  • dotenv - Bun auto-loads .env
  • express - Use Bun.serve() with routes
  • better-sqlite3 - Use bun:sqlite
  • ws - Use built-in WebSocket
  • node-fetch - Use native fetch
Similar Skills
cache-components

Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.

138.5k
Stats
Parent Repo Stars0
Parent Repo Forks1
Last CommitFeb 6, 2026