test-driven-development

Guide users through the Red-Green-Refactor cycle for test-driven development.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/acabreragnz/dotfiles --skill test-driven-development-acabreragnz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/acabreragnz/dotfiles/tree/main/.claude/skills/test-driven-development
Command: npx skills add https://github.com/acabreragnz/dotfiles --skill test-driven-development-acabreragnz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a rigorous development process that leads to more robust, maintainable, and bug-free code by ensuring tests are written before implementation.

Core Features & Use Cases

  • Test-First Development: Guides users to write failing tests before writing any production code.
  • Red-Green-Refactor Cycle: Implements the core TDD loop for writing, verifying, and cleaning code.
  • Use Case: When starting a new feature or fixing a bug, use this Skill to ensure you write a failing test first, then minimal code to pass, and finally refactor.

Quick Start

Follow the Red-Green-Refactor cycle for all new code.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I start writing code using the test-driven development cycle?

Test-driven development begins with writing a failing test before any production code, then writing minimal code to pass the test, and finally refactoring. This enforces the Red-Green-Refactor cycle to guarantee correctness and prevent regressions.

What is the Red-Green-Refactor cycle in software development?

The Red-Green-Refactor cycle is the core test-driven development loop: Red means writing a failing test, Green means writing minimal code to pass it, and Refactor means cleaning up the code while maintaining correctness.

When should I use test-first development for bug fixes?

Test-first development should be used for bug fixes by writing a failing test that reproduces the bug before fixing the implementation. This ensures the production code is preceded by a failing test to prevent future regressions.

Does test-driven development work for refactoring existing features?

Test-driven development works for refactoring by ensuring existing tests pass before and after code changes. The methodology facilitates the Refactor stage to clean up production code while maintaining correctness and preventing regressions.

What's the best way to prevent code regressions in agile development?

The best way to prevent regressions is enforcing test-driven development, which ensures production code is always preceded by a failing test. This rigorous process guarantees correctness and leads to more maintainable code.