tdd

Apply Kent Beck's Red-Green-Refactor cycle to drive feature implementation.

6|Updated Dec 28, 2023
One-click install
npx skills add https://github.com/staticWagomU/dotfiles --skill tdd-staticwagomu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/staticWagomU/dotfiles/tree/main/config/claude/skills/tdd
Command: npx skills add https://github.com/staticWagomU/dotfiles --skill tdd-staticwagomu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kent Beck's Test-Driven Development (TDD) provides a disciplined approach to writing software by ensuring tests guide design. This skill helps teams reduce bugs, improve maintainability, and build confidence before implementing features.

Core Features & Use Cases

  • Red-Green-Refactor workflow: follow a three-phase cycle to write tests, implement just enough code, and refactor safely.
  • Small, verifiable commits: commit after each phase to track progress and preserve history.
  • Quality-first design: emphasizes reducing duplication and clear intent in code changes.
  • Use Cases: integrating TDD into new features, bug fixes, or refactoring sessions to ensure behavior remains intact.

Quick Start

Begin a TDD cycle by writing a single failing test, implement just enough code to pass, and then refactor for clarity.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I apply test-driven development to guide feature implementation?

Test-driven development guides feature implementation by applying Kent Beck's Red-Green-Refactor cycle. You write a failing test, implement just enough code to pass, and then refactor to reduce duplication and maintain clear intent.

What is the Red-Green-Refactor cycle in TDD?

The Red-Green-Refactor cycle is a three-phase TDD workflow. You write a failing test, implement minimal code to make it pass, and then refactor safely for clarity while preserving behavior.

Can I use TDD for bug fixes and refactoring in small to medium codebases?

Yes, TDD works for bug fixes and refactoring in small to medium codebases. It enforces a structured workflow with clear phase transitions to ensure behavior remains intact during changes.

When should I commit code when practicing test-driven development?

In test-driven development, you should make small, verifiable commits after each phase of the Red-Green-Refactor cycle. This tracks progress and preserves history while ensuring quality-first design.

Why does test-driven development emphasize reducing duplication?

Test-driven development emphasizes reducing duplication to enforce quality-first design. Refactoring safely after passing tests ensures clear intent and improves overall maintainability without altering behavior.

Does test-driven development require any specific testing frameworks or dependencies?

No specific testing frameworks or dependencies are required to start test-driven development. The workflow applies universally to guide feature implementation and reduce bugs across software projects.