Communitygithub.com

bun-runtime

Bun을 런타임, 패키지 매니저, 번들러, 테스트 러너로 사용합니다. Bun과 Node 중 선택 기준, 마이그레이션 참고 사항, Vercel 지원 정보를 제공합니다.

bun-runtime란 무엇인가요?

이 스킬은 빠르고 올인원 JavaScript 런타임 및 툴킷인 Bun을 효과적으로 활용하는 방법을 안내합니다. Bun은 런타임, 패키지 매니저('bun install'), 번들러, 테스트 러너('bun test')를 하나로 통합하여 개발 워크플로우를 단순화합니다. Node.js와의 높은 호환성을 제공하지만, 새로운 프로젝트나 속도가 중요한 작업에서는 Bun을 우선 선택하고, 레거시 생태계 호환성이 필요할 때는 Node.js를 선택하는 기준을 제시합니다. Node.js에서 Bun으로의 마이그레이션 방법('bun run', 'bun x'), Vercel 환경에서의 배포 설정, 그리고 'bun.lock' 파일 관리와 같은 모범 사례를 다룹니다. 이 스킬은 Claude Code, Cursor, Codex 등 모든 AI 어시스턴트가 Bun 관련 작업을 수행할 때 참고할 수 있도록 설계되었습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/bun-runtime

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Bun 런타임

Bun은 빠른 올인원 JavaScript 런타임 및 툴킷입니다: 런타임, 패키지 매니저, 번들러, 테스트 러너.

사용 시점

  • Bun 사용을 선호할 때: 새로운 JS/TS 프로젝트, 설치/실행 속도가 중요한 스크립트, Bun 런타임을 사용한 Vercel 배포, 단일 툴체인(실행 + 설치 + 테스트 + 빌드)을 원할 때.
  • Node 사용을 선호할 때: 최대 생태계 호환성이 필요할 때, Node를 가정하는 레거시 도구를 사용할 때, 또는 의존성에 알려진 Bun 문제가 있을 때.

다음 경우에 사용하세요: Bun 도입, Node에서 마이그레이션, Bun 스크립트/테스트 작성 또는 디버깅, Vercel 또는 다른 플랫폼에서 Bun 구성.

작동 방식

  • 런타임: 드롭인 방식의 Node 호환 런타임(JavaScriptCore 기반, Zig로 구현).
  • 패키지 매니저: bun install은 npm/yarn보다 현저히 빠릅니다. 현재 Bun의 기본 잠금 파일은 bun.lock(텍스트)입니다; 이전 버전은 bun.lockb(바이너리)를 사용했습니다.
  • 번들러: 애플리케이션 및 라이브러리를 위한 내장 번들러 및 트랜스파일러.
  • 테스트 러너: Jest 유사 API를 갖춘 내장 bun test.

Node에서 마이그레이션: node script.js를 bun run script.js 또는 bun script.js로 바꾸세요. npm install 대신 bun install을 실행하세요; 대부분의 패키지가 작동합니다. npm 스크립트에는 bun run을, npx 스타일의 일회성 실행에는 bun x를 사용하세요. Node 내장 모듈은 지원되지만, 더 나은 성능을 위해 Bun API가 있다면 선호하세요.

Vercel: 프로젝트 설정에서 런타임을 Bun으로 설정하세요. 빌드: bun run build 또는 bun build ./src/index.ts --outdir=dist. 설치: 재현 가능한 배포를 위해 bun install --frozen-lockfile.

예제

실행 및 설치

# 의존성 설치 (bun.lock 또는 bun.lockb 생성/업데이트)
bun install

# 스크립트 또는 파일 실행
bun run dev
bun run src/index.ts
bun src/index.ts

스크립트 및 환경 변수

bun run --env-file=.env dev
FOO=bar bun run script.ts

테스팅

bun test
bun test --watch
// test/example.test.ts
import { expect, test } from "bun:test";

test("add", () => {
  expect(1 + 2).toBe(3);
});

런타임 API

const file = Bun.file("package.json");
const json = await file.json();

Bun.serve({
  port: 3000,
  fetch(req) {
    return new Response("Hello");
  },
});

모범 사례

  • 재현 가능한 설치를 위해 잠금 파일(bun.lock 또는 bun.lockb)을 커밋하세요.
  • 스크립트에는 bun run을 선호하세요. TypeScript의 경우 Bun이 .ts를 기본적으로 실행합니다.
  • 의존성을 최신 상태로 유지하세요; Bun과 생태계가 빠르게 진화합니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

관련 스킬