
Test Driven Development
- 11 installs
- 4 repo stars
- Updated April 11, 2026
- 89jobrien/steve
test-driven-development is a Claude Code skill that applies TDD via the Red-Green-Refactor cycle, now marked deprecated.
About
test-driven-development is a Claude Code skill that applies the TDD methodology through the Red-Green-Refactor cycle. It enforces the Three Laws of TDD, requires failing tests before code, and demands test-output evidence at each phase. Developers invoke it when implementing features or fixing bugs test-first. Note the skill is marked DEPRECATED in its frontmatter.
- Applies the Red-Green-Refactor TDD cycle with the Three Laws of TDD
- Requires test-output evidence at each RED, GREEN, and REFACTOR phase
- Marked DEPRECATED in the skill frontmatter (deprecated 2026-01-20)
Test Driven Development by the numbers
- 11 all-time installs (skills.sh)
- Ranked #1,539 of 2,153 Testing & QA skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
test-driven-development capabilities & compatibility
- Capabilities
- test writing · tdd workflow · refactoring
- Use cases
- testing · debugging · refactoring
What test-driven-development says it does
Write tests before code. Always.** TDD is not about testing
Write **NO production code** without a failing test first
npx skills add https://github.com/89jobrien/steve --skill test-driven-developmentAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 11 |
|---|---|
| repo stars | ★ 4 |
| Last updated | April 11, 2026 |
| Repository | 89jobrien/steve ↗ |
What it does
Implement features or fix bugs test-first using the Red-Green-Refactor cycle with evidence at each phase.
Who is it for?
Developers who want a disciplined, evidence-backed test-first workflow for features and bug fixes.
Skip if: Current use where a maintained testing skill is preferred, since this skill is marked DEPRECATED.
When should I use this skill?
Implementing features, fixing bugs, or when a developer asks for TDD or test-first development.
What you get
Behavior-driven code produced through disciplined red-green-refactor steps with test evidence.
- Failing-first tests
- Minimal passing implementation
- Refactored clean code
By the numbers
- 3 Laws of TDD
- 3-phase Red-Green-Refactor cycle
Files
Test-Driven Development (TDD)
Core Principle
Write tests before code. Always. TDD is not about testing—it's about design through small, disciplined steps.
When to Use This Skill
- User explicitly requests TDD ("use TDD", "test first", "test-driven")
- Implementing new features
- Fixing bugs (write failing test that reproduces bug first)
- Refactoring existing code (ensure tests exist first)
The Three Laws (Never Violate)
1. Write NO production code without a failing test first 2. Write only enough test to demonstrate one failure 3. Write only enough code to pass that test
Protocol
Phase 1: RED - Write Failing Test
□ Write ONE test that defines desired behavior
□ Run test - verify it FAILS
□ Verify it fails for the RIGHT reason (not syntax error)
□ DO NOT write implementation yet
Evidence required: Show test output with failure messagePhase 2: GREEN - Minimal Implementation
□ Write MINIMAL code to make test pass
□ Resist urge to add extra features
□ Run test - verify it PASSES
□ If test still fails, fix implementation (not test)
Evidence required: Show test output with passPhase 3: REFACTOR - Clean Code
□ Remove code duplication (DRY)
□ Improve naming for clarity
□ Extract complex logic into functions
□ Run ALL tests - must stay green throughout
□ Check test coverage on changed lines
Evidence required: Show all tests still passing after refactorCycle Complete → Repeat
After REFACTOR, start new RED phase for next behavior.
Common Mistakes to Avoid
Writing Multiple Tests at Once
❌ WRONG: Test entire feature in one go
✅ CORRECT: One test at a time. Pass it. Refactor. Next test.Skipping Refactor Phase
❌ WRONG: "Tests pass, ship it!"
✅ CORRECT: ALWAYS refactor. Clean code is the goal.Implementation Before Test
❌ WRONG: Write code, then add tests after
✅ CORRECT: If code exists before test, delete it and start with testOver-Engineering in GREEN
❌ WRONG: Add error handling, edge cases, optimizations
✅ CORRECT: Simplest thing that makes THIS test passWorkflow Example
Task: "Add user login feature"
RED Phase:
1. Write test: test_login_with_valid_credentials()
2. Run: pytest -v → FAILED (no login function exists)
3. Evidence: "FAILED - AttributeError: 'User' has no 'login'"
GREEN Phase:
4. Write minimal login() method
5. Run: pytest -v → PASSED
6. Evidence: "1 passed in 0.03s"
REFACTOR Phase:
7. Extract password hashing to separate function
8. Improve variable names
9. Run: pytest -v → PASSED (still)
10. Evidence: "1 passed in 0.02s"
Next cycle: test_login_with_invalid_credentials()Test Patterns
Arrange-Act-Assert (AAA)
def test_user_can_login():
# Arrange
user = User(email="test@example.com", password="secret")
# Act
result = user.login("secret")
# Assert
assert result.success is True
assert result.token is not NoneGiven-When-Then (BDD style)
def test_login_with_wrong_password():
# Given a registered user
user = create_user(password="correct")
# When they attempt login with wrong password
result = user.login("wrong")
# Then login should fail
assert result.success is False
assert "Invalid password" in result.errorAnti-Patterns
❌ Write test that passes immediately (test proves nothing)
❌ Test implementation details instead of behavior
❌ Skip tests for "simple" code
❌ Write tests after implementation "because we're in a hurry"
❌ Large tests that verify many things at once
✅ Each test verifies ONE behavior
✅ Test names describe the behavior being tested
✅ Tests are independent (no shared state)
✅ Tests run fast (mock external dependencies)Integration with Other Skills
- pre-task-checkpoint: Run checkpoint before each RED phase to frame what behavior to test
- evidence-reasoning: Show actual test output, never claim "tests pass" without evidence
- completion-discipline: Each GREEN phase requires evidence of passing test
- verification-calibration: Match test rigor to feature stakes (🔴 critical features need comprehensive tests)
- clarifying-questions: Clarify expected behavior BEFORE writing test
Self-Check
Before moving from RED to GREEN:
[ ] Test actually fails?
[ ] Fails for the right reason?
[ ] Test name describes behavior?
Before moving from GREEN to REFACTOR:
[ ] Test passes?
[ ] Implementation is minimal?
[ ] No premature optimization?
Before starting next cycle:
[ ] Code is clean?
[ ] All tests still pass?
[ ] Ready for next behavior?Meta-Principle
TDD is a DESIGN technique, not a testing technique.
The cycle never changes: RED → GREEN → REFACTOR → Repeat
Writing tests first forces you to think about:
- What behavior do I need?
- How will I know it works?
- What's the simplest implementation?
This produces better-designed, more maintainable code.Related skills
FAQ
What are the three laws?
Write no production code without a failing test, write only enough test to fail, and write only enough code to pass.
Is this skill maintained?
No. The frontmatter marks it DEPRECATED as of 2026-01-20.