test-driven-development
Requires a failing test before implementation code for any feature or bugfix. The loop is red, green, refactor, with the agent forbidden from writing implementation first.
Anatomy
| Parent repo | obra/superpowers |
|---|---|
| Path | skills/test-driven-development |
| Trigger conditions | "Use when implementing any feature or bugfix, before writing implementation code" |
| Instruction format | yaml-frontmatter-md |
| Required tools | shell, file-edit |
| Reusability | stack-specific |
| Complexity | medium |
| Ships scripts / examples / tests / boundaries | no / yes / yes / yes |
Failure modes
Agents write tests that assert the implementation rather than the requirement; pairs best with a separate review skill. Setup-heavy stacks tempt the agent to skip straight to code.
Verdict
The highest evaluation-readiness score in the index because the loop's own output is the evidence. Adopt where your test infrastructure is already decent.
Related skills
Blocks the agent from claiming work is complete, fixed, or passing until it has run verification commands and confirmed output. Evidence…
Forces root-cause investigation before any fix: reproduce, hypothesize one cause at a time, test the hypothesis, then patch. Bans…
Frequently asked questions
What does the test-driven-development skill do?
Requires a failing test before implementation code for any feature or bugfix. The loop is red, green, refactor, with the agent forbidden from writing implementation first.
When does test-driven-development trigger?
Its stated trigger: "Use when implementing any feature or bugfix, before writing implementation code". Trigger precision is a scored reliability dimension.