tdd

Enforces one-failure-at-a-time Test-Driven Development with Red-Green-Refactor cycles.

168|22|Updated Oct 13, 2025
One-click install
npx skills add https://github.com/wbern/claude-instructions --skill tdd-wbern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/wbern/claude-instructions/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/wbern/claude-instructions --skill tdd-wbern

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reminds the AI agent to follow Test-Driven Development principles and continue the conversation accordingly, ensuring responses are guided by tests rather than speculation.

Core Features & Use Cases

  • Red-Green-Refactor guidance: prompts to create a single failing test, implement minimal code to pass, and refactor as needed.
  • Process discipline safeguards: enforces one new test at a time, discourages over-implementation, and prevents premature coding.
  • Use Case: during coding sessions, the AI is guided to avoid exposing internal planning files like plan.md and to consider Spike Phase when exploration is necessary.

Quick Start

Start a TDD-guided session by asking for a failing test, implementing the minimal code to pass it, and then refactoring as needed.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I keep AI coding prompts aligned with test-driven development?

To keep AI coding prompts aligned with test-driven development, you need a guidance mechanism that enforces the Red-Green-Refactor cycle, ensuring the AI writes one failing test at a time before implementing minimal code.

What is the red-green-refactor workflow for AI-assisted coding sessions?

The red-green-refactor workflow for AI-assisted coding sessions involves creating a single failing test, implementing the minimal code required to pass that test, and then refactoring the implementation while maintaining test integrity.

How do I prevent AI from over-implementing features during TDD sessions?

To prevent AI from over-implementing features during TDD sessions, apply process discipline safeguards that enforce one new test at a time, discourage premature coding, and avoid exposing internal planning files like plan.md.

Can I use a Spike Phase for exploration within a strict TDD workflow?

Yes, you can use a Spike Phase for exploration within a strict TDD workflow. When exploration is necessary, the AI is guided to consider a Spike Phase before returning to the standard test-driven development cycle.

Does test-driven development guidance work for interactive debugging tasks?

Yes, test-driven development guidance works for interactive debugging tasks. It applies to feature development sessions, coding tutorials, and debugging by ensuring responses are driven by tests rather than speculation.