tdd

Convert intended behavior into integration-style red-green-refactor cycles.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/ThorStarlord/interface-skills --skill tdd-thorstarlord
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/ThorStarlord/interface-skills/tree/main/skills/tdd
Command: npx skills add https://github.com/ThorStarlord/interface-skills --skill tdd-thorstarlord

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the problem of shipping buggy or fragile changes by turning intended behavior into integration-style tests that stay meaningful through refactors.

Core Features & Use Cases

  • Red-green-refactor workflow: Guide your work through one failing test at a time, then the minimal implementation to make it pass, and only then refactor.
  • Behavior-first test quality: Help you write tests that validate public interface behavior rather than internal implementation details.
  • Avoid horizontal slicing: Prevent the common failure mode where you write large batches of tests before understanding and implementing the real behavior.

Use Case: You’re fixing a recurring bug and want confidence you didn’t break existing capabilities; write a single tracer bullet test for the user-visible behavior, implement minimally to pass it, then repeat for the next behavior until the fix is complete.

Quick Start

Use the tdd skill to rewrite your feature work as a sequence of one-test-at-a-time tracer bullets that verify user-facing behavior through public interfaces.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I start test-driven development when fixing a recurring bug?

Test-driven development for bug fixes starts by writing a single failing test that exercises the public interface for the user-visible behavior, implementing minimally to pass it, and repeating until the fix is complete.

What is the red-green-refactor cycle and how does it prevent horizontal slicing?

The red-green-refactor cycle means writing one failing test at a time, implementing the minimal code to pass it, then refactoring safely. It prevents horizontal slicing by avoiding large batches of tests written before understanding the actual behavior.

How do I write integration tests that survive refactoring without breaking?

Integration tests survive refactoring by validating public interface behavior rather than internal implementation details. Behavior-focused tests avoid implementation-coupled assertions, ensuring tests stay meaningful through safe refactors.

When should I not use test-first development for building new features?

Test-first development is less suitable when you cannot define clear public interface behavior or when rapid prototyping requires exploring implementations before locking down behavior-focused test expectations.

What's the best way to apply mocking guidelines in a test-driven development workflow?

Mocking guidelines in test-driven development should focus on testing public interfaces and avoiding implementation-coupled assertions. Mocks should support behavior-focused testing without coupling to internal module structures that change during refactoring.