tdd

Guide test-driven development through red-green-refactor iterations with behavior-focused integration tests.

2|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/miptah21/skills --skill tdd-miptah21
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/miptah21/skills/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/miptah21/skills --skill tdd-miptah21

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you develop features and fix bugs by guiding a test-first workflow that verifies behavior through public interfaces, reducing regressions and brittle tests.

Core Features & Use Cases

  • Red-Green-Refactor loop: Drive development with one tracer bullet test at a time, then refactor only after reaching GREEN.
  • Behavior-first testing: Write integration-style tests that describe what the system does rather than how it is implemented.
  • Mocking guardrails: Mock only system boundaries (external APIs, databases sometimes, time/randomness, file system sometimes) to keep tests meaningful.

Quick Start

Use this Skill when you want to implement or repair a capability by requesting a red-green-refactor plan and then generating behavior-focused integration tests that survive refactoring.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I fix brittle integration tests when refactoring my code?

Brittle integration tests are fixed by verifying behavior through public interfaces using red-green-refactor iterations, ensuring tests remain stable across refactors. This approach drives development with one tracer bullet test at a time to avoid implementation coupling.

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

The red-green-refactor loop is a test-driven development cycle where you write one failing tracer bullet test, implement code to reach GREEN, then refactor. This vertical slicing approach builds reliable software incrementally while maintaining stable integration tests.

When should I use mocking in integration tests?

Mocking should be restricted to system boundaries such as external APIs, databases, time, randomness, and file systems. Mocking only these boundaries keeps integration tests meaningful and behavior-focused while avoiding brittle coupling to internal implementation details.

How do I implement a feature using test-driven development?

Feature implementation with test-driven development requires requesting a red-green-refactor plan, then generating behavior-focused integration tests through public interfaces. This tracer-bullet vertical slicing approach avoids horizontal batch test writing and verifies expected system behavior.

Can I use test-driven development for bug fixing?

Test-driven development fits bug fixing scenarios by guiding a test-first workflow that verifies behavior through public interfaces. Red-green-refactor iterations repair capabilities while reducing regressions and ensuring integration tests survive subsequent refactors.