test-driven-development

Enforce test-first discipline for feature and bugfix work.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development ensures you fail tests first to drive correct implementation and prevent regressions.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test, implement the minimal code, and refactor while keeping tests green.
  • Understand-before-testing: deeply understand the interface and expected behavior before writing tests to avoid false assumptions.
  • Anti-pattern avoidance: enforce discipline to avoid "test-after" or mocks that test implementation rather than behavior.

Quick Start

Begin by writing a failing test for the intended behavior, then implement the minimal code to pass.

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 code regressions?

Test-driven development is a test-first workflow where you write failing unit tests to drive correct implementation and prevent regressions. It ensures you validate expected behavior before writing the functional code, keeping software verifiable.

How do I start writing tests first using the red-green-refactor cycle?

To start writing tests first, deeply understand the expected interface and behavior, write a failing test for that behavior, and then implement the minimal code required to pass the test before refactoring.

Does test-driven development work for fixing bugs in modern software projects?

Yes, test-driven development applies to bugfix work in modern software projects by enforcing test-first discipline. You write a failing test that captures the bug, then implement the fix to make the test pass.

Why should I avoid test-after workflows and mocks that test implementation?

You should avoid test-after workflows and implementation-testing mocks because they violate TDD anti-patterns, leading to false assumptions and brittle tests. Understanding expected behavior before testing ensures you validate behavior rather than implementation details.

When should I not use test-driven development for a feature?

You should not use test-driven development when you lack a clear understanding of the interface and expected behavior, as writing tests prematurely leads to false assumptions. It requires environments supporting unit tests and disciplined red-green-refactor workflows.