tdd

Guide test-first feature delivery with a red-green-refactor workflow.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/Rayzerrek/dotfiles --skill tdd-rayzerrek
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/Rayzerrek/dotfiles/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/Rayzerrek/dotfiles --skill tdd-rayzerrek

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you build features and fix bugs with test-driven development, so you can validate behavior early, keep implementation changes safe, and avoid brittle tests.

Core Features & Use Cases

  • Behavior-first testing: Write tests that describe what the system does through public interfaces instead of how it is built.
  • Red-green-refactor workflow: Progress one behavior at a time with a failing test, minimal code to pass, and cleanup only after the tests are green.
  • Practical testing guidance: Choose integration-style tests, decide what to mock at system boundaries, and shape interfaces for testability.
  • Use case: When adding a checkout flow or fixing a regression, this Skill helps you define the right behaviors to test, implement them incrementally, and refactor confidently afterward.

Quick Start

Ask me to plan and implement one user-visible behavior at a time using test-driven development, starting with the first test and the simplest code needed to make it pass.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I implement test-driven development for a new feature?

To implement test-driven development, you progress one behavior at a time using a red-green-refactor workflow: write a failing test, add minimal code to pass it, and refactor only after the tests are green.

What is behavior-focused test design in TDD?

Behavior-focused test design in TDD describes what a system does through its public interfaces, avoiding brittle tests tied to internal implementation details and ensuring safer refactoring.

How do I handle mocking when writing integration tests?

When writing integration tests, you should limit mocking strictly to system boundaries, which shapes interfaces for testability while allowing internal components to be verified through integration-style tests.

When should I use vertical slicing in test-driven development?

Vertical slicing in test-driven development is used when adding features or fixing regressions, allowing you to plan and implement one user-visible behavior at a time through the full stack.

When should I refactor code during a red-green-refactor cycle?

You should refactor code during the red-green-refactor cycle only after the tests are green, ensuring that implementation changes remain safe and the previously validated behavior stays intact.