tdd
An agent skill by mattpocock, from mattpocock/skills. Tags: code, development, testing, validation, workflow.
What it does
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add mattpocock/skills --skill tdd
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/mattpocock/skills
cp -r skills/skills/engineering/tdd ~/.claude/skills/tdd
Safety box score
Grade A, minimal risk: 4 of 100 risk points, rated 2026-10-16. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This is a documentation-only TDD workflow skill: it tells the agent how to write tests first, what to mock, and which project docs to consult. It does not ship any executable scripts or networked components, so the main consideration is simply that it nudges the agent to read extra repo files like `GLOSSARY.md` and ADRs while working in the project tree.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 0 (none) | No shell commands, scripts, or code-evaluation steps are shipped in `SKILL.md`, `tests.md`, or `mocking.md`. |
| Network access | 0 (none) | The files contain no downloading, uploads, API calls, or remote-host instructions. |
| Filesystem reach | 1 (low) | The skill is read-only but explicitly tells the agent to read project files like `GLOSSARY.md` and area ADRs, which is a limited, scoped filesystem touch. |
| Secrets & credentials | 0 (none) | There is no request to open `.env` files, tokens, keychains, browser sessions, or other credential stores. |
| Privilege & persistence | 0 (none) | No sudo, service registration, global installs, shell startup edits, or OS/git setting changes are present. |
| Instruction hijack surface | 0 (none) | No prompt-injection behavior appears; the only meta instruction is to consult the `codebase-design` skill as a reference, not to ignore rules or hide actions. |
| Irreversible actions | 0 (none) | The skill only guides local test writing and refactoring; it does not deploy, publish, send messages, pay, or delete anything. |
| Transparency | 0 (none) | All shipped content is plain text Markdown/YAML; there are no binaries, installers, minified blobs, or decoded-at-runtime code. |
Before installing
- Skim `SKILL.md` to confirm it only changes how tests are written, not how code is executed.
- Check whether your team is comfortable with the skill’s requirement to read `GLOSSARY.md` and local ADRs before testing.
- If you rely on a stricter test workflow, confirm the agent will still ask before choosing seams and won’t test unconfirmed interfaces.
Rated 2026-10-16 by an automated review of 4 files from the skill's repository.
Source
- Repository
- mattpocock/skills (all skills from this repository)
- Path
- skills/engineering/tdd/SKILL.md
- Branch
- main
- Updated
- 2026-10-05
Related skills
- create-verification-skill — Generate a project-local verification skill that drives your app the way a user does — any language, framework, or platform.
- maintain-verification-skill — Periodic pass that keeps a project's verification skill and feature map honest: parallel source readers per feature, one live session driving every feature.
- principle-sequence-verifiable-units — Apply to multi-step work (sweeps, migrations, runs of similar edits) and to how you stack commits and PRs.
- tdd — Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target.
- implement — Implement a piece of work based on a spec or set of tickets.
- implement-spec — Implement the result of /to-spec and /to-tickets in code.