test-driven-development

Enforce the Red-Green-Refactor cycle by requiring a failing test before production code.

2|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/ShunmeiCho/dotclaude --skill test-driven-development-shunmeicho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/ShunmeiCho/dotclaude/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/ShunmeiCho/dotclaude --skill test-driven-development-shunmeicho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces the Test-Driven Development workflow, guiding teams to write a failing test before production code to ensure correct behavior from the start.

Core Features & Use Cases

  • Red-Green-Refactor cycle discipline for feature work, bug fixes, and refactoring.
  • Promotion of explicit, well-named tests that document expected behavior.
  • Use Case: when implementing a new feature, begin with a failing test to define scope and contract before coding.

Quick Start

Create a failing test for the desired behavior, run tests to observe the failure, implement the minimal code to make the test pass, and then refactor for clarity while keeping all tests green.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How does the test-driven development workflow guide feature implementation?

The test-driven development workflow guides feature implementation by enforcing the Red-Green-Refactor cycle, requiring a failing test to define the scope and contract before writing production code.

How do I start writing a failing test before coding a new feature?

To start writing a failing test, create an explicit, well-named test for the desired behavior, run it to observe the failure, implement minimal code to pass, and refactor for clarity.

Can I use test-driven development for bug fixes and refactoring?

Yes, you can use test-driven development for bug fixes and refactoring by applying the Red-Green-Refactor cycle to ensure correct behavior and prevent production code without tests.

Why does test-driven development require a failing test before production code?

Test-driven development requires a failing test before production code to ensure correct behavior from the start, document expected behavior explicitly, and promote minimal, well-named tests.

What is the best way to maintain code quality during refactoring?

The best way to maintain code quality during refactoring is to keep all tests green while refactoring for clarity, ensuring the test-driven development cycle preserves correct behavior throughout the process.