test-driven-development

Enforce the Red-Green-Refactor cycle for feature development and bug fixes.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/Sungmaster/Sung --skill test-driven-development-sungmaster
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/Sungmaster/Sung/tree/main/.claude/plugins/superpowers/skills/test-driven-development
Command: npx skills add https://github.com/Sungmaster/Sung --skill test-driven-development-sungmaster

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates technical debt and unreliable code by enforcing a strict Test-Driven Development (TDD) cycle, ensuring that every feature is verified by a failing test before implementation.

Core Features & Use Cases

  • Red-Green-Refactor Enforcement: Guides the user through the mandatory cycle of writing a failing test, implementing minimal code, and refactoring.
  • Anti-Pattern Prevention: Provides guardrails against common testing mistakes like mocking behavior instead of real code or adding test-only methods to production classes.
  • Use Case: When implementing a new API endpoint, use this skill to define the expected response and error handling via tests before writing the actual controller logic.

Quick Start

Activate the test-driven-development skill to begin implementing your next feature by writing a failing test first.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce a strict Test-Driven Development workflow for new features?

To enforce Test-Driven Development, you must adhere to the Red-Green-Refactor cycle by writing a failing test first, implementing minimal code to pass it, and then refactoring. This prevents regressions and technical debt.

What is the Red-Green-Refactor cycle in unit testing?

The Red-Green-Refactor cycle is a unit testing process where you write a failing test, implement minimal production code to make it pass, and then refactor the code. This ensures features are verified by failing tests before implementation.

How do I prevent technical debt and regressions when refactoring code?

You can prevent technical debt and regressions during refactoring by strictly enforcing a Test-Driven Development workflow. This ensures all production code changes are verified by failing tests written before implementation.

What are common anti-patterns to avoid when writing unit tests?

Common unit testing anti-patterns include mocking behavior instead of real code and adding test-only methods to production classes. A strict Test-Driven Development workflow provides guardrails to prevent these mistakes.

Does Test-Driven Development work for bug fixes and refactoring tasks?

Yes, Test-Driven Development applies to bug fixes and refactoring tasks, not just new feature development. It ensures production code is always verified by failing tests before implementation to prevent regressions.