Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/majiang213/OpenClaw-MASnpx agentmods add skills/majiang213/openclaw-mas/bun-runtimeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/majiang213/openclaw-mas/bun-runtime)<a href="https://agentmods.dev/skills/majiang213/openclaw-mas/bun-runtime"><img src="https://agentmods.dev/badge/skills/majiang213/openclaw-mas/bun-runtime.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.00663 |
| Opus 5 | $0.00017 | $0.00331 |
| Sonnet 5 | $0.00007 | $0.00133 |
| Haiku 4.5 | $0.00003 | $0.00066 |
Grade A, and why
bun-runtime scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
fetch(req) { This is a copy
100% identical to bun-runtime — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
- Runtime: Drop-in Node-compatible runtime (built on JavaScriptCore, implemented in Zig).
- Package manager:
bun installis significantly faster than npm/yarn. Lockfile isbun.lock(text) by default in current Bun; older versions usedbun.lockb(binary). - Bundler: Built-in bundler and transpiler for apps and libraries.
- Test runner: Built-in
bun testwith 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.
Vercel: Set runtime to Bun in project settings. Build: bun run build or bun build ./src/index.ts --outdir=dist. Install: bun install --frozen-lockfile for reproducible deploys.
Examples
Run and install
# Install dependencies (creates/updates bun.lock or bun.lockb)
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
// test/example.test.ts
import { expect, test } from "bun:test";
test("add", () => {
expect(1 + 2).toBe(3);
});
Runtime API
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 85 lines · 34 tokens per session scan A 2929d1f22796
bun-runtime is a skill published in the GitHub repository majiang213/OpenClaw-MAS (5 stars, last pushed 5mo ago), licensed MIT. It adds 34 tokens to every session and 663 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to bun-runtime, differing in 1 line, and is treated as a copy.
Other skills, from other repositories
sequence-diagram
Show interactions and flows over time. Illustrate request paths, asynchronous patterns, error handling. Use when documenting complex flows or onboarding on system behavior.
architecture-patterns-catalog
Reference catalog of proven architecture patterns. Know when to apply each pattern, tradeoffs, and examples. Use as reference when designing systems.
architecture-anti-patterns
Identify and avoid common architectural mistakes. Recognize patterns of failure. Use when reviewing designs or learning from mistakes.
architecture-review-facilitation
Lead effective architecture reviews. Manage discussions, surface disagreements, build consensus, document decisions. Use when conducting reviews or running architecture forums.
interview-prep
Prepare for architecture interview questions and scenarios. Practice system design, tradeoff discussions, communication. Use for career development and interview readiness.
system-audit
Conduct comprehensive system architecture evaluation. Assess design quality, technical debt, operational readiness, scalability. Use when auditing existing systems.