Use when writing production code that needs tests -- new features, bug fixes, refactoring. Enforces RED-GREEN-REFACTOR before implementation.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
<objective>
TDD enforces the Iron Law -- no production code without a failing test first -- through a strict RED-GREEN-REFACTOR loop: detect the stack and test framework, write one failing test for the next behavior, verify it fails for the *expected* reason (not a syntax error or missing fixture), write the simplest code that passes it, verify the full suite is green, refactor while staying green, then repeat for the next behavior.
It never skips a VERIFY step -- a test that passes on first run proves nothing and must be investigated, not accepted.
</objective>
# TDD Skill
Write the test first. Watch it fail. Write minimal code to pass.
## The Iron Law
**No production code without a failing test first.**
Every line of production code must be justified by a test that failed without it.
No exceptions. No shortcuts. No "I'll test after."
---
## Agent Workflow
```
1. DETECT -> Identify stack, test framework, existing test patterns
2. RED -> Write ONE failing test for the next behavior
3. VERIFY -> Run test, confirm it fails for the EXPECTED reason
…
The line at the top of this page pins the label git:20260729.3b91eed, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_fvuqr3jzvkbblx3q
GET https://markdownregistry.com/api/v1/resolve?ref=fusengine/claude-plugins/tdd
GET https://markdownregistry.com/api/v1/blob/9868b22627b6237251a19dbe5b5f915a3668058b1f8f76056fc90275631b2e8c
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
fusengine/claude-plugins · plugins/ai-pilot/skills/agent-creator/SKILL.md · Use when creating expert agents. Generates agent.md with frontmatter, hooks, required sections, and skill references.
fusengine/claude-plugins · plugins/ai-pilot/skills/brainstorming/SKILL.md · Use when creating a feature/component or adding functionality. Fires BEFORE APEX Analyze to refine requirements via…
fusengine/claude-plugins · plugins/ai-pilot/skills/challenge/SKILL.md · Use before a root-cause, done/verified claim, irreversible action, or 2nd-time fix reaches the owner (APEX or plain…
fusengine/claude-plugins · plugins/ai-pilot/skills/elicitation/SKILL.md · Use when an expert agent self-reviews and self-corrects code after the Execute phase, before sniper validation…
fusengine/claude-plugins · plugins/ai-pilot/skills/fuse-browser-usage/SKILL.md · Use when about to call any mcp__fuse-browser__* tool. Routes fetch/crawl/SERP vs live browser session vs screenshot…
fusengine/claude-plugins · plugins/ai-pilot/skills/lead-orchestration/SKILL.md · Use when you are the LEAD (main session) and an owner request arrives that needs agents -- intake, routing, briefs…
fusengine/claude-plugins · plugins/ai-pilot/skills/pr-summary/SKILL.md · Summarize current pull request with diff, comments, and changed files. Use when reviewing PRs or before merging.
fusengine/claude-plugins · plugins/ai-pilot/skills/react-effects-audit/SKILL.md · Use when auditing React or Next.js components for unnecessary or unsafe useEffect usage -- detects 9 anti-patterns from…
cursor/plugins · pstack/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
cursor/plugins · harness/pstack/claude-code/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
nightly-labs/openbot · marketplace/production-catalog/bundles/pstack/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
michael-denyer/pstack-claude · plugins/pstack/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…