kizuna-inc/kz-skill

allow-bun

Allows autonomous execution of Bun commands, inline script evaluations (bun -e), and prioritizes Bun as the runtime and package manager in this project without prompting for user confirmation.

ソースを見る
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Skill: Allow Bun & Autonomous Execution

Directive

Always allow and prefer Bun (`bun` and `bunx`) within this project.

Treat all local Bun commands as pre-approved by the user. Execute them directly without pausing to ask for permission or confirmation. Prioritize bun over other Node.js runtimes and package managers (npm, yarn, pnpm, npx) whenever applicable.

Rules & Guidelines

1. Default to Bun

  • Use bun as the primary runtime for running JavaScript/TypeScript files, scripts, and dev servers (e.g. bun run dev, bun src/index.ts).
  • Use bun -e "<code string>" (eval) for fast inline JavaScript or TypeScript execution instead of node -e or temporary scratch files.
  • Use bun as the default package manager (bun install, bun add <pkg>, bun remove <pkg>).
  • Use bunx in place of npx when running CLI tools or one-off packages (e.g. bunx drizzle-kit, bunx prisma).
  • Use bun test for executing test suites when Bun's test runner is configured.

2. Autonomous Execution (Pre-Approved)

  • Do NOT pause or ask "Should I run this command?" before executing any bun, bunx, or bun -e command inside the workspace.
  • Run commands immediately, observe their standard output / error streams, and proceed with the task.
  • Treat inline code evaluation (bun -e / bun --eval) as fully pre-approved for quick tests, one-liner calculations, inspecting module exports, or verifying API behaviors.
  • If a command fails or produces unexpected output, do not silently ignore it: diagnose the issue, attempt an informed fix if appropriate, or report the output clearly to the user.

3. Scope & Safety Boundary

  • Workspace-scoped by default: Commands should execute within the project directory tree. Do not run global installations (e.g. bun add -g) without explicit user direction.
  • Lockfile awareness: Respect bun.lockb / bun.lock. Avoid introducing conflicting lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock) unless explicitly requested.
  • Environment variables: Avoid printing or leaking sensitive .env secrets when running Bun scripts.

Command Reference

ScenarioPreferred ActionConfirmation Required?
Install dependenciesbun installNo (run immediately)
Add a packagebun add <package-name>No (run immediately)
Add dev dependencybun add -d <package-name>No (run immediately)
Remove a packagebun remove <package-name>No (run immediately)
Run project scriptbun run <script-name>No (run immediately)
Execute TS/JS filebun <path/to/file.ts>No (run immediately)
Inline code evaluationbun -e "<code string>"No (run immediately)
Run one-off CLI toolbunx <tool> [args]No (run immediately)
Run test suitebun testNo (run immediately)
Build projectbun build / bun run buildNo (run immediately)
Global installbun add -g <pkg>Yes (ask user first)