TDD Workflow
hellangleZ/burn-in-cceverywhere-ralph
A skill your agent uses when writing new features, fixing bugs, or refactoring code.
Test double (Mock, Stub, Spy, Fake) selection and effective mocking strategy guide.
$ npx skills add revfactory/harness-100 --skill mocking-strategy -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install revfactory/harness-100 mocking-strategy --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/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/en/24-test-automation/.claude/skills/mocking-strategy .claude/skills/mocking-strategy && 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 "mocking-strategy" agent skill from https://github.com/revfactory/harness-100/tree/main/en/24-test-automation/.claude/skills/mocking-strategy into .claude/skills/mocking-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mocking-strategy", 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/revfactory/harness-100/tree/main/en/24-test-automation/.claude/skills/mocking-strategyType 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 revfactory/harness-100 --skill mocking-strategy -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install revfactory/harness-100 mocking-strategy --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .agents/skills && cp -r skills-src/en/24-test-automation/.claude/skills/mocking-strategy .agents/skills/mocking-strategy && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mocking-strategy" agent skill from https://github.com/revfactory/harness-100/tree/main/en/24-test-automation/.claude/skills/mocking-strategy into .agents/skills/mocking-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mocking-strategy", 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 revfactory/harness-100 --skill mocking-strategy -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install revfactory/harness-100 mocking-strategy --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/en/24-test-automation/.claude/skills/mocking-strategy .cursor/skills/mocking-strategy && 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 "mocking-strategy" agent skill from https://github.com/revfactory/harness-100/tree/main/en/24-test-automation/.claude/skills/mocking-strategy into .cursor/skills/mocking-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mocking-strategy", 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/revfactory/harness-100.git --path en/24-test-automation/.claude/skills/mocking-strategy--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 revfactory/harness-100 --skill mocking-strategy -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install revfactory/harness-100 mocking-strategy --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/en/24-test-automation/.claude/skills/mocking-strategy .gemini/skills/mocking-strategy && 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 "mocking-strategy" agent skill from https://github.com/revfactory/harness-100/tree/main/en/24-test-automation/.claude/skills/mocking-strategy into .gemini/skills/mocking-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mocking-strategy", 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 revfactory/harness-100 mocking-strategyInstalls 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 revfactory/harness-100 --skill mocking-strategy -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .github/skills && cp -r skills-src/en/24-test-automation/.claude/skills/mocking-strategy .github/skills/mocking-strategy && 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 "mocking-strategy" agent skill from https://github.com/revfactory/harness-100/tree/main/en/24-test-automation/.claude/skills/mocking-strategy into .github/skills/mocking-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mocking-strategy", 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 revfactory/harness-100 --skill mocking-strategy -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install revfactory/harness-100 mocking-strategy --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/en/24-test-automation/.claude/skills/mocking-strategy .opencode/skills/mocking-strategy && 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 "mocking-strategy" agent skill from https://github.com/revfactory/harness-100/tree/main/en/24-test-automation/.claude/skills/mocking-strategy into .opencode/skills/mocking-strategy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mocking-strategy", 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.
mocking-strategyTest double (Mock, Stub, Spy, Fake) selection and effective mocking strategy guide.
Mocking Strategy is an agent skill from revfactory/harness-100. Test double (Mock, Stub, Spy, Fake) selection and effective mocking strategy guide. Use this skill for 'mocking', 'Mock', 'Stub', 'Spy', 'Fake', 'test doubles', 'dependency isolation', 'external service mocking', 'DB mocking', and other test isolation strategy tasks. Enhances the mocking design capabilities of unit-tester and integration-tester. Note: overall test strategy formulation and CI integration are outside the scope of this skill.
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 licence is Apache-2.0.
Read from SKILL.md and the folder at commit 8e8d35c. 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 python, typescript and java).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.pg.comFrom 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.
Mocking Strategy loads about 1.3k tokens when it runs. Until then it costs about 115 tokens; SKILL.md has 194 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 revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 194 words, ~1,346 tokens.
.claude/skills/mocking-strategy/SKILL.md (or your agent's skills folder).Methodologies for effectively isolating dependencies to create reliable tests.
| Type | Purpose | Behavior | Verification Target |
|---|---|---|---|
| Dummy | Fill parameters | Does nothing | Not used |
| Stub | Provide fixed responses | Return predefined values | State (result values) |
| Spy | Record calls | Real behavior + recording | Interactions (call count/args) |
| Mock | Define expected behavior | Pass if expectations met | Interactions (call order/args) |
| Fake | Lightweight implementation | Working simplified implementation | State (integration level) |
Need to isolate external dependencies
+-- Only need response values -> Stub
+-- Need to verify call occurrence/count -> Mock or Spy
| +-- Also need real behavior -> Spy
| +-- Real behavior not needed -> Mock
+-- Need a working lightweight implementation -> Fake
| +-- e.g.: InMemoryRepository, FakeEmailSender
+-- Just need type matching -> Dummy# Stub: Return fixed data
stub_repo = Mock(spec=UserRepository)
stub_repo.find_by_id.return_value = User(id=1, name="Test")
# Fake: In-memory implementation
class FakeUserRepository(UserRepository):
def __init__(self):
self._store = {}
def save(self, user):
self._store[user.id] = user
def find_by_id(self, id):
return self._store.get(id)# HTTP mocking (responses / httpx_mock)
@responses.activate
def test_payment_api():
responses.add(
responses.POST, "https://api.pg.com/charge",
json={"status": "success", "tx_id": "TX123"},
status=200
)
result = payment_service.charge(10000)
assert result.tx_id == "TX123"
# Timeout / Error simulation
responses.add(
responses.POST, "https://api.pg.com/charge",
body=ConnectionError("timeout")
)class FakeMessageBroker(MessageBroker):
def __init__(self):
self.published = []
def publish(self, topic, message):
self.published.append((topic, message))
def assert_published(self, topic, expected_count=1):
actual = [m for t, m in self.published if t == topic]
assert len(actual) == expected_count# Time dependency injection
class OrderService:
def __init__(self, clock=datetime.now):
self.clock = clock
# Fixed time in tests
fixed_time = lambda: datetime(2024, 1, 1, 12, 0, 0)
service = OrderService(clock=fixed_time)| Anti-pattern | Problem | Solution |
|---|---|---|
| Over-mocking | Tests coupled to implementation details | Switch to behavior-based testing |
| Mock chain | mock.a.b.c.d() deep mocking | Law of Demeter violation — refactor code |
| Mock hell | Mocking everything | Replace with Fakes, add integration tests |
| Repetitive setup | Same Mock setup in every test | Introduce Fixture/Builder pattern |
| Excessive mock verification | Overuse of verify(mock, times(1)).method() | Only verify essential interactions |
# unittest.mock
from unittest.mock import Mock, patch, MagicMock
# pytest-mock
def test_something(mocker):
mocker.patch('module.Class.method', return_value=42)
# responses (HTTP)
# freezegun (time)// Jest
jest.mock('./userService');
jest.spyOn(service, 'findUser').mockResolvedValue(mockUser);
// MSW (HTTP — service worker)
server.use(rest.get('/api/users', (req, res, ctx) => res(ctx.json([]))));
// Sinon (general purpose)
sinon.stub(db, 'query').resolves([]);// Mockito
@Mock UserRepository repo;
when(repo.findById(1L)).thenReturn(Optional.of(user));
verify(repo, times(1)).save(any(User.class));
// WireMock (HTTP)
// Testcontainers (real DB/Redis)# Isolate real DB with Docker — more realistic than Fakes
@pytest.fixture
def postgres():
with PostgresContainer("postgres:16") as pg:
engine = create_engine(pg.get_connection_url())
yield engine
def test_user_crud(postgres):
# Test with actual PostgreSQL
repo = UserRepository(postgres)
repo.save(User(name="test"))
assert repo.find_by_name("test") is not None| Test Type | DB | External API | Message Queue | File System |
|---|---|---|---|---|
| Unit Test | Stub/Mock | Stub | Mock | Stub |
| Integration Test | Fake/Container | WireMock | Fake | tmpdir |
| E2E Test | Real DB | Sandbox API | Real queue | Real FS |
© revfactory, Apache-2.0. 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 en/24-test-automation/.claude/skills/mocking-strategy of revfactory/harness-100.
Open the folder on GitHubat commit 8e8d35c
Mocking Strategy 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 |
|---|---|---|---|---|---|---|
| Mocking Strategy this skillrevfactory/harness-100 | 1.3k | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| 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.
revfactory/harness-100
A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.
revfactory/harness-100
Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.
revfactory/harness-100
Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.
revfactory/harness-100
Methodology for systematically designing and generating CLI tool argument parser structures.
revfactory/harness-100
Audience segmentation skill used by the analyst and curator agents.
revfactory/harness-100
Audio storytelling skill used by the podcast scriptwriter and show note editor.
Categories
Test double (Mock, Stub, Spy, Fake) selection and effective mocking strategy guide. Mocking Strategy is an agent skill from revfactory/harness-100. Test double (Mock, Stub, Spy, Fake) selection and effective mocking strategy guide.
Mocking Strategy fits situations like: dependency isolation; external service mocking; other test isolation strategy tasks.
Run `npx skills add revfactory/harness-100 --skill mocking-strategy -a claude-code`. Or copy the skill folder (en/24-test-automation/.claude/skills/mocking-strategy in revfactory/harness-100) into .claude/skills/mocking-strategy in your project. Claude Code loads it when a task matches its description.
Run `npx skills add revfactory/harness-100 --skill mocking-strategy -a codex`. Or copy the skill folder (en/24-test-automation/.claude/skills/mocking-strategy in revfactory/harness-100) into .agents/skills/mocking-strategy 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 revfactory/harness-100 --skill mocking-strategy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mocking-strategy, .gemini/skills/mocking-strategy, .github/skills/mocking-strategy and .opencode/skills/mocking-strategy in your project.
SKILL.md names no scripts, command-line tools or credentials: Mocking Strategy is instructions for the agent only. Our summary lists: Python 3; Docker.
SKILL.md names 1 domain. In commands or code: api.pg.com; the agent is likely to contact it when it follows the instructions. 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.
Mocking Strategy is published under the Apache-2.0 licence (the repository's licence). 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 Mocking Strategy: 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.
revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,290 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.
Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.