tdd

Enforce red-green-refactor TDD cycles with vertical slice testing.

12|2|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/alexandrbasis/claudops --skill tdd-alexandrbasis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/alexandrbasis/claudops/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/alexandrbasis/claudops --skill tdd-alexandrbasis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers adopt strict Test-Driven Development practices by guiding them through the red-green-refactor cycle and emphasizing vertical slices over horizontal slicing.

Core Features & Use Cases

  • Canonical TDD workflow: one test → one implementation, end-to-end validation through public interfaces.
  • Vertical-slice emphasis: ensures features are validated across layers without leaking into internal details.
  • Guidance for test-first design: enforces observable behavior and prevents brittle, implementation-focused tests.

Quick Start

Create a minimal test that specifies a public behavior and implement just enough code to pass.

Frequently Asked Questions about tdd

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

FAQPage Schema
What is the red-green-refactor cycle in test-driven development?

Vertical slice testing validates a feature end-to-end across all architectural layers via public interfaces, whereas horizontal slicing isolates internal components. Vertical slices ensure observable behavior is tested end-to-end without leaking into brittle implementation details.

How do I start writing tests using TDD for a new feature?

Yes, TDD is highly applicable for bug fixes. You enforce the red-green-refactor cycle by first writing a failing test that reproduces the bug, then implementing the fix to make it pass, ensuring the end-to-end behavior is validated.

Why should I test behavior through public interfaces instead of internal details?

Testing through public interfaces enforces observable behavior validation and prevents brittle, implementation-focused tests. This vertical slicing approach ensures end-to-end validation without coupling tests to internal code structure.

Does test-driven development work for fixing bugs or just new features?

Test-driven development works for both new feature development and bug fixes. The canonical TDD workflow enforces writing a failing test that reproduces the bug before implementing the minimal code required to fix it.