TDD

Test-driven development with behavior-focused tests, clear seams, and small red-green-refactor steps.

TDD is the individual tdd skill from Matt Pocock’s public [mattpocock/skills](https://github.com/mattpocock/skills) collection. Its official product page is [skills.sh/mattpocock/skills/tdd](https://skills.sh/mattpocock/skills/tdd), and its exact source lives at skills/engineering/tdd/SKILL.md in that repository. The skill is not a testing library and does not run tests itself. Instead, it gives a coding agent rules and vocabulary for planning tests before implementation, writing them, and treating them as a durable part of the codebase. Its core is the red-green cycle: first state a meaningful failing test, then write only enough production code to make that exact test pass, then move to the next small step.

Tests describe observable behavior

The source requires tests at public interfaces rather than against private methods or internal collaboration. A good test reads like a specification of a capability, such as a user being able to check out with a valid cart. The underlying class structure can later change without forcing the test to change with it. That guards against tests which merely narrate the current implementation. The skill specifically warns against mocks that replace internal collaborators, database queries used as a detour around the actual interface, and assertions whose expected value is recalculated with the same logic as the production code. Expected values should come from an independent requirement, a known-good example, or the domain specification.

Agree seams before testing

In the skill’s terminology, a seam is the public boundary where behavior can be observed from outside. Before writing a test, the team should decide which seams are in scope and which are not. That avoids both indiscriminately testing every detail and later arguments about whether a test should exercise the database, an HTTP endpoint, a command-line interface, or another public API. If the repository contains CONTEXT.md or architecture decisions, the skill says to read them first so test names and vocabulary match the domain. That preparation is useful, but it does not replace a shared decision about the paths that matter most.

Work vertically, not horizontally

The skill rejects horizontal work: writing a batch of tests first and building all the implementation afterward easily creates tests for an imagined structure. Instead, it recommends vertical tracer bullets: one behavior, one test, one minimal implementation, then the next thing learned. This limits the size of each change and reveals whether a test really responds to a behavior change. Refactoring is also deliberately separated: it belongs in a review stage after verified changes, not as extra work inside the red-green portion of the cycle.

Installation, provenance, and limits

For an individual installation, the product page gives this command:

npx skills add https://github.com/mattpocock/skills --skill tdd

For Claude Code, the repository names claude plugins install mattpocock-skills as the official plugin route. Before running either path, teams should inspect the current repository content and their own agent configuration; a skill influences how an agent approaches work, but it does not replace domain acceptance or a complete testing strategy. The repository is MIT licensed. Its 254,735 GitHub stars were recorded on 2026-09-07 for the repository as a whole, not for this individual TDD skill. Stars are a point-in-time popularity signal, not evidence of quality, security, or suitability for a particular project.

Who this skill fits

TDD fits teams and individual developers who do not want agents to implement features or bug fixes immediately, but instead want verifiable changes at clear public boundaries. It is particularly useful for domain-rich code, integration points, and changes that should remain protected through refactors. It is less suitable as a replacement for exploratory prototyping, manual UX review, or deciding what the product requirement ought to be. In those situations the skill can still provide structure, but domain clarification and human review remain necessary.

Free
Provider
Matt Pocock
License
MIT
Last reviewed
07.09.2026

Repository and documentation

Categories

Compatible with

Claude Code