Test-Driven Development Agent Skill
The Superpowers test-driven-development skill makes the agent write a failing test first, watch it fail, then write the minimum code to pass.
What the Test-Driven Development skill does
The test-driven-development skill enforces red-green-refactor: write a failing test, confirm it fails for the right reason, write the minimal code to pass, confirm it passes, then clean up.
It also describes what makes a good test, so the agent does not write tests that pass by accident.
“Use when implementing any feature or bugfix, before writing implementation code.”
When this skill fits
- You are adding a feature or fixing a bug and want tests that prove it works.
- Your agent tends to write implementation first and tests that only confirm what it already wrote.
How to install test-driven-development in Claude Code
Commands come from the obra/superpowers README. Restart Claude Code if a newly copied skill does not show up.
- Install Superpowers from the official marketplace. Superpowers is listed in Anthropic's official Claude Code plugin marketplace. The plugin installs the whole Superpowers set, including this skill.
/plugin install superpowers@claude-plugins-official
- Or use the Superpowers marketplace. The project also runs its own marketplace with Superpowers and related plugins.
/plugin marketplace add obra/superpowers-marketplace /plugin install superpowers@superpowers-marketplace
- Or copy the folder by hand. Claude Code loads personal skills from ~/.claude/skills/<name>/ and project skills from .claude/skills/<name>/ in your repository. Clone the repository and copy the test-driven-development folder into either location, keeping SKILL.md and any bundled files together.
git clone https://github.com/obra/superpowers.git mkdir -p ~/.claude/skills && cp -r superpowers/skills/test-driven-development ~/.claude/skills/test-driven-development
Source and license
- Repository
- obra/superpowers by Jesse Vincent (obra)
- Skill file
- skills/test-driven-development/SKILL.md
- License
- MIT (repository license)
- Last checked
Related MCP servers
The skill tells the agent how to do the work. These MCP server guides cover the tools and data it can reach while doing it.
Test-Driven Development skill questions
What does the Test-Driven Development skill do?
The test-driven-development skill enforces red-green-refactor: write a failing test, confirm it fails for the right reason, write the minimal code to pass, confirm it passes, then clean up.
How do I install the Test-Driven Development skill in Claude Code?
Install the Superpowers plugin with /plugin install superpowers@claude-plugins-official, which includes test-driven-development and the rest of the set. You can also copy the test-driven-development folder into ~/.claude/skills/ or a project's .claude/skills/ directory.
What license is the Test-Driven Development skill under?
The obra/superpowers repository is released under the MIT license by Jesse Vincent (obra). Read the LICENSE file for the full text.
Is the Test-Driven Development skill an MCP server?
No. A skill is a folder of instructions and optional scripts that the agent reads into its own context when a task calls for it. An MCP server is a separate program that gives the agent tools and data over the Model Context Protocol. The two work well together: the skill describes how to do the job, and MCP servers reach the systems involved. See matching MCP servers.