test-driven-development

Enforce Red-Green-Refactor test-driven development workflows across codebases.

3|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/trancong12102/ccc --skill test-driven-development-trancong12102
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/trancong12102/ccc/tree/main/core/skills/test-driven-development
Command: npx skills add https://github.com/trancong12102/ccc --skill test-driven-development-trancong12102

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Test-first development ensures production code is built only after a failing test, preventing undetected defects and guiding design quality.

Core Features & Use Cases

  • Enforces the Red-Green-Refactor cycle to drive implementation and ongoing refactoring.
  • Ensures tests drive decisions during feature development, bug fixes, and code improvements.
  • Improves maintainability and confidence through disciplined testing practices.

Quick Start

Begin by writing a failing test that captures the desired behavior, then implement the minimal code to pass it.

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 (TDD) is a workflow where you write a failing test, implement minimal code to pass it, and then refactor. The Red-Green-Refactor cycle enforces this sequence to drive design decisions and improve maintainability.

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

To start test-driven development, write a failing test that captures the desired behavior of your feature. Then, implement the minimal production code required to make that test pass before moving on to refactoring.

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

Yes, test-driven development is applicable during bug fixes and refactors across codebases. It ensures tests drive decisions and behavior modifications, improving confidence and maintainability when altering existing code.

How does enforcing a failing test before implementation improve code quality?

Enforcing a failing test before production code improves code quality by preventing undetected defects and guiding design decisions. This test-first approach ensures minimal, verifiable functionality and builds confidence through disciplined testing.

What are the limitations of strict test-driven development workflows?

Strict test-driven development workflows may slow down initial feature delivery due to the requirement of writing failing tests before any production code. It enforces a rigid Red-Green-Refactor sequence that requires discipline to maintain rapid feedback.