tdd

Implements test-driven development using red-green-refactor cycles with vertical slices and agreed test seams.

15|3|Updated Jul 9, 2026
One-click install
npx skills add https://github.com/kiurakku/cursor-kit-for-ai --skill tdd-kiurakku
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/kiurakku/cursor-kit-for-ai/tree/main/plugins/engineering/skills/tdd
Command: npx skills add https://github.com/kiurakku/cursor-kit-for-ai --skill tdd-kiurakku

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing tests after code produces tautological, implementation-coupled tests that pass while production breaks. This Skill enforces a disciplined red-green-refactor loop so every behavior is specified by a failing test before any production code exists. ## Core Features & Use Cases - Red-Green-Refactor Loop: Write one failing test per behavior, implement the minimal code to pass, then refactor only while the bar is green. - Seam Selection: Identify test boundaries (pure functions, ports/interfaces, HTTP boundaries, CLI entries) and confirm them with the user before writing any test. - Vertical Slicing: Build thin end-to-end slices per acceptance criterion instead of horizontal layer-by-layer implementation. - Anti-Pattern Detection: Catch implementation-coupled tests, tautological tests, horizontal slicing, and tests that only verify the framework. - Use Case: When implementing a new checkout feature from a spec, use this Skill to write a failing test for the first acceptance criterion, ship the minimal slice, and repeat until all criteria pass. ## Quick Start Use the tdd skill to implement the next acceptance criterion from my spec test-first, starting by proposing test seams for my approval.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I practice test-driven development on a new feature?▼

Start from a spec with acceptance criteria, confirm test seams with stakeholders, then run red-green-refactor cycles: write one failing test naming observable behavior, write minimal code to pass, and refactor only while tests stay green. Complete one acceptance criterion as a vertical slice before starting the next.

What is a test seam in TDD and how do I choose one?▼

A seam is a boundary where you can substitute a test double or call real code without booting the whole system. Common seams are pure functions, ports/interfaces with mocked adapters, HTTP boundaries, and CLI entry points. Confirm seams with the team before writing the first red test.

Why do my tests break when I refactor without changing behavior?▼

Tests break on refactoring when they are coupled to implementation details like private methods, internal mock call order, or large HTML snapshots. Fix this by asserting observable outcomes at the seam through public APIs instead of internal structure.

What is the difference between vertical and horizontal slicing in TDD?▼

Vertical slicing builds a thin end-to-end path through all layers for one acceptance criterion, then widens. Horizontal slicing builds all models, then all repositories, then all handlers with tests at the end, which hides integration failures until late.

When should I not use test-driven development?▼

TDD is a poor fit for exploratory spikes, UI polish, and ops wiring where behavior is not yet specified. If a green step requires a design change the spec did not allow, stop and update the spec before continuing rather than improvising.