TDD

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

57 stars 5 forksTesting & QA

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add javimosch/supercli --skill tdd
Manual install
git clone --depth 1 https://github.com/javimosch/supercli.git /tmp/supercli
mkdir -p ~/.claude/skills
cp -r /tmp/supercli/.agents/skills/tdd ~/.claude/skills/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

## Philosophy

**Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.

**Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification - "user can checkout with valid cart" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.

**Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.

See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.

## Anti-Pattern: Horizontal Slices

**DO NOT write all tests first, then all implementation.** This is "horizontal slicing" - treating RED as "write all tests" and GREEN as "write all code."

This produces **crap tests**:

- Tests written in bulk test _imagined_ behavior, not _actual_ behavior
- You end up testing the _shape_ of things (data structures, function signatures) rather than user-facing behavior
Read the full skill on GitHub

Details

Skill name
tdd
Path
.agents/skills/tdd/SKILL.md
License
MIT
Repo updated
2 November 2026

FAQ

What does the TDD skill do?

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

How do I install the TDD skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add javimosch/supercli --skill tdd. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is TDD popular?

It lives in javimosch/supercli, which has 57 GitHub stars and 5 forks, and is included in 1 curated skill list.

Related skills

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