跳到正文
cccskills
免费在 GitHub 公开中文介绍

bun-runtime

使用 Bun 运行 JavaScript 和 TypeScript,管理依赖、构建和测试。提供从 Node 迁移、通过 bun.lock 固定依赖及配置 Vercel 部署的指导。

原文查看原文说明

Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.

集成工具Vercel
AI 评分90分/ 100查看安装方法

适用场景

  • 开发 JavaScript 或 TypeScript 新项目
  • 评估从 Node 迁移到 Bun
  • 使用 bun test 编写或修复测试
  • 配置 Vercel 构建与部署

中文介绍

功能

bun-runtime 提供使用 Bun 运行 JavaScript 和 TypeScript、管理依赖包、构建分发版本及执行测试的操作步骤。内容涵盖替换 Node 运行命令、通过 bun.lock 固定依赖,以及操作包含多个包的项目。还提供文件读写、HTTP 服务器等内置功能的示例,以及 Vercel 配置示例。

适用场景

适合在新项目中引入 Bun,或评估现有 Node 环境能否迁移。需要确认脚本和测试的写法,或希望将运行到构建所需的工具统一起来时,也可参考这些步骤。

使用示例

  • “整理这个 Node 项目迁移到 Bun 的步骤,以及需要检查的兼容性问题。”
  • “使用 bun test 编写测试,并准备面向 Vercel 的构建配置。”

注意事项

资料以 Bun 1.4.x 为基准,请确认所用版本是否支持相应命令。Bun 与 Node 并非完全兼容,使用某些原生扩展或 Node 专有内部功能的依赖包需要验证。bun audit fix 会修改依赖关系及已安装的包。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

客观评估

AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。

指令清晰度能否看出何时使用、做什么
A良好明确列出了引入 Bun、从 Node 迁移、编写测试和配置 Vercel 的用途。
步骤具体性步骤、输入输出和示例是否具体
A良好提供了 bun install、bun test、构建命令、配置及代码示例。
安全性发送数据、删除文件、执行命令等是否有说明
A良好说明了 bun audit 的数据外传、bun audit fix 的修改范围及审查要求。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足注明了 Bun 1.4.x 和版本检查方法,但没有 Bun 本身的安装步骤。

总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月19日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md5.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Bun Runtime

Bun is a fast all-in-one JavaScript runtime and toolkit: runtime, package manager, bundler, and test runner.

When to Use

  • Prefer Bun for: new JS/TS projects, scripts where install/run speed matters, Vercel deployments with Bun runtime, and when you want a single toolchain (run + install + test + build).
  • Prefer Node for: maximum ecosystem compatibility, legacy tooling that assumes Node, or when a dependency has known Bun issues.

Use when: adopting Bun, migrating from Node, writing or debugging Bun scripts/tests, or configuring Bun on Vercel or other platforms.

How It Works

  • Version baseline: guidance below targets Bun 1.4.x. Check the actual version with bun --version before relying on flag names, since CLI flags can change between releases.
  • Runtime: Drop-in Node-compatible runtime, built on JavaScriptCore. As of Bun 1.4 the runtime itself is implemented in Rust (migrated from Zig). Not 100% Node-compatible — some native addons, less-common node: internal APIs, and packages that depend on Node-specific internals can still fail; verify before depending on it in production.
  • Package manager: Bun includes a package manager; installation performance depends on the project, network conditions, and cache state. Lockfile is bun.lock (text) by default in current Bun; older versions used bun.lockb (binary) — Bun still reads that format for migration, but new projects should use bun.lock.
  • Bundler: Built-in bundler and transpiler for apps and libraries.
  • Test runner: Built-in bun test with a Jest-like API.

Migration from Node: Replace node script.js with bun run script.js or bun script.js. Run bun install in place of npm install; most packages work. Use bun run for npm scripts; bun x for npx-style one-off runs. Node built-ins are supported; prefer Bun APIs where they exist for better performance.

Package and workspace commands: bun add <pkg> / bun remove <pkg> / bun update [pkg] manage dependencies; bun outdated lists stale deps. bun pm ls lists project dependencies and resolved versions using the lockfile; --all includes transitive dependencies. It is not an integrity check of installed file contents. bun audit queries registry advisories using package names and versions from bun.lock; it does not modify package.json, bun.lock, or node_modules. Review approved destinations before sending private package metadata. Packages whose scoped registry lacks an advisory endpoint are skipped and do not affect the exit code. bun audit fix upgrades and installs dependencies, changing the lockfile and installed packages and sometimes direct version pins; review it as a modifying install operation, including applicable lifecycle scripts. bun dedupe collapses duplicate installs, and bun prune removes packages no longer referenced. Monorepos use a root workspaces array in package.json (same convention as npm/yarn); run a script in one workspace with bun run --filter <pkg-name> <script>.

Built-in APIs: reach for these before adding a dependency — Bun.file / Bun.write for file I/O, bun:sqlite for an embedded SQLite database, Bun.serve for an HTTP/WebSocket server, Bun.sql for SQL databases, Bun.redis for Redis, and Bun.S3Client for S3-compatible object storage. See the 1.4 release notes for the rest of what's new.

Vercel: Set bunVersion: "1.4.x" in vercel.json to use Bun 1.4 (Rust runtime). See Vercel's Bun runtime docs. Build: bun run build or bun build ./src/index.ts --outdir=dist. Install: bun install --frozen-lockfile for reproducible deploys.

Reference: Bun 1.4 release notes.

Examples

Run and install

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

# Run a script or file
bun run dev
bun run src/index.ts
bun src/index.ts

Scripts and env

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

Testing

bun test
bun test --watch

For CI on Bun 1.4, available options include bun test --changed[=<ref>] for affected tests, bun test --isolate for per-file globals, bun test --parallel[=<n>] for worker processes, and bun test --shard=<n>/<count> for CI partitioning. --isolate creates a fresh JavaScript global for each file in the same process and cleans up documented per-file resources; it is not a process or security sandbox. --parallel enables it by default. --timings=<file> reads prior durations for scheduling; --update-timings records durations. Example: bun test --parallel --timings=./test-timings.json --update-timings. Check the installed version's help and documentation before choosing timing-file paths for a multi-shard workflow.

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

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

Runtime API

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

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

Best Practices

  • Commit the lockfile (bun.lock) for reproducible installs.
  • Prefer bun run for scripts. For TypeScript, Bun runs .ts natively.
  • Keep dependencies up to date; Bun and the ecosystem evolve quickly.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Design and audit interfaces for Web, iOS, and Android using WCAG 2.2 accessibility guidance. Check screen-reader labels, keyboard navigation, contrast, and control sizes to identify barriers and guide implementation for people using assistive technology.

中文简介正在准备中。当前显示英语简介。

  • Adding descriptive labels to icon-only buttons
  • Reviewing keyboard navigation and modal focus
  • Checking contrast and control sizes
affaan-m/ECC28.3万2026年10月16日 更新

Investigate unreliable AI agents across 12 layers, including instructions, memory, tool execution, and display. Use code and logs to trace failures, rank findings by severity, and produce an ordered repair plan that prioritizes code changes.

中文简介正在准备中。当前显示英语简介。

  • Investigating failures that appear only inside an agent application
  • Tracing old conversation content leaking into new sessions
  • Checking skipped or falsely claimed tool execution
affaan-m/ECC28.3万2026年10月16日 更新

agent-eval

免费有简介AI 评分 80分

用实际开发任务比较多个编程智能体,记录成功率、可获取的API费用、耗时和重复运行的稳定性,为工具选型及更新后的性能评估提供数据。

  • 用实际开发任务比较智能体
  • 采用新工具或模型前进行评估
  • 检查智能体更新后的性能
affaan-m/ECC28.3万2026年10月16日 更新

Design and refine an AI agent’s available actions, tool inputs, and result formats. Define recovery steps for errors, manage the information kept in context, and evaluate changes through completion rates, retries, and cost per successful task.

中文简介正在准备中。当前显示英语简介。

  • Define an AI agent’s tool set and input formats
  • Make tool results and next steps easier to interpret
  • Specify safe retries and stopping conditions
affaan-m/ECC28.3万2026年10月16日 更新

Diagnose AI agent runs that fail repeatedly, loop through tools, or lose track of the task. Capture errors and environment details, test a focused recovery action, and produce a report explaining the evidence and outcome.

中文简介正在准备中。当前显示英语简介。

  • Diagnosing repeated failures in an agent run
  • Investigating loops through the same tool calls
  • Reviewing output degradation as context grows
affaan-m/ECC28.3万2026年10月5日 更新

agent-introspection-debugging

免费有简介AI 评分 100分

在AI代理反复失败或重复操作时,记录错误与环境前提、排查原因,采取影响有限的恢复操作,并汇总结果和证据,为有依据的重试与交接提供支持。

  • 排查重复调用工具的原因
  • 调查对话膨胀导致的质量下降
  • 核对文件路径与环境差异
affaan-m/ECC28.3万2026年10月16日 更新

查看 affaan-m 的全部技能

报告此技能的问题