Drives implementation by writing a failing test first, then the smallest code that passes it. Use this before writing implementation code for any feature or bugfix, when a bug needs a regression test, when existing code is hard to change safely, or when someone asks whether a change is covered. Also use to decide what is worth testing and what is not.
npx skills add https://github.com/cbrock84/headcount --skill test-driven-development
is testing nothing; a test that errors instead of failing is testing the wrong thing.
Never skip step 1. Writing the test after the code produces a test shaped to the implementation,
which is the one shape that cannot catch the implementation being wrong.
Test behavior at the boundary a caller actually depends on. For each unit ask: if this broke
silently, who notices and how? If the answer is nobody, delete the code rather than test it.
between modules.
already covered, exact wording of log lines.
Every bug gets a failing test *before* the fix, reproducing it at the smallest scope that shows it.
That test is the proof the bug existed and the guard that it stays fixed. A fix without one is a
claim.
rejects_expired_token, not test_auth.something.
code tests the mock.
Report the tests added, what each pins down, what is deliberately untested and why, and the actual
command you ran with its output. "Tests pass" without the command output is not a result.
Take cbrock84/test-driven-development from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.