Test Driven Development
Guide test-driven development with proper red-green-refactor workflow.
Install
npx skills add obra/superpowers --skill test-driven-developmentgit clone --depth 1 https://github.com/obra/superpowers.git /tmp/superpowers
mkdir -p ~/.claude/skills
cp -r /tmp/superpowers/skills/test-driven-development ~/.claude/skills/test-driven-developmentPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
What this skill does
TDD guidance for feature implementation. Follow test-driven development practices with red-green-refactor workflow.
Trigger phrases
Claude loads this skill automatically when you say things like:
How it works
- Write failing test first
- Implement minimal code to pass
- Refactor while maintaining green
When to use it
- When implementing new features
- When practicing TDD
- For quality-focused development
From the SKILL.md
# 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
Details
- Skill name
test-driven-development- Repository
- obra/superpowers
- Path
skills/test-driven-development/SKILL.md
FAQ
What does the Test Driven Development skill do?
TDD guidance for feature implementation. Follow test-driven development practices with red-green-refactor workflow.
How do I install the Test Driven Development skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add obra/superpowers --skill test-driven-development. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Related skills
Brainstorming
obra/superpowers
Transforms rough ideas into fully-formed designs. Structure your brainstorming sessions and develop ideas systematically.
Dispatching Parallel Agents
obra/superpowers
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
Executing Plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
Pict Test Designer
omkamal/pypict-claude-skill
Design comprehensive test cases using PICT (Pairwise Independent Combinatorial Testing) for any piece of requirements or code. Analyzes inputs, generates PICT models with parameters, values, and constraints for valid scenarios using pairwise testing. Outputs the PICT model, markdown table of test cases, and expected results.
Webapp Testing
anthropics/skills
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Provider Test Patterns
hashicorp/agent-skills
Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework. Covers test structure, TestCase/TestStep fields, ConfigStateChecks with custom statecheck.StateCheck implementations, plan checks, CompareValue for cross-step assertions, config helpers, import testing with ImportStateKind, sweepers, and scenario patterns (basic, update, disappears, validation, regression), and ephemeral resource testing with the echoprovider package. Use when writing, reviewing, or debugging provider acceptance tests, including questions about statecheck, plancheck, TestCheck
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.