test-driven-development

Enforce test-first development with the Red-Green-Refactor cycle.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/tusosos/manus-knowledge-base --skill test-driven-development-tusosos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/tusosos/manus-knowledge-base/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/tusosos/manus-knowledge-base --skill test-driven-development-tusosos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This approach guides teams to write tests before implementation, preventing regressions and guiding clean design.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test, implement code, refactor for clarity.
  • Behavior-driven discipline: keeps tests in sync with requirements and prevents overfitting.
  • Applicable to features, bug fixes, and refactors across projects of any size.

Quick Start

Describe a feature, write a failing test first, then implement just enough code to pass.

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 means writing a failing test, implementing just enough code to pass it, and then refactoring for clarity. This enforces test-first development to prevent regressions and guide clean design.

How do I start writing tests before implementation for a new feature?

To start writing tests before implementation, you describe the feature, write a failing test first, and then implement just enough code to pass. This test-first workflow keeps tests in sync with requirements and prevents overfitting.

Can I apply test-driven development to refactors and bug fixes?

Yes, you can apply test-driven development to refactors and bug fixes across codebases of varying sizes. It guides teams to write failing tests before code and maintain green tests throughout the refactoring process.

Why does behavior-driven discipline matter in software testing?

Behavior-driven discipline matters in software testing because it keeps tests in sync with requirements and prevents overfitting. This ensures clear, minimal tests fail first and validate actual behavior rather than implementation details.

When should I not write production code without a failing test?

You should never write production code without a failing test when following this development workflow. It strictly enforces writing failing tests before code to prevent regressions and ensure every feature has clear requirements.