test-driven-development

Enforces Red-Green-Refactor cycle for test-first development workflows across software engineering projects.

26|1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/BinyaminEden/claude-combine --skill test-driven-development-binyamineden
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/BinyaminEden/claude-combine/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/BinyaminEden/claude-combine --skill test-driven-development-binyamineden

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the widespread issue of shipping untested, buggy production code that causes outages, regressions, and hours of unplanned debugging by enforcing a strict test-first development workflow.

Core Features & Use Cases

  • Strict TDD Cycle Enforcement: Guides you through the Red (write failing test), Green (minimal implementation), Refactor workflow to ensure every feature, bug fix, or behavior change is test-validated before any production code is written.
  • Testing Anti-Pattern Prevention: Includes reference guidance to avoid common testing mistakes like testing mock behavior, adding test-only methods to production code, and creating incomplete mocks.
  • Use Case: When fixing a bug where empty email addresses are accepted in a user registration form, this Skill ensures you write a failing test for the empty email case before modifying any implementation code, preventing similar regressions in the future.

Quick Start

Use the test-driven-development skill to build the new user notification feature by first writing a failing test for unsubscribed user handling before writing any production code.

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 it prevent bugs?

Test-driven development is a workflow where you write failing tests before implementation code to eliminate untested production code and reduce post-release debugging overhead. It enforces the Red-Green-Refactor cycle to validate every feature and behavior change.

How do I apply the Red-Green-Refactor cycle when fixing a bug?

To apply the Red-Green-Refactor cycle for bug fixes, first write a failing test that reproduces the bug, then write minimal implementation code to pass the test, and finally refactor the code while ensuring tests stay green.

Does test-driven development work for any technology stack and project size?

Test-driven development works across software engineering projects of any size or technology stack. The workflow applies to all feature implementations, bug fixes, refactoring, and behavior changes regardless of the underlying platform.

What testing anti-patterns should I avoid during refactoring?

Avoid common testing anti-patterns during refactoring such as testing mock behavior, adding test-only methods to production code, and creating incomplete mocks. These mistakes undermine test reliability and violate the test-driven development workflow.

Why should I verify a test failure before writing implementation code?

Verifying test failure before writing implementation code is mandatory because it confirms the test accurately detects the missing behavior or bug. This step ensures your regression testing is effective before any production code is written.