test-driven-development
SolidUse when implementing any feature or bugfix, before writing implementation code
Testing & QA 27,681 stars
2854 forks Updated today MIT
Install
Quality Score: 93/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# 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
```dot
digraph tdd_cycle {
rankdir=LR;
red [label="RED\nWrite failing test", shape=box, style=filled, fillcolor="#ffcccc"];
verify_red [label="Verify fails\ncorrectly", shape=diamond];
green [label="GREEN\nMinimal code", shape=box, style=filled, fillcolor="#ccffcc"];
verify_green [label="Verify passes\nAll green", shape=diamond];
refactor [label="REFACTOR\nClean up", shape=box, style=filled, fillcolor="#ccccff"];
next [label="Next", shape=ellipse];
red -> verify_red;
verify_red -> green [label="yes"];
verify_red -> red [label="wrong\nfailure"];
green -> verify_green;
verify_gree...
Details
- Author
- davila7
- Repository
- davila7/claude-code-templates
- Created
- 11 months ago
- Last Updated
- today
- Language
- Python
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
Testing & QA Solid
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
1,417 Updated today
xintaofei Testing & QA Listed
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
335 Updated today
aiskillstore Testing & QA Listed
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
1 Updated 4 days ago
amarbel-llc Testing & QA Listed
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
0 Updated 3 days ago
amarbel-llc Testing & QA Listed
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code
0 Updated today
iamtatsuki05