Test Driven Development (TDD)
Write the test first, watch it fail, write minimal code to pass
Install
npx skills add obra/clank --skill Test-Driven Development (TDD)git clone --depth 1 https://github.com/obra/clank.git /tmp/clank
mkdir -p ~/.claude/skills
cp -r /tmp/clank/skills/testing/test-driven-development ~/.claude/skills/Test-Driven-Development-TDD-Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Test-Driven Development (TDD) ## Overview Write the test first. Watch it fail. Write minimal code to pass. **Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing. **Violating the letter of the rules is violating the spirit of the rules.** ## When to Use **Always:** - New features - Bug fixes - Refactoring - Behavior changes **Exceptions (ask your human partner):** - Throwaway prototypes - Generated code - Configuration files Thinking "skip TDD just this once"? Stop. That's rationalization. ## The Iron Law ``` NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST ``` Write code before the test? Delete it. Start over. **No exceptions:** - Don't keep it as "reference" - Don't "adapt" it while writing tests - Don't look at it - Delete means delete Implement fresh from tests. Period. ## Red-Green-Refactor
Details
- Skill name
Test-Driven Development (TDD)- Repository
- obra/clank
- Path
skills/testing/test-driven-development/SKILL.md- Repo updated
- 9 October 2025
FAQ
What does the Test Driven Development (TDD) skill do?
Write the test first, watch it fail, write minimal code to pass
How do I install the Test Driven Development (TDD) skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add obra/clank --skill Test-Driven Development (TDD). Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Test Driven Development (TDD) popular?
It lives in obra/clank, which has 43 GitHub stars and 26 forks.
Related skills
Gardening Skills Wiki
43obra/clank
Maintain skills wiki health - check links, naming, cross-references, and coverage
Remembering Conversations
43obra/clank
Search previous Claude Code conversations for facts, patterns, decisions, and context using semantic or text search
Brainstorming Ideas Into Designs
43obra/clank
Interactive idea refinement using Socratic method to develop fully-formed designs
Testing Anti Patterns
43obra/clank
Never test mock behavior. Never add test-only methods to production classes. Understand dependencies before mocking.
Prove It
62ElliotJLT/Claude-Skill-Potions
Before declaring any task complete, actually verify the outcome. Run the code. Test the fix. Check the output. Claude's training optimizes for plausible-looking output, not verified-correct output. This skill forces the verification step that doesn't come naturally. No victory laps without proof.
Testing Skills with Subagents
43obra/clank
RED-GREEN-REFACTOR for process documentation - baseline without skill, write addressing failures, iterate closing loopholes
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.