Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Yeachan-Heo/oh-my-claudecode --skill tdd -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/tdd/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/tdd/

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.

tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. CX Codex +1 1,141,062installs tdd backnotprop tdd is a Claude Code skill that enforces writing an executable failing test before changing bugged code. It runs on explicit TDD prompts or cheap local test paths. CX Codex +1 10,000installs tdd codewithmukesh tdd guides a strict red-green-refactor cycle for .NET 10 applications using xUnit v3, WebApplicationFactory, and Testcontainers. CX Codex +1 4,000installs tdd parcadei tdd — a skill that keeps the agent on a strict red-green-refactor loop: failing test first, minimal code next, then verification. CX Codex +1 474installs tdd glebis tdd runs test-driven development cycles with strict context separation across subagents. Useful for writing clean features and reproducing bugs. CX Codex +1 262installs tdd-green Seth Hobson Writes the minimal code required to pass failing tests during the TDD green phase. Keeps scope tight without premature optimizations. CX Codex +1 ★ 42,780repo stars test-driven-development addyosmani The test-driven-development Claude Code skill guides code changes through the red-green-refactor cycle. It activates for new logic, bug fixes, and changes to existing behavior. CX Codex +1 78,300installs w-tdd blockmatic-icebox The w-tdd Claude Code skill guides implementation through red-green-refactor. It activates when a developer requests TDD or the repository requires it. CX Codex +1 647installs tdd-workflow davila7 tdd-workflow guides Claude Code through the test-driven development loop: write a failing test first, make it pass with simple code, then refactor. CX Codex +1 194installs 054-design-tdd Juan Antonio Breña Moral 054-design-tdd — a skill that walks Java developers through red-green-refactor cycles with test-driven development. Write a failing test first, implement just enough code to pass, then refactor while tests stay green. CX Codex +1 177installs tdd-london-chicago proffesor-for-testing tdd-london-chicago — a skill for choosing London or Chicago TDD, using mocks or real objects, and moving through the Red–Green–Refactor cycle. CX Codex +1 124installs

From the same set48

The whole set →
execute The execute skill takes a well-defined task through implementation and verification. Use it when you want working code and a clear account of what was checked. CX Codex +1 307installs graph Run multi-step pipelines as declarative directed acyclic graphs. If interrupted or restarted, execution resumes from the journal without re-running completed nodes. CX Codex +1 285installs drydock drydock — a skill for Claude Code, Codex, Cursor, Copilot, and Gemini CLI that sets up a shared repo harness on first run. It seeds CLAUDE.md and GLOSSARY.md immediately; every other surface appears on first use. CX Codex +1 273installs launch launch — a skill for the complete development cycle: from mission to shipped, verified code. Splits work between agent (everything verifiable and repeatable) and human (decisions that only a person can make). CX Codex +1 272installs harbor harbor triages incoming issues and pull requests, verifies each claim, and hands the maintainer only the decisions that genuinely need a signature. CX Codex +1 241installs minimal-prose-discipline The minimal-prose-discipline skill keeps agent replies lean while preserving commands, errors, paths, and numbers. Use it when work updates need to stay clear and actionable. CX Codex +1 204installs architecture-survey architecture-survey inspects your module graph to spot shallow boundaries, false seams, and misplaced logic. Useful when changes start rippling across too many files at once. CX Codex +1 201installs agent-doc-discipline agent-doc-discipline sets writing rules for agent-facing specs, skills, and CLAUDE.md files. It ensures a fresh agent session acts correctly on instructions alone without needing prior chat context. CX Codex +1 196installs

Project sponsors

Companies that keep this analytics open