
Test Driven Development
Forces strict test-driven development by requiring tests before any implementation code. Won't let you write production code without a failing test first, and actually makes you delete existing code if you wrote it before the test. Walks through the red-green-refactor cycle with mandatory verification steps at each phase. Catches all the common rationalizations like "I'll test after" or "keep it as reference" and shuts them down. Good for breaking the habit of testing after implementation, since it's surprisingly hard to stick to true TDD without external enforcement of the discipline.
- install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
- 24
- skills.sh installs
- 274.8K
- GitHub stars
- 315.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add obra/superpowers --skill test-driven-development --agent claude-codeInstalls into .claude/skills of the current project.
Files
Test-Driven Development (TDD)
Overview
Write the test first. Watch it fail. Write minimal code to pass.
Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.
Violating the letter of the rules is violating the spirit of the rules.
When to Use
Always:
- New features
- Bug fixes
- Refactoring
- Behavior changes
Exceptions (ask your human partner):
- Throwaway prototypes
- Generated code
- Configuration files
Thinking "skip TDD just this once"? Stop. That's rationalization.
The Iron Law
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Write code before the test? Delete it. Start over.
No exceptions:
- Don't keep it as "reference"
- Don't "adapt" it while writing tests
- Don't look at it
- Delete means delete
Implement fresh from tests. Period.
Red-Green-Refactor
Sponsors
Details
- Repository
- github.com/obra/superpowers
- Categories
- Testing & QA, Documentation
More from obra/superpowers
All 14- Verification Before Completion270.3K
- Executing Plans257.5K
- Subagent Driven Development252K
- Receiving Code Review235.1K
- Dispatching Parallel Agents231.3K
- Writing Skills231.3K
- Using Git Worktrees230.2K
- Finishing A Development Branch227.7K
- Brainstorming423.3K
- Systematic Debugging326.7K
- Writing Plans298.6K
- Using Superpowers283.7K
- Requesting Code Review276.5K