tdd · yeachan-heo — Claude Code skill: what it does, how to install
tdd enforces a strict red-green loop: one test per agreed seam, minimal green implementation, and no mid-cycle refactoring.
MIT 244 installs ★ 40,997 updated 2026-10-24
npx skills add Yeachan-Heo/oh-my-claudecode --skill tdd -a claude-codeWhat tdd does
This skill guides the agent through incremental test-driven development. It requires an approved seam before code is written. The agent prepares the next test, executes it, and confirms it fails for the anticipated reason. A minimal code change follows to turn the test green. Each test acts as a tracer bullet across a complete execution path rather than an isolated layer.
Expected values must derive from an independent source of truth, such as a specification or documented output. Tests are prohibited from mirroring current implementation outputs. Substitutions are restricted strictly to declared boundary classes; internal mocks are not permitted.
Refactoring is barred from the red-green loop. It belongs to the subsequent review stage. If an existing seam cannot test the target behavior, the agent stops and reports the missing seam for architecture-survey and refit instead of testing internals.
What it helps with
- reproduce bug reports with a failing test before writing fixes
- prevent tests from asserting accidental implementation behavior
- restrict mock substitutions to declared boundary classes
- block unsolicited refactoring during active test implementation
Example prompts for the agent
- Write the next failing test at the checkout seam using spec values.
- Reproduce the pricing calculation defect with a test before editing code.
- Show red-green run evidence for the tracer-bullet auth scenario.
How to install tdd
1Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill tdd -a claude-code2Manually: put the files in place
~/.claude/skills/tdd/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/tdd/
1Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill tdd -a codex2Manually: put the files in place
.agents/skills/tdd/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill tdd -a cursor2Manually: put the files in place
.cursor/skills/tdd/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Yeachan-Heo/oh-my-claudecode skills/tdd2Manually: put the files in place
.github/skills/tdd/SKILL.md1Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill tdd -a gemini-cli2Platform CLI
gemini skills install https://github.com/Yeachan-Heo/oh-my-claudecode --path skills/tddManually: put the files in place
.devin/skills/tdd/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Yeachan-Heo/oh-my-claudecode --skill tdd -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about tdd
How to install tdd in Claude Code?
Run npx skills add Yeachan-Heo/oh-my-claudecode --skill tdd -a claude-code. The file will be placed in ~/.claude/skills/tdd/SKILL.md.
What does the tdd skill do?
It enforces a one-test, one-implementation workflow along verified seams, logging failing and passing runs as evidence.
Is refactoring allowed while making tests green?
No. The skill explicitly bans refactoring during the red-green loop and leaves structural cleanups to the review phase.
Source text
SKILL.md · MIT
--- name: tdd description: Test-first at pre-agreed seams — one test, one implementation, tracer-bullet red/green; independent expected values; substitutions only at the seam's boundary class; launch Phase 4 reference. --- # TDD Red-green in small steps, at seams that were agreed in advance. In a launch run the seam list is C2's approved output; outside launch, agree the seams with the user before the first test exists — a seam nobody approved gets no tests. ## The loop One test → one implementation → repeat: 1. Write the next test at a seam. Run it. Watch it fail for the reason you expect — a test that cannot fail is not a test. 2. Implement the smallest change that turns it green. 3. Repeat. Each test is a tracer bullet: a narrow but complete path through the behavior, not a layer finished in isolation. ## Rules - Expected values come from an independent source of truth — a spec line, a worked example, a documented output. Never from the implementation under test: a test that asserts what the code happens to do is a mirror, not a check. - Substitute at the seam's declared boundary class only — in-process, locally substitutable, owned-remote port, or true-external, the class C2 records for each seam. No substitutes inside the boundary the test is exercising. - Refactoring is not part of the loop. It belongs to the review stage; the repair worker owns it. Do not refactor mid-red-green. - A bug fix starts with the failing test that reproduces it — reproduction before theory, the debugger's rule. - When proposing a seam, say in one line what it catches and what it lets through — a seam choice nobody can price is a guess, not a decision. ## When no seam fits If the behavior cannot be tested at any approved seam, stop and say so: report the missing seam as a finding (it feeds `architecture-survey` and `refit`) rather than inventing a seam or testing through internals. ## Output - The seam list used, with boundary classes and each seam's catch/miss line - Red/green evidence — the failing run and the passing run - Any seam-absence findings
© Yeachan-Heo · MIT · Yeachan-Heo/oh-my-claudecode
Similar skills
All skills for Testing and QA →tdd by other authors comes first.