test-driven-development

Guide implementing Test-Driven Development with the red-green-refactor cycle.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/christhz666/centro-diagnostico-v11 --skill test-driven-development-christhz666
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/christhz666/centro-diagnostico-v11/tree/main/.skills/test-driven-development
Command: npx skills add https://github.com/christhz666/centro-diagnostico-v11 --skill test-driven-development-christhz666

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the common challenges in software development, such as lack of test coverage, code quality, and maintainability.

Core Features & Use Cases

  • Test-Driven Development: Encourages developers to write tests before implementing features or fixes.
  • Red-Green-Refactor Cycle: A structured approach for writing tests, writing code, and refactoring.
  • Testing Anti-Patterns: Offers guidance on common pitfalls in testing and how to avoid them.
  • Verification Checklist: A step-by-step guide to ensure tests are thorough and effective.
  • When Stuck: Provides solutions for common problems encountered during TDD implementation.
  • Debugging Integration: Integrates testing into the debugging process to ensure code reliability.
  • Final Rule: Establishes the importance of tests in the production codebase.

Quick Start

To start writing tests first for a new feature, read the SKILL.md guide and implement the TDD cycle: Write a failing test, write the minimal code to pass the test, and refactor.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How does test-driven development improve code quality and maintainability?

Test-driven development improves code quality by forcing you to write tests before implementation, ensuring coverage, preventing regressions, and guiding refactoring for maintainable software.

What is the red-green-refactor cycle in software testing?

The red-green-refactor cycle is a structured testing methodology where you write a failing test, implement minimal code to pass it, and then refactor to improve code quality without changing behavior.

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

To start writing tests first, read the guide and implement the TDD cycle: write a failing test, write the minimal code required to pass the test, and then refactor the implementation.

What are common testing anti-patterns and how can I avoid them?

Common testing anti-patterns are pitfalls that reduce test effectiveness; this methodology offers specific guidance on identifying and avoiding these bad practices to ensure tests remain thorough and reliable.

How do I integrate debugging into the test-driven development process?

Debugging integration ensures code reliability by incorporating testing directly into the debugging process, allowing you to verify fixes and prevent regressions while resolving issues.

What should I do when stuck during the TDD implementation process?

When stuck during TDD implementation, you can refer to provided solutions for common problems encountered, utilizing a verification checklist to ensure your tests remain thorough and effective.