obra/superpowers@test-driven-development

Enforce test-first development with failing tests before production code.

9|2|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/AllBeingsFuture/AllBeingsFuture --skill obra-superpowers-test-driven-development-allbeingsfuture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: obra/superpowers@test-driven-development
Source: https://github.com/AllBeingsFuture/AllBeingsFuture/tree/main/electron/embedded-assets/skills/superpowers-tdd
Command: npx skills add https://github.com/AllBeingsFuture/AllBeingsFuture --skill obra-superpowers-test-driven-development-allbeingsfuture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies a test-first development workflow to ensure new features, bug fixes, and refactors are specified by failing tests before any production code is written, preventing untested code and regressions.

Core Features & Use Cases

  • Test-first discipline: Write a minimal failing test, confirm it fails, implement the smallest change to pass, then refactor while keeping tests green.
  • Red-Green-Refactor guidance: Step-by-step verification checkpoints and a checklist to avoid common anti-patterns and rationalizations.
  • Practical use cases: New feature development, bug fixes such as input validation, and safe refactoring of existing modules.

Quick Start

Write a minimal failing test that demonstrates the desired behavior, run the test to confirm it fails, implement the smallest change to make it pass, and then refactor while keeping all tests green.

Frequently Asked Questions about obra/superpowers@test-driven-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is test-driven development and how does it prevent regressions?

Test-driven development is a test-first workflow enforcing a failing test before production code implementation. This specifies and verifies behavior for features, bug fixes, and refactors, preventing untested code and regressions.

How do I start practicing the red-green-refactor cycle for unit testing?

To start red-green-refactor, write a minimal failing unit test demonstrating desired behavior, run it to confirm failure, implement the smallest code change to pass, then refactor while keeping all tests green.

Can I apply test-first development to bug fixes and refactoring?

Yes, test-first development applies to bug fixes like input validation and safe refactoring of existing modules. You write a failing test specifying the expected behavior, then implement minimal changes to make it pass.

Why should I write a failing test before implementing production code?

Writing a failing test before production code ensures the desired behavior is explicitly specified and verified first. This prevents untested code, avoids regressions, and provides clear failure expectations during refactoring.

What are common TDD anti-patterns to avoid during test-driven development?

Common TDD anti-patterns involve skipping the failing test verification step or writing excessive implementation before confirming test failure. Step-by-step verification checkpoints and checklists help avoid these rationalizations and maintain test-first discipline.