test-driven-development

Enforce test-first discipline through red-green-refactor cycles across projects.

5|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/mrtolkien/GHOST --skill test-driven-development-mrtolkien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/mrtolkien/GHOST/tree/main/vendor/superpowers/test-driven-development
Command: npx skills add https://github.com/mrtolkien/GHOST --skill test-driven-development-mrtolkien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a test-first workflow so a failing test exists before any production code is written, reducing regression risk and guiding disciplined development.

Core Features & Use Cases

  • Red-Green-Refactor workflow: write a failing test, implement the minimal code to pass, and refactor.
  • Coverage by design: ensures tests drive API design and safety nets for features and bug fixes.
  • Cross-language applicability: usable across languages and tools that support automated tests.

Quick Start

Write a failing test for a new feature, implement the minimal production code to pass, and then refactor for clarity and maintainability.

Frequently Asked Questions about 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 the red-green-refactor cycle work?

Test-driven development is a test-first workflow where you write a failing test, implement minimal production code to pass it, and then refactor. This red-green-refactor cycle reduces regression risk and guides disciplined software engineering.

How do I enforce test-first discipline when fixing bugs or adding features?

To enforce test-first discipline, ensure a failing test is present before writing any production code for bug fixes or features. This approach guarantees safety nets exist and drives API design by requiring tests to fail first.

Can I use test-driven development across different programming languages and tools?

Yes, test-driven development is cross-language applicable. It works across any programming languages and tools that support automated tests, allowing you to maintain quality assurance regardless of your specific software engineering stack.

What is the best way to start a test-first workflow for a new feature?

The best way to start is to write a failing test for the new feature, implement the minimal production logic to make it pass, and then refactor the code for clarity and maintainability while keeping all tests green.

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

Writing a failing test before implementing production code ensures coverage by design. It validates that your safety nets are effective, guides API design, and reduces regression risk throughout feature development and refactoring.