test-driven-development

Guide the RED-GREEN-REFACTOR cycle for test-driven development tasks.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/MudraMartin/dotlight-skillset --skill test-driven-development-mudramartin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/MudraMartin/dotlight-skillset/tree/main/superpowers/test-driven-development
Command: npx skills add https://github.com/MudraMartin/dotlight-skillset --skill test-driven-development-mudramartin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenges of implementing test-driven development (TDD), ensuring that code is reliable and behaviorally correct through rigorous testing.

Core Features & Use Cases

  • Test-Driven Workflow: Guides through the RED-GREEN-REFACTOR cycle for each development task.
  • Domain Model and Persistence Validation: Ensures that the domain and persistence models are respected during testing.
  • Seam Identification: Promotes the use of well-defined seams for testing at the public boundaries of the code.
  • Test Quality Assurance: Offers a checklist to verify test quality and completeness.
  • Anti-Pattern Avoidance: Highlights common testing anti-patterns and how to avoid them.
  • Use Case: For developers who want to ensure that their code is robust and less prone to bugs through the TDD process.

Quick Start

To begin, use the skill with a new feature or bugfix, starting by writing a failing test.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I start writing tests before implementation using test-driven development?

To start test-driven development, write a failing test for a new feature or bugfix first. This initiates the RED-GREEN-REFACTOR cycle, guiding you to create precise tests that reflect real behavior before writing the implementation code.

What is the RED-GREEN-REFACTOR cycle in TDD?

The RED-GREEN-REFACTOR cycle in TDD is a workflow that begins with writing a failing test (RED), making it pass with implementation code (GREEN), and improving the code structure (REFACTOR) to ensure reliable and behaviorally correct software.

How do I ensure my tests respect domain and persistence model design?

Ensure tests respect domain and persistence model design by validating them during the TDD workflow. The process promotes adherence to software design principles and the use of well-defined seams for testing at the public boundaries of the code.

What are common testing anti-patterns and how do I avoid them in TDD?

Common testing anti-patterns in TDD are flawed testing practices that reduce software quality. You avoid them by using a provided test quality assurance checklist to verify test completeness and ensure tests accurately reflect real behavior.

Do I need to understand software design principles to use test-driven development?

Yes, test-driven development requires an understanding of software design principles. This foundational knowledge is necessary to identify well-defined seams for testing and to implement precise tests that prevent bugs effectively.

When should I not use the test-driven development workflow?

You should not use the test-driven development workflow if your task lacks clear behavioral requirements or public boundaries for testing seams. TDD focuses on precise tests reflecting real behavior, making it less suitable for exploratory or structural-only code changes.