test-driven-development

Coordinate red-green-refactor cycles to validate one behavior at a time.

1|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/mopeyjellyfish/flywheel --skill test-driven-development-mopeyjellyfish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/mopeyjellyfish/flywheel/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/mopeyjellyfish/flywheel --skill test-driven-development-mopeyjellyfish

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces a disciplined development approach where you prove one behavior at a time using red-green-refactor, ensuring changes are behavior-driven and test-first.

Core Features & Use Cases

  • Strict red-green-refactor workflow that guards against untested changes.
  • Prevents premature implementation by forcing failing tests before code.
  • Guides verification and refactoring while maintaining behavior contracts.

Quick Start

Start by writing a failing test for the next behavior, confirm red, implement the smallest green change, and then refactor while keeping the test green.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle in test-driven development is a workflow where you write a failing test, implement the smallest code change to make it pass, and then refactor while preserving the proven behavior.

How do I use TDD to safely refactor existing code?

You use TDD for refactoring by applying the red-green-refactor cycle to validate one behavior at a time, ensuring external behavior is proven by tests before you modify or refactor the underlying code.

How do I prevent premature implementation when writing behavior tests?

You prevent premature implementation by enforcing a strict test-first flow: write a failing test for the next behavior, confirm it is red, and implement only the smallest code change needed to reach green.

When should I use a test-first approach for bug fixes?

You should use a test-first approach for bug fixes when external behavior must be proven before code changes, allowing you to validate the bug with a failing test and confirm the fix without regressions.

Does test-driven development work for quality assurance on any software testing task?

Test-driven development applies to quality assurance across feature work, bug fixes, and refactors by coordinating red-green-refactor cycles to validate one behavior at a time and maintain behavior contracts.

What are the limitations of enforcing strict test-first coding?

A limitation of strict test-first coding is that it forces a failing test before any implementation, which may slow down rapid prototyping or exploratory coding where behavior contracts are not yet defined.