
Test Driven Development
This is uncompromising TDD enforcement. It walks you through red-green-refactor with zero tolerance for shortcuts: write the test, watch it fail, write minimal code to pass. The philosophy is stark: if you didn't see the test fail, you don't know what it tests. Code written before tests gets deleted, no exceptions. It anticipates every rationalization (I'll test after, I already manually tested it, deleting work is wasteful) and systematically dismantles them. The diagrams and examples are clear, but the real value is in the discipline. Use this when you need someone keeping you honest about actually doing TDD instead of just writing tests after the fact.
- skills.sh installs
- 363
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill test-driven-development --agent claude-codeInstalls into .claude/skills of the current project.
Files
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 the user first):
- Throwaway prototypes
- Generated code
- Configuration files
Thinking "skip TDD just this once"? Stop. That's rationalization.
No test setup in the project? Use the smallest runner the stack already
ships (node --test, python -m unittest, go test, cargo test), put the
test next to the existing code's conventions, and tell the user you added
it. Installing a runner such as pytest is a new dependency: ask first.
The Iron Law
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Wrote production code in this task before its 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
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Categories
- Testing & QA, Documentation
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Accessibility362
- Networkx362
- Pymc Bayesian Modeling362
- Analytics Tracking361
- Outlines359
- Python Patterns359
- Biorxiv Database358
- Plan Writing358
- Risk Management Specialist358
- Langsmith Observability357
- Moe Training357
- Ab Test Setup356
- Codex356
- Javascript Mastery356
- Model Merging356
- Artifacts Builder355
- Blip 2 Vision Language355
- Programmatic Seo355
- Biopython354
- Production Code Audit354
- Model Pruning353
- Fda Consultant Specialist352
- Voice Ai Development351
- Evaluating Code Models350