Test-Driven Development

Enforce a test-first workflow requiring a failing test before production code.

1|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/chrisliu298/dotfiles --skill test-driven-development-chrisliu298
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Test-Driven Development
Source: https://github.com/chrisliu298/dotfiles/tree/main/agents/extensions/skills/tdd
Command: npx skills add https://github.com/chrisliu298/dotfiles --skill test-driven-development-chrisliu298

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces test-driven development by requiring a failing test before production code is written.

Core Features & Use Cases

  • Encourage writing a failing test before implementing any feature.
  • Guide development for both new features and bug fixes where test coverage exists.
  • Trigger when the user mentions tdd, "test first", "write tests first", "red green refactor", or explicitly invokes "tdd".

Quick Start

Start by writing a failing test that describes the intended behavior, then implement the minimal code to make that test pass.

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 software feature?

To start test-driven development, write a failing test that describes the intended behavior first, then implement the minimal production code required to make that test pass.

Can I use test-driven development for fixing bugs in existing modules?

Yes, test-driven development can guide bug fixes for modules that already have existing test coverage by enforcing a test-first workflow to reproduce the defect before patching it.

When should I not use a test-first workflow?

You should avoid a test-first workflow for throwaway prototypes or non-behavior changes, as test-driven development is designed to enforce behavior-driven feature work rather than temporary scaffolding.

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

The red green refactor cycle is the core test-driven development workflow: write a failing test, implement the minimal code to pass it, and then refactor the implementation while maintaining test coverage.

Does test-driven development require existing test coverage to work?

Test-driven development activates when a module has existing test coverage, but it also encourages writing a failing test first for new features to ensure behavior is validated before implementation.