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/LandonSchropp/agent-toolkitnpx agentmods add skills/landonschropp/agent-toolkit/testing-bunWrote 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/landonschropp/agent-toolkit/testing-bun)<a href="https://agentmods.dev/skills/landonschropp/agent-toolkit/testing-bun"><img src="https://agentmods.dev/badge/skills/landonschropp/agent-toolkit/testing-bun/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/landonschropp/agent-toolkit/testing-bun"><img src="https://agentmods.dev/badge/skills/landonschropp/agent-toolkit/testing-bun.svg" alt="Reviewed on agentmods" width="80" 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.00014 | $0.00586 |
| Opus 5.5 | $0.00006 | $0.00234 |
| Sonnet 5.5 | $0.00003 | $0.00117 |
| Haiku 4.5 | $0.00001 | $0.00059 |
Grade A, and why
testing-bun scanned grade A with 0 findings 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 11d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing with Bun
Fetch the Bun mocks documentation before writing or modifying tests.
Running the suite
Run the full suite via bun run test, never bun test directly. The script passes --isolate, which runs each test file in its own worker. Without it, mock.module() calls leak across files and tests fail in confusing, order-dependent ways.
For ad-hoc single-file runs, use bun test --isolate <file>.
Mock helpers
Prefer the specific mock helpers over mockImplementation:
mockResolvedValue(value)/mockResolvedValueOnce(value)— async functions returning a value.mockRejectedValue(error)/mockRejectedValueOnce(error)— async functions that throw.mockReturnValue(value)/mockReturnValueOnce(value)— sync functions.
Only reach for mockImplementation when behavior depends on arguments or call count.
Set mock return values close to the test that asserts on them, with the concrete value the test needs. Indirection through shared variables or transformations makes tests harder to read.
Spying on object methods
Never reassign properties on global or imported objects to stub them — use spyOn. Re-spy in beforeEach so each test starts from a known state.
// Good — spy, scoped to the test that needs it
import { spyOn } from "bun:test";
// Bad — reassigns the property
const original = Bun.stdin;
beforeEach(() => {
// @ts-expect-error
Bun.stdin = { json: () => Promise.resolve(payload) };
});
afterEach(() => {
// @ts-expect-error
Bun.stdin = original;
});
it("processes the payload", async () => {
spyOn(Bun.stdin, "json").mockResolvedValue({ hook_event_name: "Stop" });
// ... assertions
});
Mocking modules
Use static imports — Bun's ESM live bindings let mock.module() update modules that have already been imported. No dynamic await import() needed.
mock.module() returns a promise, so it must be awaited:
import { isGitInstalled } from "../../src/commands/git.ts";
import { describe, expect, it, mock } from "bun:test";
const runCommandMock = mock(() => Promise.resolve({ exitCode: 0, stdout: "", stderr: "" }));
await mock.module("../../src/commands/shell.ts", () => ({
runCommand: runCommandMock,
}));
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.
- 11d ago Changed 963f09bd9219
- 2mo ago Changed · +1 lines · +4 tokens per session 3d08bd1785bd
- 3mo ago First seen · 70 lines · 10 tokens per session scan A e6e4b1012397
testing-bun is a skill published in the GitHub repository LandonSchropp/agent-toolkit (3 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 586 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
testing-bun compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| testing-bunLandonSchropp/agent-toolkit | Skill | 3 | today | MIT | A | 14 | Claude Code |
| cf-clicloudflare/skills | Skill | 3.5k | 5d ago | Apache-2.0 | A | 78 | Claude Code |
| workers-best-practicescloudflare/skills | Skill | 3.5k | 5d ago | Apache-2.0 | A | 25 | Claude Code |
| story-origin-checkelvisun/newsjack | Skill | 1.7k | 5d ago | MIT | A | 40 | Claude Code |
| relevance-coarse-filterelvisun/newsjack | Skill | 1.7k | 5d ago | MIT | A | 57 | Claude Code |
| skill-changelogluongnv89/asm | Skill | 976 | yesterday | MIT | A | 53 | Claude Code |
| character-profileGongLingRui/screen-creative-skills | Skill | 511 | 1mo ago | MIT | A | 46 | Claude Code |