test-driven-development

Enforce a red-green-refactor cycle with failing tests first.

Updated Jul 11, 2025
One-click install
npx skills add https://github.com/mattleonard16/taxhelper --skill test-driven-development-mattleonard16
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/mattleonard16/taxhelper/tree/main/.factory/skills/test-driven-development
Command: npx skills add https://github.com/mattleonard16/taxhelper --skill test-driven-development-mattleonard16

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing robust software requires a disciplined approach to testing; TDD enforces the test-first mindset to catch regressions early and define expected behavior.

Core Features & Use Cases

  • Red-Green-Refactor workflow: Write a failing test first, then implement the minimal code to pass, and refactor.
  • Test-first discipline: Guides feature development, bug fixes, and refactors with automated tests.
  • Quality assurance through tests: Builds confidence that changes preserve intended behavior across iterations.

Quick Start

Create a failing test for the new feature, then implement the simplest 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 the red-green-refactor cycle work?

Test-driven development is a test-first workflow where you write a failing test, implement minimal code to pass it, and refactor continuously. This red-green-refactor cycle ensures code correctness and catches regressions early.

How do I fix a bug using a test-first workflow?

To fix a bug using a test-first workflow, you write a failing unit test that reproduces the specific bug, then implement the minimal code changes required to make that test pass, ensuring the behavior is verified.

Does test-driven development work for refactoring existing software projects?

Yes, test-driven development works for refactoring existing software projects by requiring continuous verification. Writing automated tests before refactoring builds confidence that changes preserve the intended behavior across iterations.

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

You should not use a test-first approach when exploratory prototyping lacks defined expected behavior. Test-driven development requires clear expected outcomes upfront to write failing tests that guarantee correct feature behavior.