implementing-jsc-class…
Implements JavaScript classes in C++ using JavaScriptCore. Use when creating new JS classes with C++ bindings, prototypes, or constructors.
Verify a Bun runtime change by driving the debug binary end-to-end.
$ npx -y skills add oven-sh/bun --skill verify --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/verifyContext preview
The summary Claude sees to decide when to auto-load this skill.
Verify a Bun runtime change by driving the debug binary end-to-end.
name: verify description: Verify a Bun runtime change by driving the debug binary end-to-end.
Build and drive the debug binary directly — never `bun test`, never import-and-call.
bun bd --version # builds ./build/debug/bun-debug and prints its version
For any JS-visible change, run the debug binary with `-e` and observe stdout:
bun bd -e '<repro>' # builds, then runs; sets BUN_DEBUG_QUIET_LOGS for you
For worker/subprocess-shaped changes, spawn a subprocess (still `-e`) so worker teardown / event-loop-idle paths are exercised. Cross-check against `node -e '<same repro>'` for Node-compat changes.
regenerates `build/<cfg>/codegen/InternalModuleRegistryConstants.h`, but the C++ TU that embeds it is not always recompiled, so the build succeeds while the binary still runs the OLD JS. Gate on the binary, not the build: ask the binary you just built — `bun bd -e 'console.log(<Class>.toString().includes("<new-id>"))'` (or run `./build/<cfg>/bun` directly). Plain `bun` is the system Bun on $PATH and never has your edit, so it answers about the wrong binary. If false, `touch src/jsc/bindings/InternalModuleRegistry.cpp` and rebuild.
formula shadows the pinned nightly, and `bun bd` dies with `the option 'Z' is only accepted on the nightly compiler`. `bun bd` re-runs cargo on every invocation, so this is needed for follow-up runs too, not just the first build.
output against `node`.
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
Repo: oven-sh/bun
Implements JavaScript classes in C++ using JavaScriptCore. Use when creating new JS classes with C++ bindings, prototypes, or constructors.
Creates JavaScript classes using Bun's Rust bindings generator (.classes.ts). Use when implementing new JS APIs in Rust with JSC integration, prototypes, or…
JSC GC reference for Bun. Use for use-after-free, JS object leaks, "collected too early", or when touching WriteBarrier, visitChildren,…
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.
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…
Guides writing bundler tests using itBundled/expectBundled in test/bundler/. Use when creating or modifying bundler, transpiler, or code transformation tests.