AI Skills Catalog
AI Workers

Test Driven Development

The Superpowers TDD skill guides Claude Code through failing tests, minimal fixes and refactoring, with a practical reference for writing tests that catch real defects.
SKILL SCORE86How it is scored
VerifiedFreeMIT

Works with

Packaged from the source skill for Claude, Codex and 4 more.

About this skill

Test-Driven Development is an individual skill from Jesse Vincent's Superpowers collection. It gives Claude Code a strict red-green-refactor workflow: demonstrate a missing behavior with a failing test, add the smallest implementation that passes, and clean up while keeping the tests green.

The package includes the upstream writing-good-tests.md reference. That guide focuses on tests that catch a named defect, exercise real behavior and derive expected values independently of the implementation. This download contains the TDD skill, not the complete Superpowers plugin or its session hooks.

Use this skill when

  • A feature or bug fix needs an executable definition of the expected behavior.
  • An agent is writing production code before establishing a useful regression test.
  • A refactor needs protection against observable behavior changes.
  • A test suite is dominated by assertions about mocks, constants or private implementation details.

What it can do

  • Break a change into small cycles of one failing test and one minimal implementation.
  • Distinguish an expected failure caused by missing behavior from a broken test setup.
  • Review mocks and fixtures against the real dependency behavior they must preserve.
  • Use boundary cases and a mental mutation check to identify unprotected behavior.
  • Keep refactoring separate from adding behavior and report failures from the project test suite.

Typical workflows

  1. Describe one observable change and choose a concrete test that would fail if that behavior were absent.
  2. Run the test, inspect the failure, and correct the setup if it fails for the wrong reason.
  3. Implement only the behavior needed to satisfy the test, then run it again.
  4. Refactor with the tests passing, run the project suite and report any remaining failures.

Inputs and output

Provide the repository, a feature request or reproducible bug, and the project's test command. The intended output is a small implementation change, behavior-focused tests and the observed test results.

Limitations

The skill supplies instructions and examples, not a test runner or a configured development environment. Its upstream workflow is deliberately strict and may need an explicit scope decision for prototypes or configuration-only work. A green suite only supports the cases it checks; it does not prove the absence of defects. Runtime execution of this package has not been tested by the catalog.

What is inside the skill

Section headings from the original SKILL.md (about 1,168 words of instructions). Read the full text in the source repository before installing.

  1. Overview
  2. When to Use
  3. The Iron Law
  4. Red-Green-Refactor
  5. RED - Write Failing Test
  6. Verify RED - Watch It Fail
  7. GREEN - Minimal Code
  8. Verify GREEN - Watch It Pass
  9. REFACTOR - Clean Up
  10. Repeat
  11. Good Tests
  12. Common Rationalizations
  13. Red Flags - STOP and Start Over
  14. Example: Bug Fix
  15. Verification Checklist
  16. When Stuck
  17. Debugging Integration
  18. Final Rule

Bundled files

  • writing-good-tests.md
  • LICENSE

Example prompts

  • Add retry behavior to our TypeScript payment-status client. First write a test showing three attempts after transient failures, run it to confirm the missing behavior, then implement the smallest fix and run the full project suite.
  • Our signup handler accepts an empty email address. Reproduce that bug with a failing test against the real handler, fix the validation, and show both the original failure and the final test results.
  • Before refactoring this Python invoice calculator, identify the observable behaviors that could break. Add independently derived boundary-case expectations and avoid assertions that only check mocks or private structure.

How to install Test Driven Development

Claude Packaged
  1. Download the Claude package from the skill page. The ZIP contains one folder named after the skill, with SKILL.md and any bundled reference files.
  2. For Claude Code, unpack the folder into ~/.claude/skills/ to use it in every project, or into .claude/skills/ inside a repository to share it with your team.
  3. For Claude apps, upload the ZIP in the Skills section of the capabilities settings.
  4. Start a new session and describe the task in your own words. Claude picks the skill when the request matches its description.
More about skills for Claude
Codex Packaged
  1. Download the Codex package. The ZIP contains one folder named after the skill, with SKILL.md and bundled resources.
  2. Unpack the complete folder into .agents/skills/ inside your repository, or into ~/.agents/skills/ for personal use. Preserve its relative reference-file paths.
  3. Start a new Codex session and invoke the skill by name or with $skill-name, or describe a matching task.
  4. AGENTS.md is separate project guidance. The ZIP does not generate or modify that file.
More about skills for Codex
GPT Packaged
  1. Download the GPT package from the skill page.
  2. Create or edit a custom GPT (or a ChatGPT project) and paste the contents of SKILL.md into the instructions field.
  3. Upload the bundled reference files as knowledge so the GPT can consult them.
  4. Test with one of the example prompts from the skill page and adjust the instructions if your use case differs.
More about skills for GPT
Gemini Packaged
  1. Download the Gemini package from the skill page.
  2. For a project, unpack the complete folder into .gemini/skills/ or .agents/skills/. For personal use, use ~/.gemini/skills/ or ~/.agents/skills/.
  3. Run /skills reload in Gemini CLI, then /skills list to check discovery. There is no need to paste the skill into GEMINI.md.
  4. Test a matching task and verify the referenced tools and files are available.
More about skills for Gemini
Cursor Packaged
  1. Download the Cursor package from the skill page.
  2. Unpack the complete skill folder into .cursor/skills/ or .agents/skills/ in your project. For personal local use, ~/.cursor/skills/ and ~/.agents/skills/ are also supported.
  3. Start a new Cursor session. Type / in Agent chat and select the skill name, or describe a matching task.
  4. Commit the skill folder and resources for team use. Personal local skills are not automatically available to remote agents or automation runs.
More about skills for Cursor
OpenCode Packaged
  1. Download the OpenCode package from the skill page.
  2. Unpack the complete folder into .opencode/skills/ in your project, or ~/.config/opencode/skills/ for personal use. OpenCode also supports .agents/skills/ and .claude/skills/ compatibility locations.
  3. Keep supporting files at their original relative paths. AGENTS.md is separate project-wide guidance and is not generated by this ZIP.
  4. Start OpenCode in the project and test a matching task with the model and permissions you use.
More about skills for OpenCode

Permissions & security

Low risk

Inspect the source, license and declared permissions before use. Read the scripts before running them. Review method

Read project files
Write generated skill files

Test Driven Development FAQ

What does the Test Driven Development skill do?

The Superpowers TDD skill guides Claude Code through failing tests, minimal fixes and refactoring, with a practical reference for writing tests that catch real defects.

Which AI agents can use Test Driven Development?

Packages for Claude, Codex and 4 more are built from the same source instructions.

How do I install Test Driven Development in Claude?

Download the Claude package from the skill page. The ZIP contains one folder named after the skill, with SKILL.md and any bundled reference files. For Claude Code, unpack the folder into ~/.claude/skills/ to use it in every project, or into .claude/skills/ inside a repository to share it with your team.

Who made Test Driven Development and what is the license?

Test Driven Development is published by Jesse Vincent under the MIT license. The source is https://github.com/obra/superpowers/tree/main/skills/test-driven-development. The catalog keeps the original attribution.

What permissions does Test Driven Development need?

Declared permissions: read project files, write generated skill files. Risk level: low. Check the scripts in the source before running them.

Test Driven Development Skill for… | AI Skills Catalog