tdd

Guides test-driven development using the red-green-refactor loop with behavior-focused tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing tests after implementation often produces brittle tests coupled to internal structure that break during refactors. This Skill enforces a disciplined test-first workflow where tests verify observable behavior through public interfaces, so they survive internal changes. ## Core Features & Use Cases - Red-Green-Refactor Workflow: Structures development as vertical slices—one failing test, minimal passing code, then refactor—avoiding the anti-pattern of writing all tests upfront. - Behavior-Focused Test Design: Provides guidelines and examples for writing integration-style tests through public APIs, plus rules for when mocking is appropriate (system boundaries only). - Interface Design Guidance: Includes references on deep modules, dependency injection, and testable interface design to make code naturally testable. - Use Case: When building a new checkout feature, use this Skill to plan which behaviors to test, write one failing test at a time, implement minimal code to pass each, and refactor safely once green. ## Quick Start Use the tdd skill to build a shopping cart feature using test-driven development with the red-green-refactor loop.

Frequently Asked Questions about tdd

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

FAQPage Schema
Should I write all tests before implementation in TDD?

No. Writing all tests first is horizontal slicing, an anti-pattern that produces tests of imagined behavior and data shapes. Use vertical slices instead: one test, one implementation, repeated, so each test responds to what you learned from the previous cycle.