superpowers-test-driven-development

Enforces red-green-refactor test-driven development workflow for features and bugfixes.

Updated May 26, 2026
One-click install
npx skills add https://github.com/avel123111/triplanio --skill superpowers-test-driven-development-avel123111
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: superpowers-test-driven-development
Source: https://github.com/avel123111/triplanio/tree/main/.claude/skills/superpowers-test-driven-development
Command: npx skills add https://github.com/avel123111/triplanio --skill superpowers-test-driven-development-avel123111

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often write production code before tests, producing tests that pass immediately and prove nothing about correctness. This Skill enforces a strict test-first discipline so every feature and bugfix is backed by a test that was watched failing before implementation. ## Core Features & Use Cases - Red-Green-Refactor Enforcement: Guides the full cycle of writing a failing test, verifying the failure, writing minimal passing code, and refactoring while staying green. - Rationalization Detection: Lists common excuses for skipping TDD (e.g., "too simple to test", "I'll test after") with concrete rebuttals and red flags that trigger a restart. - Testing Anti-Pattern Reference: Companion guide covering mock-behavior testing, test-only production methods, incomplete mocks, and over-mocking, with gate functions to catch each. - Use Case: When fixing a bug where empty emails are accepted, write a failing test asserting the rejection error, watch it fail, implement the minimal validation, and verify all tests pass. ## Quick Start Ask the assistant to implement the next feature or bugfix using strict test-driven development with a failing test written first.

Frequently Asked Questions about superpowers-test-driven-development

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

FAQPage Schema
How do I practice test-driven development on a new feature?

Write one minimal failing test describing the desired behavior, run it to confirm it fails for the right reason, then write the simplest code that makes it pass. Refactor only while tests stay green, then repeat for the next behavior.

How do I fix a bug using TDD?

Write a failing test that reproduces the bug first, such as asserting that an empty email returns an error. Watch it fail, implement the minimal fix, and confirm the test passes along with the rest of the suite.

Why should tests be written before implementation code?

Tests written after code pass immediately, which proves nothing about whether they test the right behavior. Watching a test fail first confirms it actually exercises the missing feature rather than a typo or existing behavior.

When is it acceptable to skip test-driven development?

Exceptions are limited to throwaway prototypes, generated code, and configuration files, and only with explicit approval from your human partner. Rationalizations like "too simple to test" or "I'll test after" are treated as red flags.

What testing anti-patterns should I avoid with mocks?

Never assert on mock existence, never add test-only methods to production classes, and never mock without understanding side effects the test depends on. Mocks must mirror the complete real API structure, not just the fields one test uses.