# test-driven-development

> Claude/Codex skill by [@addyosmani](https://omgskills.com/library/addyosmani/index.md) · 111k stars · 74k installs · Updated 2026-10-13

Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality. Use when asked to add tests to a function, fix a bug in it or change its behavior, even when the code is pasted inline and the request does not mention tests.

Tags: agent-skills, antigravity, claude-code, codex, cursor, skills

## Install

```sh
git clone https://github.com/addyosmani/agent-skills /tmp/agent-skills && ln -s /tmp/agent-skills/skills/test-driven-development ~/.claude/skills/test-driven-development
```

## From README

Test-Driven Development Overview Write a failing test before writing the code that makes it pass. For bug fixes, reproduce the bug with a test before attempting a fix. Tests are proof — "seems right" is not done. A codebase with good tests is an AI agent's superpower; a codebase without tests is a liability. When to Use Implementing any new logic or behavior Fixing any bug (the Prove-It Pattern) Modifying existing functionality Adding edge case handling Any change that could break existing behavior When NOT to use: Pure configuration changes, documentation updates, or static content changes that have no behavioral impact. Related: For browser-based changes, combine TDD with runtime verification using Chrome DevTools MCP — see the Browser Testing section below. Discover the Stack First The TDD cycle is universal; the commands are not.

## Links

- HTML page: https://omgskills.com/library/addyosmani/agent-skills/test-driven-development/
- GitHub: https://github.com/addyosmani/agent-skills
- Author: [@addyosmani](https://omgskills.com/library/addyosmani/index.md)

## More from this repo

- [api-and-interface-design](https://omgskills.com/library/addyosmani/agent-skills/skills/api-and-interface-design/index.md) — Guides stable API and interface design.
   - [@addyosmani](https://omgskills.com/library/addyosmani/index.md) · 117k stars
- [code-review-and-quality](https://omgskills.com/library/addyosmani/agent-skills/code-review-and-quality/index.md) — Conducts multi-axis code review.
   - [@addyosmani](https://omgskills.com/library/addyosmani/index.md) · 111k stars
- [constraint-driven-development](https://omgskills.com/library/addyosmani/agent-skills/skills/constraint-driven-development/index.md) — Establishes a project's quality bar as a written contract and stops agents quietly lowering it.
   - [@addyosmani](https://omgskills.com/library/addyosmani/index.md) · 111k stars
