tdd

Guides test-driven development through red-green cycles with seam-based test design.

Updated Sep 19, 2026
One-click install
npx skills add https://github.com/Ab0umar/selrs.cc.BU --skill tdd-ab0umar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/Ab0umar/selrs.cc.BU/tree/main/.agents/skills/tdd
Command: npx skills add https://github.com/Ab0umar/selrs.cc.BU --skill tdd-ab0umar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing tests after implementation often produces brittle, implementation-coupled tests that break on refactors and fail to verify real behavior. This Skill enforces a disciplined red-green TDD loop so tests act as durable specifications of public behavior. ## Core Features & Use Cases - Red-Green Loop Rules: Enforces writing a failing test first, then only the minimal code to pass it, one vertical slice at a time. - Seam Identification: Defines tests only at pre-agreed public boundaries, confirmed with the user before any test is written. - Anti-Pattern Detection: Flags implementation-coupled, tautological, and horizontally-sliced tests with concrete good/bad examples. - Mocking Guidelines: Restricts mocks to system boundaries like external APIs, time, and file systems, with dependency-injection design patterns. - Use Case: When adding a checkout feature, use this Skill to agree on the public seams, write one failing behavior test, implement the minimal code to pass, and repeat slice by slice. ## Quick Start Use the tdd skill to build this feature test-first, starting by agreeing on the seams we should test.

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 with the red-green loop?▼

Write one failing test against a public interface first, then implement only the minimal code needed to make it pass. Repeat one vertical slice at a time, and keep refactoring out of the loop until the review stage.

What is a seam in test-driven development?▼

A seam is the public boundary where you observe behavior without reaching inside the code. Tests live only at pre-agreed seams confirmed with the user, never against private methods or internal structure.

When should I mock dependencies in unit tests?▼

Mock only at system boundaries such as external APIs, databases, time, randomness, and the file system. Never mock your own classes or internal collaborators, and use dependency injection plus SDK-style interfaces to make boundaries mockable.

Why do my tests break every time I refactor code?▼

Tests break on refactors when they are coupled to implementation details, such as mocking internal collaborators, testing private methods, or asserting on call counts. Rewrite them to verify observable behavior through public interfaces instead.

What is a tautological test and how do I avoid it?▼

A tautological test recomputes the expected value the same way the implementation does, so it passes by construction. Avoid it by deriving expected values from independent sources like known literals, worked examples, or the specification.