# Test Driven Development

> Use when implementing a code task so the test is written or updated before production code and proves the requested behavior.

- Skill: `dyai2025/test-driven-development` (Agent Skill)
- Install (CLI): `npx skillmds@latest add dyai2025/test-driven-development`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dyai2025/test-driven-development/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: DYAI2025 (https://skillmd.com/u/dyai2025)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/dyai2025/test-driven-development

---


# Test-driven Development

## Red-Green-Refactor
1. Pick one REQ/task.
2. Write or update the smallest failing test first.
3. Run it and record the failing command/output.
4. Implement the minimum production change.
5. Run the targeted test, then the broader suite.
6. Refactor only with tests green.

Do not add production behavior that is not covered by a requirement or regression test.


