# Test Driven Development

> Apply red-green-refactor workflow to implement behavior safely with fast feedback. Use when adding features, fixing bugs, or reducing regression risk in codebases with automated tests.

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

---


# Test-Driven Development

## Workflow
1. Write a failing test that expresses expected behavior (red).
2. Implement the minimal code needed to pass the test (green).
3. Refactor while keeping tests green and behavior unchanged (refactor).
4. Repeat in small increments; prefer one behavior per test.
5. Keep tests deterministic, isolated, and readable.

