TDD Workflow
hellangleZ/burn-in-cceverywhere-ralph
A skill your agent uses when writing new features, fixing bugs, or refactoring code.
A skill your agent uses for mock functions in Bun tests, spyOn, mock.module, implementations, and test doubles.
$ npx skills add secondsky/claude-skills --skill bun-test-mocking -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install secondsky/claude-skills bun-test-mocking --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/bun/skills/bun-test-mocking .claude/skills/bun-test-mocking && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "bun-test-mocking" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-test-mocking into .claude/skills/bun-test-mocking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-test-mocking", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-test-mockingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add secondsky/claude-skills --skill bun-test-mocking -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install secondsky/claude-skills bun-test-mocking --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/bun/skills/bun-test-mocking .agents/skills/bun-test-mocking && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "bun-test-mocking" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-test-mocking into .agents/skills/bun-test-mocking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-test-mocking", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill bun-test-mocking -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install secondsky/claude-skills bun-test-mocking --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/bun/skills/bun-test-mocking .cursor/skills/bun-test-mocking && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "bun-test-mocking" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-test-mocking into .cursor/skills/bun-test-mocking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-test-mocking", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/secondsky/claude-skills.git --path plugins/bun/skills/bun-test-mocking--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add secondsky/claude-skills --skill bun-test-mocking -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install secondsky/claude-skills bun-test-mocking --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/bun/skills/bun-test-mocking .gemini/skills/bun-test-mocking && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "bun-test-mocking" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-test-mocking into .gemini/skills/bun-test-mocking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-test-mocking", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install secondsky/claude-skills bun-test-mockingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add secondsky/claude-skills --skill bun-test-mocking -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/bun/skills/bun-test-mocking .github/skills/bun-test-mocking && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "bun-test-mocking" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-test-mocking into .github/skills/bun-test-mocking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-test-mocking", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add secondsky/claude-skills --skill bun-test-mocking -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install secondsky/claude-skills bun-test-mocking --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/bun/skills/bun-test-mocking .opencode/skills/bun-test-mocking && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "bun-test-mocking" agent skill from https://github.com/secondsky/claude-skills/tree/main/plugins/bun/skills/bun-test-mocking into .opencode/skills/bun-test-mocking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bun-test-mocking", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
bun-test-mockingA skill your agent uses for mock functions in Bun tests, spyOn, mock.module, implementations, and test doubles.
Bun Test Mocking is an agent skill from secondsky/claude-skills. Use for mock functions in Bun tests, spyOn, mock.module, implementations, and test doubles.
Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Unit testing. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.
Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Bun Test Mocking loads about 1.3k tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 112 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 112 words, ~1,344 tokens.
.claude/skills/bun-test-mocking/SKILL.md (or your agent's skills folder).Bun provides Jest-compatible mocking with mock(), spyOn(), and module mocking.
import { test, expect, mock } from "bun:test";
// Create mock function
const fn = mock(() => "original");
test("mock function", () => {
fn("arg1", "arg2");
expect(fn).toHaveBeenCalled();
expect(fn).toHaveBeenCalledTimes(1);
expect(fn).toHaveBeenCalledWith("arg1", "arg2");
});import { test, expect, jest } from "bun:test";
const fn = jest.fn(() => "value");
test("jest.fn works", () => {
const result = fn();
expect(result).toBe("value");
expect(fn).toHaveBeenCalled();
});const fn = mock();
// Return value once
fn.mockReturnValueOnce("first");
fn.mockReturnValueOnce("second");
// Permanent return value
fn.mockReturnValue("default");
// Promise returns
fn.mockResolvedValue("resolved");
fn.mockResolvedValueOnce("once");
fn.mockRejectedValue(new Error("fail"));
fn.mockRejectedValueOnce(new Error("once"));const fn = mock();
// Set implementation
fn.mockImplementation((x) => x * 2);
// One-time implementation
fn.mockImplementationOnce((x) => x * 10);
// Chain implementations
fn
.mockImplementationOnce(() => "first")
.mockImplementationOnce(() => "second")
.mockImplementation(() => "default");import { test, expect, spyOn } from "bun:test";
const obj = {
method: () => "original",
};
test("spy on method", () => {
const spy = spyOn(obj, "method");
obj.method();
expect(spy).toHaveBeenCalled();
expect(obj.method()).toBe("original"); // Still works
// Override implementation
spy.mockImplementation(() => "mocked");
expect(obj.method()).toBe("mocked");
// Restore
spy.mockRestore();
expect(obj.method()).toBe("original");
});import { test, expect, mock } from "bun:test";
// Mock entire module
mock.module("./utils", () => ({
add: mock(() => 999),
subtract: mock(() => 0),
}));
// Now imports use mocked version
import { add } from "./utils";
test("mocked module", () => {
expect(add(1, 2)).toBe(999);
});mock.module("axios", () => ({
default: {
get: mock(() => Promise.resolve({ data: "mocked" })),
post: mock(() => Promise.resolve({ data: "created" })),
},
}));mock.module("./config", () => {
return {
API_URL: "http://test.local",
DEBUG: true,
};
});const fn = mock();
fn("a", "b");
fn("c", "d");
// Call count
expect(fn).toHaveBeenCalled();
expect(fn).toHaveBeenCalledTimes(2);
// Call arguments
expect(fn).toHaveBeenCalledWith("a", "b");
expect(fn).toHaveBeenLastCalledWith("c", "d");
expect(fn).toHaveBeenNthCalledWith(1, "a", "b");
// Return values
fn.mockReturnValue("result");
fn();
expect(fn).toHaveReturned();
expect(fn).toHaveReturnedWith("result");
expect(fn).toHaveReturnedTimes(1);const fn = mock(() => "value");
fn("arg1");
fn("arg2");
// Access call info
fn.mock.calls; // [["arg1"], ["arg2"]]
fn.mock.results; // [{ type: "return", value: "value" }, ...]
fn.mock.lastCall; // ["arg2"]
// Clear history
fn.mockClear(); // Clear calls, keep implementation
fn.mockReset(); // Clear calls + implementation
fn.mockRestore(); // Restore original (for spies)import { test, expect, spyOn } from "bun:test";
test("mock fetch", async () => {
const spy = spyOn(global, "fetch").mockResolvedValue(
new Response(JSON.stringify({ data: "mocked" }))
);
const response = await fetch("/api/data");
const json = await response.json();
expect(json.data).toBe("mocked");
expect(spy).toHaveBeenCalledWith("/api/data");
spy.mockRestore();
});test("mock console", () => {
const spy = spyOn(console, "log");
console.log("test message");
expect(spy).toHaveBeenCalledWith("test message");
spy.mockRestore();
});class UserService {
async getUser(id: string) {
// Real implementation
}
}
test("mock class method", () => {
const service = new UserService();
const spy = spyOn(service, "getUser").mockResolvedValue({
id: "1",
name: "Test User",
});
const user = await service.getUser("1");
expect(user.name).toBe("Test User");
expect(spy).toHaveBeenCalledWith("1");
});| Error | Cause | Fix |
|---|---|---|
Cannot spy on undefined | Property doesn't exist | Check property name |
Not a function | Trying to mock non-function | Use correct mock approach |
Already mocked | Double mocking | Use mockRestore first |
Module not found | Wrong module path | Check path in mock.module |
Load references/mock-api.md when:
Load references/module-mocking.md when:
© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/bun/skills/bun-test-mocking of secondsky/claude-skills.
Open the folder on GitHubat commit 8837836
Bun Test Mocking next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Bun Test Mocking this skillsecondsky/claude-skills | 227 | — | ~1.3k | Automated safety check: Pass | MIT | |
| TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph | 112 | 11 repos | ~2.4k | Automated safety check: Pass | None | |
| Testing OpenLogi UIAprilNEA/OpenLogi | 23k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Go Testingcxuu/golang-skills | 170 | 1 repos | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Contractssamchon/nestia | 2.2k | — | ~1.3k | Automated safety check: Pass | MIT | |
| Cohesion Over TestabilityEpicenterHQ/epicenter | 4.8k | — | ~2k | Automated safety check: Pass | Custom licence |
hellangleZ/burn-in-cceverywhere-ralph
A skill your agent uses when writing new features, fixing bugs, or refactoring code.
AprilNEA/OpenLogi
Verifies OpenLogi's native GPUI interface with focused tests, the component gallery and a mock agent, choosing the evidence that fits each change.
cxuu/golang-skills
A skill your agent uses when writing, reviewing, or improving Go test code — including table-driven tests, subtests, parallel tests, test helpers, test doubles, and assertions with cmp.Diff.
samchon/nestia
Defines self-acknowledgments for production declarations and tests.
EpicenterHQ/epicenter
Collapse test-shaped production boundaries while preserving behavior and coverage.
liaohch3/claude-tap
Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.
secondsky/claude-skills
TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.
secondsky/claude-skills
AutoAnimate (@formkit/auto-animate) zero-config animations for React.
secondsky/claude-skills
MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.
secondsky/claude-skills
This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…
secondsky/claude-skills
Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).
secondsky/claude-skills
Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.
Categories
A skill your agent uses for mock functions in Bun tests, spyOn, mock.module, implementations, and test doubles. Bun Test Mocking is an agent skill from secondsky/claude-skills.module, implementations, and test doubles.
Bun Test Mocking fits situations like: mock functions in Bun tests; implementations.
Run `npx skills add secondsky/claude-skills --skill bun-test-mocking -a claude-code`. Or copy the skill folder (plugins/bun/skills/bun-test-mocking in secondsky/claude-skills) into .claude/skills/bun-test-mocking in your project. Claude Code loads it when a task matches its description.
Run `npx skills add secondsky/claude-skills --skill bun-test-mocking -a codex`. Or copy the skill folder (plugins/bun/skills/bun-test-mocking in secondsky/claude-skills) into .agents/skills/bun-test-mocking in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill bun-test-mocking -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bun-test-mocking, .gemini/skills/bun-test-mocking, .github/skills/bun-test-mocking and .opencode/skills/bun-test-mocking in your project.
SKILL.md names no scripts, command-line tools or credentials: Bun Test Mocking is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Bun Test Mocking is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.3k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Bun Test Mocking: TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars), Testing OpenLogi UI (AprilNEA/OpenLogi, 23k stars), Go Testing (cxuu/golang-skills, 170 stars) and Contracts (samchon/nestia, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.
Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.