/tdd - Test-Driven Development
OMC Integration
This skill delegates to the OMC tdd skill.
How to Run
python
Skill(skill="oh-my-claudecode:tdd", args="feature-name")
# Or invoke agent directly
Task(subagent_type="oh-my-claudecode:tdd-guide", model="sonnet",
prompt="Run TDD workflow: [feature description]")
OMC Agents
| Agent | Model | Purpose |
|---|---|---|
tdd-guide | sonnet | Standard TDD workflow |
tdd-guide-low | haiku | Simple test suggestions |
Causality (CRITICAL - must be preserved)
code
/auto Tier 5 AUTONOMOUS
└── /tdd <feature> (when code without tests is detected)
/work --loop Tier 3
└── /tdd <feature> (on new feature implementation request)
This causality is preserved regardless of OMC delegation.
Red-Green-Refactor Cycle
🔴 Red: Write a Failing Test
bash
# Write test file first pytest tests/test_feature.py -v # ❌ FAILED - expected behavior git commit -m "test: Add feature test (RED) 🔴"
🟢 Green: Minimal Implementation
bash
# Minimal code to pass the test pytest tests/test_feature.py -v # ✅ PASSED git commit -m "feat: Implement feature (GREEN) 🟢"
♻️ Refactor: Improve Code
bash
# Improve while keeping tests green pytest tests/test_feature.py -v # ✅ PASSED (maintained) git commit -m "refactor: Improve feature ♻️"
Usage
bash
/tdd <feature-name> # Examples /tdd user-authentication /tdd payment-processing
Command File Reference
Detailed workflow: .claude/commands/tdd.md