test-driven-development

Enforce test-first development workflows with failing tests before implementation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the risk of shipping untested, buggy production code that causes regressions, technical debt, and hours of debugging by enforcing a strict test-first development workflow.

Core Features & Use Cases

  • Red-Green-Refactor Cycle Enforcement: Guides you through writing a failing test first, implementing minimal code to pass it, then refactoring, ensuring every piece of production code is verified by a test that failed before implementation.
  • Anti-Rationalization Guardrails: Provides clear rules and rebuttals for common excuses to skip TDD, such as "it's too simple to test" or "I'll add tests later", preventing accidental technical debt.
  • Use Case: When fixing a bug where empty email addresses are accepted in a user signup form, use this Skill to first write a failing test for the empty email rejection, then implement minimal code to pass the test, ensuring the bug cannot recur.

Quick Start

Use the test-driven-development skill to implement the new password reset feature by first writing a failing test for invalid token handling.

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 test-driven development for a new feature?

Test-driven development starts with writing a failing test that defines the desired behavior, then implementing minimal code to pass it, and finally refactoring. This enforces a strict red-green-refactor cycle for reliable feature implementation.

How to fix bugs using test-driven development?

To fix bugs using test-driven development, write a failing test that reproduces the specific bug, such as empty email acceptance in a signup form, then implement minimal code to pass the test, ensuring regression prevention.

What are common test-driven development anti-patterns to avoid?

Common test-driven development anti-patterns include post-implementation testing and mock overuse. Guardrails prevent rationalizations like skipping tests because features seem too simple or planning to add tests later.

When should I use test-driven development for refactoring?

Test-driven development is used for refactoring when you need regression-resistant code. By verifying behavior changes and error handling with mandatory failing tests first, you ensure reliable refactoring without introducing technical debt.

Does test-driven development work for simple code changes?

Test-driven development applies to simple code changes by enforcing mandatory failing test verification. Anti-rationalization guardrails prevent skipping tests for simple changes, eliminating accidental technical debt and ensuring regression prevention.