tddlisted
Install: claude install-skill aiskillstore/marketplace
# Test-Driven Development (TDD)
Follow the Red-Green-Refactor cycle strictly. Never write production code without a failing test first.
## The TDD Cycle
```
┌─────────────────────────────────────────┐
│ │
│ ┌───────┐ │
│ │ RED │ Write a failing test │
│ └───┬───┘ │
│ │ │
│ ▼ │
│ ┌───────┐ │
│ │ GREEN │ Write minimal code to pass│
│ └───┬───┘ │
│ │ │
│ ▼ │
│ ┌──────────┐ │
│ │ REFACTOR │ Improve without │
│ └────┬─────┘ breaking tests │
│ │ │
│ └──────────────────────────────┘
```
## Rules (Non-Negotiable)
1. **No production code without a failing test**
- Write the test first
- Watch it fail
- Only then write implementation
2. **Write the minimum test to fail**
- One assertion per test
- Test behavior, not implementation
- Start with the simplest case
3. **Write the minimum code to pass**
- Don't anticipate future needs
- Hardcode if that makes it pass
- Generalize only when forced by tests
4. **Refactor only when green**
- All tests must pass before refactoring
- Keep tests passing during refactoring
- Small steps only
## Workflo