tdd

Guide test-driven development with a red-green-refactor cycle for software features.

Updated Feb 19, 2026
One-click install
npx skills add https://github.com/sustinbebustin/.dotfiles --skill tdd-sustinbebustin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/sustinbebustin/.dotfiles/tree/main/home/.claude/skills/tdd
Command: npx skills add https://github.com/sustinbebustin/.dotfiles --skill tdd-sustinbebustin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides users through the Test-Driven Development (TDD) process, ensuring software is built with a focus on verifiable behavior and robust design, reducing bugs and improving maintainability.

Core Features & Use Cases

  • Red-Green-Refactor Loop: Facilitates the core TDD cycle for writing tests before implementation.
  • Behavior-Driven Design: Emphasizes testing through public interfaces to ensure tests reflect desired outcomes, not internal implementation.
  • Use Case: When developing a new user authentication feature, use this Skill to write tests for login, logout, and password reset flows before writing the actual code, ensuring each piece of functionality works as expected.

Quick Start

Follow the test-driven development workflow to build the new feature.

Frequently Asked Questions about tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the red-green-refactor cycle work in test-driven development?

The red-green-refactor cycle in test-driven development involves writing a failing test, writing the minimum code to pass it, and then refactoring the implementation while keeping tests green. This Skill guides you through each incremental loop to ensure verifiable behavior.

How do I write tests for new software features before writing the implementation code?

You can write tests for new software features by using this Skill to plan behavior-driven tests through public interfaces. It helps you establish a tracer bullet development approach, incrementally building functionality and verifying desired outcomes before implementing internal details.

Should I mock internal collaborators when doing behavior-driven development?

When doing behavior-driven development with this Skill, you should avoid mocking internal collaborators. It emphasizes writing integration-style tests that verify behavior through public interfaces rather than focusing on implementation-specific details or internal dependencies.

What is the best way to use test-driven development for fixing bugs?

The best way to use test-driven development for fixing bugs is to write a failing test that reproduces the bug, then apply the red-green-refactor loop. This Skill guides you through the incremental process to ensure the fix works without breaking existing behavior.

Can I use test-driven development for complex refactoring stages?

Yes, you can use test-driven development for complex refactoring stages. This Skill facilitates the refactoring phase of the cycle, allowing you to improve code design and maintainability incrementally while ensuring your integration-style tests remain green throughout the process.