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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TDD prevents brittle, implementation-coupled code changes by forcing behavior-focused tests that guide development and enable safe refactoring.

Core Features & Use Cases

  • Red-green-refactor loop: Drive development by writing one failing test, implementing the smallest code to pass, then refactoring.
  • Vertical slicing workflow: Avoid horizontal batching of tests before implementation by pairing each test with its direct implementation step.
  • Behavior-over-implementation testing: Use public interfaces and integration-style checks so tests survive refactors.

Quick Start

Apply the tdd skill to your feature by writing one behavior test first, implementing only the minimum needed to make it pass, and repeating the cycle until all intended behaviors are covered.

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 for a new feature?

Test-driven development starts by writing one failing behavior test for a new feature, then implementing the minimum code needed to make it pass, and repeating this red-green-refactor cycle until all intended behaviors are covered.

Why do my tests break when I refactor my code?

Refactoring breaks tests when they are coupled to implementation details rather than public interfaces. Behavior-over-implementation testing using integration-style checks ensures tests verify expected outcomes and safely survive code restructuring.

What is the red-green-refactor loop in TDD?

The red-green-refactor loop is a test-driven development cycle where you write a failing test, implement the smallest code to pass it, and then safely refactor the code while keeping tests green.

When should I use tracer-bullet iterations in TDD?

Tracer-bullet iterations are used in test-driven development to build features incrementally by writing one test and its direct minimal implementation step, preventing horizontal batching and ensuring vertical slicing through the workflow.

Does TDD work for fixing existing bugs?

TDD works for fixing bugs by first writing a failing integration-style test that captures the buggy behavior through a public interface, then implementing the minimal code correction to turn the test green.

What are the limitations of test-driven development?

Test-driven development requires strict adherence to vertical slicing and avoiding horizontal batching of tests. If you refactor before achieving green or test implementation details, TDD cannot prevent brittle, implementation-coupled code changes.