← Back to the Hub

bun 0.1.0

How the Bun repository runs its agents: a shell guard that stops slow or wrong build and test commands, format on edit, and skills for its C++, Rust and test work.

Owner: Baudrier AI · MIT · from oven-sh/bun at e13b16b

Claude Code 9 of 9 guards holdCodex 9 of 9 guards holdGitHub Copilot 9 of 9 guards hold

Install

$ uv tool install baudrier # once

$ baudrier install bun --dry # look first: nothing is written

$ baudrier install bun # for the agents your repository uses; or --to claude|codex|copilot|generic

It shows what it will write, hook scripts first, and asks before it writes.

Last step: paste the line the install prints last into your agent, opened in your repository. It fits the harness to your repository. Don’t skip it. For Claude Code:

Read .baudrier/harness/bun/FINISH_SETUP.claude.md and follow it.

For another agent, the file ends in .codex.md, .copilot.md or .generic.md.

What each agent keeps

What Codex rebuilds or loses (3)
  • find-duplicate-prs: allowed-tools lost, Claude Code frontmatter that Codex does not read; the skill's text is unchanged
  • find-issues: allowed-tools lost, Claude Code frontmatter that Codex does not read; the skill's text is unchanged
  • PostToolUse [Write|Edit|MultiEdit] → post-edit-format.js rebuilt, Codex edits files with apply_patch: the adapter rebuilds a Write or Edit payload per file and blocks the patch if the hook blocks one of them. Deleting a file is not checked
What GitHub Copilot rebuilds or loses (1)
  • PostToolUse [Write|Edit|MultiEdit] → post-edit-format.js rebuilt, Copilot names its edit arguments differently (path, file_text, old_str, new_str): the adapter rebuilds the Write or Edit payload the hook expects, file by file for a patch
What Any agent rebuilds or loses (2)
  • PreToolUse [Bash] → pre-bash-guard.js lost, no hook system is assumed for this agent: the hook does not run. Install for Claude Code, Codex or GitHub Copilot to enforce it
  • PostToolUse [Write|Edit|MultiEdit] → post-edit-format.js lost, no hook system is assumed for this agent: the hook does not run. Install for Claude Code, Codex or GitHub Copilot to enforce it
The 9 guard cases
CaseMustClaude CodeCodexGitHub Copilot
rustfmt run directlyblock✓ blocks✓ blocks✓ blocks
cargo fmtallow✓ allows✓ allows✓ allows
bun bd under a timeoutblock✓ blocks✓ blocks✓ blocks
bun bd without a timeoutallow✓ allows✓ allows✓ allows
updating snapshots with a test name filterblock✓ blocks✓ blocks✓ blocks
the release bun used for testsblock✓ blocks✓ blocks✓ blocks
the release bun, asked for on purposeallow✓ allows✓ allows✓ allows
the debug build testing one fileallow✓ allows✓ allows✓ allows
a harmless commandallow✓ allows✓ allows✓ allows

The checks are the publisher's own run: the hub never runs a harness. baudrier selftest runs them again in your repository.

Hooks (run on your computer) 2

  • PreToolUse [Bash] runs pre-bash-guard.js
  • PostToolUse [Write|Edit|MultiEdit] runs post-edit-format.js

Skills 13

  • implementing-jsc-classes-cpp How the JavaScript classes that are written by hand in C++ are built. Use when changing one of them. For a new class use implementing-jsc-classes-rust.
  • implementing-jsc-classes-rust Creates JavaScript classes using Bun's bindings generator (.bind.ts). Use when implementing new JS APIs in Rust with JSC integration, prototypes, or constructors.
  • javascriptcore-garbage-collector JSC GC reference for Bun. Use for use-after-free, JS object leaks, "collected too early", or when touching WriteBarrier, visitChildren, visitAdditionalChildren, JSRef, JSC::Strong/Weak, hasPendingActivity, ensureStillAlive, addOpaqueRoot, reportExtraMemoryAllocated, IsoSubspace, HeapAnalyzer, finalize.
  • rust-system-calls Guides using bun_sys for system calls and file I/O in Rust. Use when implementing file operations, opening fds, or any syscall path instead of std::fs or libc.
  • slowest-tests Find the top-N slowest test files in CI from a recent BuildKite run, optionally posting the results to a Slack channel as a formatted table. Use when asked to find slow CI tests, "what's making CI slow", or to post a slow-test report to Slack.
  • verify Verify a Bun runtime change by driving the debug binary end-to-end.
  • writing-bundler-tests Guides writing bundler tests using itBundled/expectBundled in test/bundler/. Use when creating or modifying bundler, transpiler, or code transformation tests.
  • writing-dev-server-tests Guides writing HMR/Dev Server tests in test/bake/. Use when creating or modifying dev server, hot reloading, or bundling tests.
  • find-duplicate-prs Find open PRs that may duplicate a given PR
  • find-issues Find GitHub issues that a PR might fix
  • upgrade-boringssl Upgrade Bun's BoringSSL fork (oven-sh/boringssl) to the latest upstream google/boringssl
  • upgrade-nodejs Upgrading Bun's Self-Reported Node.js Version
  • upgrade-webkit Upgrade Bun's WebKit fork to the latest upstream version of WebKit

Its hooks need bun.

Notes from the publisher

Files 20

  • 1.3 kB
  • 7.3 kB
  • 1.7 kB
  • 5.7 kB
  • 1.4 kB
  • 16.8 kB
  • 1.2 kB
  • 3.3 kB
  • 3.9 kB
  • 7.0 kB
  • 2.8 kB
  • 25.1 kB
  • 3.9 kB
  • 3.6 kB
  • 7.0 kB
  • 3.6 kB
  • 4.2 kB
  • 2.6 kB
  • 4.5 kB
  • 3.0 kB
Loading hooks/post-edit-format.js...

All files as JSON · card.json

MIT (read and named by a person), its licence file travels with every install; from oven-sh/bun at e13b16b, absorbed on 2026-11-26. The files are the source repository authors' work, copied unchanged; Baudrier AI is not affiliated with that project.