Test-Driven Development
test-driven-development/
Makes Claude write the failing test first, watch it fail, then write the minimum code to pass. Includes counters for the usual excuses to skip a test.

Write the failing test first, watch it fail, then write the minimum code that makes it pass.
Why use it
- Tests written after the code test what the code does, not what it should do.
- A bug with no reproducing test comes back.
- Agents rationalize skipping the test ("it's too simple to break"); this counters that.
What it does
- The red → green → refactor loop, stated as a hard sequence.
- Test-quality principles: one behavior per test, no logic in tests, names that describe the behavior.
- Rationalization counters for the usual excuses to skip a test.
- Test-layer selection, which level (unit / integration / end-to-end) actually proves this behavior.
Benefits
- Bugs stop coming back: every fix ships with the test that catches it next time.
- Better design, for free. Testable code is decoupled code, and you get it early.
- No more skipped tests: the usual excuses are answered in advance.
- Any language, any framework. The loop is the same everywhere.
Install
Download this skill and copy the test-driven-development folder to .claude/skills/test-driven-development/ in your project, or to ~/.claude/skills/test-driven-development/ to use it in every project. Claude Code finds it on its own; you can also call it with /test-driven-development.
Part of the Agent Engineering bundle. To get the whole set as a Claude Code plugin: /plugin marketplace add endorphin-ai/hasbrains-agent-kit, then /plugin install agent-engineering@hasbrains-agent-kit.
Source: endorphin-ai/hasbrains-agent-kit. License: MIT.
#!/usr/bin/env bash
# Not used: a placeholder from Brain Lab. This skill ships no example script.
exit 0