# Test Driven Development

> Red-green-refactor discipline. Use when writing new functionality.

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

---


# Test-Driven Development

## The Cycle

### Red
Write a test that describes the behavior you want. Run it. It should fail.

### Green
Write the minimum code to make the test pass.

### Refactor
Make the code good. Tests must still pass.

## Test Quality

A good test:
- Tests behavior, not implementation
- Has one clear assertion
- Has a descriptive name
- Is independent
- Is fast

