Test Driven Development (TDD)

Write the test first, watch it fail, write minimal code to pass

43 stars 26 forksTesting & QA

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add obra/clank --skill Test-Driven Development (TDD)
Manual install
git clone --depth 1 https://github.com/obra/clank.git /tmp/clank
mkdir -p ~/.claude/skills
cp -r /tmp/clank/skills/testing/test-driven-development ~/.claude/skills/Test-Driven-Development-TDD-

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Test-Driven Development (TDD)

## Overview

Write the test first. Watch it fail. Write minimal code to pass.

**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.

**Violating the letter of the rules is violating the spirit of the rules.**

## When to Use

**Always:**
- New features
- Bug fixes
- Refactoring
- Behavior changes

**Exceptions (ask your human partner):**
- Throwaway prototypes
- Generated code
- Configuration files

Thinking "skip TDD just this once"? Stop. That's rationalization.

## The Iron Law

```
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
```

Write code before the test? Delete it. Start over.

**No exceptions:**
- Don't keep it as "reference"
- Don't "adapt" it while writing tests
- Don't look at it
- Delete means delete

Implement fresh from tests. Period.

## Red-Green-Refactor
Read the full skill on GitHub

Details

Skill name
Test-Driven Development (TDD)
Repository
obra/clank
Path
skills/testing/test-driven-development/SKILL.md
Repo updated
9 October 2025

FAQ

What does the Test Driven Development (TDD) skill do?

Write the test first, watch it fail, write minimal code to pass

How do I install the Test Driven Development (TDD) skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add obra/clank --skill Test-Driven Development (TDD). Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Test Driven Development (TDD) popular?

It lives in obra/clank, which has 43 GitHub stars and 26 forks.

Related skills

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.