Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计通过

bun-runtimeBun runtime 开发

Agent Skill

bun-runtime 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,101

周安装

85

GitHub Stars

126

下载量

660
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bun-runtime(Bun runtime 开发)
来源仓库:https://github.com/secondsky/claude-skills
仓库路径:skills/bun-runtime
安装命令:
npx skills add https://github.com/secondsky/claude-skills --skill bun-runtime
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/secondsky/claude-skills --skill bun-runtime

简介

用于查找、检索和筛选 Bun 运行时相关信息。bun-runtime 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合在需要根据关键词或任务场景快速定位候选结果时使用。
  • 支持运行文件、包脚本、热重载和调试等核心开发流程。
  • 可通过 --watch、--hot、--smol 等标志优化开发和执行体验。
  • 安装前建议确认权限范围和维护状态,避免触发不必要命令执行。

SKILL.md

Bun Runtime

Bun is a fast all-in-one JavaScript runtime built on JavaScriptCore (Safari's engine). It provides 4x faster startup than Node.js on Linux.

Quick Start

# Run a file
bun run index.ts
bun index.ts  # shorthand

# Run with watch mode
bun --watch run index.ts

# Run package.json script
bun run dev

# Run with hot reloading
bun --hot run server.ts

Core CLI Flags

FlagPurpose
--watchRestart on file changes
--hotHot module replacement (preserves state)
--smolReduce memory usage (slower GC)
--inspectEnable debugger
--preloadLoad modules before execution
--env-fileLoad specific.env file
-e, --evalEvaluate code string

Running Files

Bun transpiles TypeScript and JSX on-the-fly:

bun run index.js
bun run index.ts
bun run index.jsx
bun run index.tsx

Important: Put Bun flags immediately after bun:

bun --watch run dev    # Correct
bun run dev --watch    # Wrong - flag passed to script

Package.json Scripts

# Run script
bun run dev
bun dev  # shorthand (if no Bun command conflicts)

# List available scripts
bun run

# Run with Bun instead of Node
bun run --bun vite

Bun respects lifecycle hooks (preclean, postclean, etc.).

Watch Mode vs Hot Reloading

ModeFlagBehavior
Watch--watchFull process restart on changes
Hot--hotReplace modules, preserve state
# Watch mode - full restart
bun --watch run server.ts

# Hot reloading - preserves connections/state
bun --hot run server.ts

Environment Variables

Bun automatically loads .env files:

# Loads automatically: .env, .env.local, .env.development
bun run index.ts

# Specify env file
bun --env-file .env.production run index.ts

# Disable auto-loading
# In bunfig.toml: env = false

Access in code:

const apiKey = process.env.API_KEY;
const bunEnv = Bun.env.NODE_ENV;

Globals Available

GlobalSourceNotes
BunBunMain API object
BufferNode.jsBinary data
processNode.jsProcess info
fetchWebHTTP requests
Request/ResponseWebHTTP types
WebSocketWebWebSocket client
cryptoWebCryptography
consoleWebLogging
__dirnameNode.jsCurrent directory
__filenameNode.jsCurrent file

Preload Scripts

Load modules before your main script:

bun --preload ./setup.ts run index.ts

Or in bunfig.toml:

preload = ["./setup.ts"]

Use cases: polyfills, global setup, instrumentation.

Stdin Execution

# Pipe code to Bun
echo "console.log('Hello')" | bun run -

# Redirect file
bun run - < script.js

Workspaces & Monorepos

# Run script in specific packages
bun run --filter 'pkg-*' build

# Run in all workspaces
bun run --filter '*' test

Debugging

# Start debugger
bun --inspect run index.ts

# Wait for debugger connection
bun --inspect-wait run index.ts

# Break on first line
bun --inspect-brk run index.ts

Connect via Chrome DevTools or VS Code.

Common Errors

ErrorCauseFix
Cannot find moduleMissing dependencyRun bun install
Top-level awaitUsing await outside asyncWrap in async function or use .mts
--watch not workingFlag in wrong positionPut flag before run

When to Load References

Load references/bunfig.md when:

  • Configuring bunfig.toml
  • Setting up test configuration
  • Configuring package manager behavior
  • Setting JSX options

Load references/cli-flags.md when:

  • Need complete CLI flag reference
  • Configuring advanced runtime options
  • Setting up debugging

Load references/module-resolution.md when:

  • Troubleshooting import errors
  • Configuring path aliases
  • Understanding Bun's resolution algorithm

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.26%
按下载量换算253

windsurf

32.55%
按下载量换算215

Cursor

18.8%
按下载量换算124

github-copilot

7.17%
按下载量换算47

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills