tdd

Guides test-driven development using the red-green loop with seam-based test placement.

9|Updated Jul 17, 2026
One-click install
npx skills add https://github.com/Yassimba/loom --skill tdd-yassimba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/Yassimba/loom/tree/main/skills/tdd
Command: npx skills add https://github.com/Yassimba/loom --skill tdd-yassimba

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing tests after the fact often produces brittle, implementation-coupled tests that break on every refactor. This Skill enforces a disciplined red-green TDD loop so tests verify behavior through public interfaces and survive refactors. ## Core Features & Use Cases - Red-Green Loop Rules: Enforces writing a failing test first, then only enough code to pass it, one vertical slice at a time. - Seam-Based Test Placement: Requires agreeing on public interface seams with the user before any test is written, focusing effort on critical paths. - Anti-Pattern Detection: Identifies implementation-coupled, tautological, and horizontally-sliced tests, with reference guides on good tests and mocking at system boundaries. - Use Case: When building a new checkout feature, use this Skill to write one failing behavior test at a confirmed seam, implement the minimal code to pass it, and repeat until the feature is complete. ## Quick Start Use the tdd skill to build the CSV export 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 at a confirmed public seam, then write only enough code to make it pass, and repeat one vertical slice at a time. Do not write all tests up front or add speculative features beyond the current failing test.

What is a seam in testing and where should tests go?

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

When should I use mocks in unit tests?

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

What makes a test implementation-coupled or tautological?

Implementation-coupled tests mock internal collaborators or verify through side channels, so they break on refactors without behavior changes. Tautological tests recompute the expected value the same way the code does, so they pass by construction and can never catch a bug.

Which tests are not worth writing in TDD?

Skip tests for assignments, logic-free getters and setters, constants, pass-through wiring, framework behavior, and anything already covered through a higher stable seam. Before writing a test, name the meaningful bug it would catch; if you cannot, do not write it.