test-driven-development

Enforce Test-Driven Development by writing failing tests before implementation code.

8|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/hxk622/TokenDance --skill test-driven-development-hxk622
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/hxk622/TokenDance/tree/main/backend/app/skills/builtin/superpowers/test-driven-development
Command: npx skills add https://github.com/hxk622/TokenDance --skill test-driven-development-hxk622

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a rigorous development practice that ensures code is well-tested, reliable, and meets requirements by writing tests before writing implementation code.

Core Features & Use Cases

  • Test-First Development: Mandates writing a failing test before any production code is written.
  • Red-Green-Refactor Cycle: Guides users through the iterative process of writing a failing test (Red), writing minimal code to pass (Green), and then cleaning up the code (Refactor).
  • Use Case: When developing a new feature, use this Skill to ensure you first write a test that defines the expected behavior. Then, write just enough code to make that test pass, followed by refactoring.

Quick Start

Use the test-driven-development skill to write a failing test for the new 'calculateTotal' function.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the test-driven development process for writing new features?

The test-driven development process requires writing a failing test before any production code, then writing minimal code to pass the test, and finally refactoring. This enforces the Red-Green-Refactor cycle to ensure code quality and reliability.

How do I fix bugs using the Red-Green-Refactor cycle?

To fix bugs using the Red-Green-Refactor cycle, first write a failing test that reproduces the bug, then write minimal implementation code to make the test pass, and finally refactor the code while ensuring the test remains green.

When should I use test-driven development for unit testing?

You should use test-driven development for unit testing when developing new features, fixing bugs, or refactoring existing code to ensure well-tested, reliable code that strictly meets defined requirements before implementation.

Does test-driven development require writing tests before implementation code?

Yes, test-driven development strictly requires writing and verifying a failing test before any production code is written. You must observe the failing test first to ensure the implementation code is driven by test requirements.

Can I use test-driven development for refactoring existing code?

Yes, you can use test-driven development for refactoring by guiding the Red-Green-Refactor cycle. The methodology mandates verifying a failing test initially, then cleaning up the code while ensuring the test continues to pass throughout the refactoring process.