affaan-m/ECC

bun-runtime

Bun 作为运行时、包管理器、打包器和测试运行器。何时选择 Bun 而非 Node、迁移注意事项以及 Vercel 支持。

72CollectingRuns scriptsNetwork access
See how to use itView GitHub source
npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/bun-runtime"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn bun-runtime's source instructions into a guide you can follow

According to the pinned SKILL.md from affaan-m/ECC: Bun 是一个快速的全能 JavaScript 运行时和工具集:运行时、包管理器、打包器和测试运行器。

npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/bun-runtime"
Check the pinned source

Best fit

  • Bun 作为运行时、包管理器、打包器和测试运行器。何时选择 Bun 而非 Node、迁移注意事项以及 Vercel 支持。

Bring this context

  • A concrete task that matches the documented purpose of bun-runtime.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • A result that follows the pinned bun-runtime instructions.
  • A concise record of assumptions, inputs used, and unresolved questions.
  • A final check against the source workflow and relevant permission signals.

Key source sections

Read bun-runtime through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

何时使用

优先选择 Bun 用于:新的 JS/TS 项目、安装/运行速度很重要的脚本、使用 Bun 运行时的 Vercel 部署,以及当您想要单一工具链(运行 + 安装 + 测试 + 构建)时。 优先选择 Node 用于:最大的生态系统兼容性、假定使用 Node 的遗留工具,或者当某个依赖项存在已知的 Bun 问题时。

SKILL.md · 何时使用
优先选择 Bun 用于:新的 JS/TS 项目、安装/运行速度很重要的脚本、使用 Bun 运行时的 Vercel 部署,以及当您想要单一工具链(运行 + 安装 + 测试 + 构建)时。优先选择 Node 用于:最大的生态系统兼容性、假定使用 Node 的遗留工具,或者当某个依赖项存在已知的 Bun 问题时。优先选择 Bun 用于:新的 JS/TS 项目、安装/运行速度很重要的脚本、使用 Bun 运行时的 Vercel 部署,以及当您想要单一工具链(运行 + 安装 + 测试 + 构建)时。 优先选择 Node 用于:最大的生态系统兼容性、假定使用 Node 的遗留工具,或者当某个依赖项存在已知的 Bun 问题时。
02

工作原理

运行时:开箱即用的 Node 兼容运行时(基于 JavaScriptCore,用 Zig 实现)。 包管理器:bun install 比 npm/yarn 快得多。在当前 Bun 中,锁文件默认为 bun.lock(文本);旧版本使用 bun.lockb(二进制)。 打包器:用于应用程序和库的内置打包器和转译器。 测试运行器:内置的 bun test,具有类似 Jest 的 API。

SKILL.md · 工作原理
运行时:开箱即用的 Node 兼容运行时(基于 JavaScriptCore,用 Zig 实现)。包管理器:bun install 比 npm/yarn 快得多。在当前 Bun 中,锁文件默认为 bun.lock(文本);旧版本使用 bun.lockb(二进制)。打包器:用于应用程序和库的内置打包器和转译器。
03

示例

Review the “示例” section in the pinned source before continuing.

SKILL.md · 示例
Review and apply the “示例” source section.
04

运行和安装

Review the “运行和安装” section in the pinned source before continuing.

SKILL.md · 运行和安装
Review and apply the “运行和安装” source section.
05

Install dependencies (creates/updates bun.lock or bun.lockb)

Review the “Install dependencies (creates/updates bun.lock or bun.lockb)” section in the pinned source before continuing.

SKILL.md · Install dependencies (creates/updates bun.lock or bun.lockb)
Review and apply the “Install dependencies (creates/updates bun.lock or bun.lockb)” source section.

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use bun-runtime to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned bun-runtime source to [task]. Pay particular attention to these source sections: “何时使用”, “工作原理”, “示例”, “运行和安装”, “Install dependencies (creates/updates bun.lock or bun.lockb)”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current bun-runtime result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “何时使用” has been checked.

The source section “工作原理” has been checked.

The source section “示例” has been checked.

The source section “运行和安装” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

FAQ

What does bun-runtime do?

Bun 是一个快速的全能 JavaScript 运行时和工具集:运行时、包管理器、打包器和测试运行器。

How do I start using bun-runtime?

The catalog detected this source-specific install command: npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/bun-runtime". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

No dedicated Agent platform is declared in the pinned source record.

Repository stars
234,327
Repository forks
35,711
Quality
72/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

72/100
Documentation24/30
Specificity14/25
Maintenance20/20
Trust signals14/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 1 min

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(二进制)。
  • 打包器:用于应用程序和库的内置打包器和转译器。
  • 测试运行器:内置的 bun test,具有类似 Jest 的 API。

从 Node 迁移:将 node script.js 替换为 bun run script.jsbun script.js。运行 bun install 代替 npm install;大多数包都能工作。使用 bun run 来执行 npm 脚本;使用 bun x 进行 npx 风格的临时运行。支持 Node 内置模块;在存在 Bun API 的地方优先使用它们以获得更好的性能。

Vercel:在项目设置中将运行时设置为 Bun。构建命令:bun run buildbun build ./src/index.ts --outdir=dist。安装命令:bun install --frozen-lockfile 用于可重复的部署。

示例

运行和安装

# Install dependencies (creates/updates bun.lock or bun.lockb)
bun install

# Run a script or file
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.lockbun.lockb)以实现可重复的安装。
  • 在脚本中优先使用 bun run。对于 TypeScript,Bun 原生运行 .ts
  • 保持依赖项最新;Bun 和生态系统发展迅速。
Source repo
affaan-m/ECC
Skill path
docs/zh-CN/skills/bun-runtime/SKILL.md
Commit SHA
4e973d3eaf92
Repository license
MIT
Data collected