tddcommit 3f59913SKILL.md · Testing & Debugging
Test-Driven Development
Builds features and fixes bugs test-first in a red-to-green loop, testing behavior only at public seams agreed with the user.
npx skills add mattpocock/skills --skill tddCommand selected. Copy it manually.
- Permissions
- read-repo
- write-files
- shell
- network
- Compatible with
- Claude Code, Codex, Copilot, Gemini CLI
- GitHub
- 308.7k
- Source
- Community · Matt Pocock
- Status
- Scan passed
- License
- MIT
- Category
- Testing & Debugging
Core rule
Red before green: write the failing test first, then only enough code to pass it.
Execution Phases
Phase 01Learn the domain language
Read GLOSSARY.md if it exists so test names match the project's language, and respect ADRs in the area.
Phase 02Agree on the seams
Write down the seams under test, each with a one-line note on what it catches and misses, and confirm them with the user.
Phase 03Write one failing test
Test behavior through the public interface at one seam, with expected values from an independent source of truth.
Phase 04Minimal implementation
Write only enough code to pass the test, without anticipating future tests or adding speculative features.
Phase 05Repeat in vertical slices
Repeat one test and one implementation per cycle; refactoring is not part of the loop and belongs to the code review stage.
Permissions (summarised from SKILL.md)
| Capability | Needed | Details |
|---|---|---|
| File writes | Required | Writes tests and the implementation code that makes them pass. |
| Command execution | Tests only | Runs tests to see them fail, then pass. |
| Network outbound | Not required | The workflow has no network steps. |
SKILL.md frontmatter (YAML)
---
name: tdd
description: Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
---