test-driven-development

Implement a failing test first workflow with red-green-refactor cycles.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development prevents unverified code changes by forcing you to define expected behavior as a failing test before writing production implementation, reducing regressions and improving confidence in correctness.

Core Features & Use Cases

  • Failing-test-first workflow: Turns requirements into a minimal test that fails for the right reason, then implements the smallest change to make it pass.
  • Tight TDD cycle discipline: Enforces the red → green → refactor loop, including mandatory “verify fails” and “verify passes” steps.
  • Behavior-focused test quality: Promotes clear, single-purpose test names and real-code assertions (avoiding mocks except when unavoidable).
  • When to use / when to pause: Applies to new features, bug fixes, refactoring, and behavior changes, with explicit exceptions to discuss with a human partner for truly throwaway or generated/config scenarios.

Quick Start

Tell me the feature or bug you want to implement, and then guide me to write one minimal failing test, verify it fails for the expected missing behavior, write the smallest production code to make it pass, and finally refactor without adding new behavior.

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 prevent regressions during iterative software development?

Test-driven development prevents regressions by forcing you to define expected behavior as a failing test before writing production code, ensuring every change is verified and documented by tests.

How do I start writing a failing test first for a new software feature?

To start failing-test-first development, define the feature requirement as a minimal test that fails for the correct missing behavior, then implement the smallest production code change to make it pass.

What is the red-green-refactor cycle in test-driven development?

The red-green-refactor cycle enforces writing a failing test, making it pass with minimal code, and refactoring without adding new behavior, with mandatory verification steps at each phase.

When should I avoid using a test-first workflow for software tasks?

You should pause test-first workflows for truly throwaway code or generated configuration scenarios, as these contexts require discussing exceptions with a human partner before applying strict TDD cycles.

Does test-driven development require using mocks for behavior specification?

Test-driven development promotes real-code assertions for behavior specification and actively avoids using mocks, except for situations where mocking external dependencies is strictly unavoidable.