One-click install
npx skills add https://github.com/yashs33244/my-mac-claude --skill tdd-yashs33244
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/yashs33244/my-mac-claude/tree/main/skills/mattpocock/engineering/tdd
Command: npx skills add https://github.com/yashs33244/my-mac-claude --skill tdd-yashs33244

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you build or fix software by creating tests that verify behavior before you commit to an implementation, preventing regressions and unclear requirements.

Core Features & Use Cases

  • Red-Green-Refactor TDD loop: Guides you through writing one failing test, implementing the minimum code to pass, and then refactoring.
  • Behavior-first testing: Promotes integration-style tests that exercise public interfaces rather than coupling to internal details.
  • Vertical slicing workflow: Prevents “horizontal slicing” by iterating one behavior at a time using tracer bullets.
  • Refactoring guardrails: Reinforces “never refactor while RED” and suggests refactor candidates after tests pass.

Quick Start

Use the tdd skill when you need to implement or repair a feature or bug by asking for the next tracer-bullet test that targets a specific public behavior.

Frequently Asked Questions about tdd

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

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

To apply test-driven development, you define behavior-first test cases, implement the minimum code required to pass each test sequentially, and refactor only after reaching a passing GREEN state. This red-green-refactor loop ensures reliable test coverage for new features.

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

The red-green-refactor loop in test-driven development is a process where you write a failing test, implement minimal code to make it pass, and then refactor the code. This cycle prevents regressions and ensures your implementation matches desired behaviors.

How do I fix bugs using behavior-first integration testing?

You fix bugs using behavior-first integration testing by creating tests that verify expected behavior through public interfaces before altering the implementation. This approach prevents unclear requirements and ensures your bug fix does not introduce regressions.

Can I refactor my code while test-driven development tests are still failing?

You should never refactor while tests are failing in the red-green-refactor loop. Refactoring guardrails require you to reach a passing GREEN state first, ensuring your structural changes do not alter the verified behavior.

How do tracer bullets help with vertical slicing in test-driven development?

Tracer bullets help with vertical slicing by targeting one specific public behavior at a time. This prevents horizontal slicing and guides you to iterate sequentially through desired behaviors, creating reliable integration-style tests.

What's the best way to prevent horizontal slicing when building software features?

The best way to prevent horizontal slicing is using tracer bullets within the test-driven development loop. This workflow forces you to iterate one behavior at a time, ensuring your integration tests exercise public interfaces rather than coupling to internal details.