tdd

Apply a plan-red-green-refactor cycle to guide software design.

2|1|Updated Oct 8, 2009
One-click install
npx skills add https://github.com/riethmayer/dotfiles --skill tdd-riethmayer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/riethmayer/dotfiles/tree/main/stow/agents/.agents/skills/tdd
Command: npx skills add https://github.com/riethmayer/dotfiles --skill tdd-riethmayer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development reduces bugs and guides design by focusing on public interfaces and expected behavior before implementation.

Core Features & Use Cases

  • Encourages vertical iteration: plan, red, green, refactor to build resilient features.
  • Promotes integration-style tests that exercise real code paths via public APIs and prevent brittle internals.
  • Supports deep modular design and a per-cycle checklist to improve testability and maintainability.

Quick Start

Plan a feature, write a failing test, implement the simplest passing code, then refactor.

Frequently Asked Questions about tdd

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

FAQPage Schema
How does test-driven development guide software design and improve test coverage?

Test-driven development guides design by focusing on public interfaces and expected behavior before implementation, reducing bugs and improving test coverage. It enforces a plan-red-green-refactor cycle to drive resilient feature development.

How do I apply TDD to refactoring and fixing bugs across unit and integration tests?

Apply TDD to refactoring and bug fixes by writing a failing test that exercises the public API, implementing the simplest passing code, then refactoring. This cycle supports both unit and integration tests to ensure real code paths remain resilient.

What is the best way to structure tests for deep modularization without brittle internals?

The best way to prevent brittle internals is writing integration-style tests that exercise real code paths via public APIs. This promotes deep modular design and uses a per-cycle checklist to maintain testability throughout the workflow.

When should I use a plan-red-green-refactor cycle for feature development?

Use the plan-red-green-refactor cycle during feature development when you lack test coverage or need to guide design. Plan the feature, write a failing test, implement the simplest passing code, then refactor to improve maintainability.

Does test-driven development work for both unit testing and integration testing workflows?

Yes, test-driven development works for both unit and integration testing workflows. It emphasizes integration-style tests that exercise real code paths via public APIs, preventing brittle internals while supporting deep modular design across software engineering tasks.