tdd

Guide software implementation through the Red-Green-Refactor cycle.

2|Updated Mar 21, 2019
One-click install
npx skills add https://github.com/jrollin/dotfiles --skill tdd-jrollin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/jrollin/dotfiles/tree/main/claude/.claude/skills/tdd
Command: npx skills add https://github.com/jrollin/dotfiles --skill tdd-jrollin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a disciplined approach to software development by ensuring that tests are written before implementation code, preventing bugs and improving code quality.

Core Features & Use Cases

  • Test-Driven Development (TDD): Guides users through the Red-Green-Refactor cycle.
  • Bug Prevention: Catches errors early by requiring failing tests before any code is written.
  • Use Case: When starting a new feature, use this Skill to write a failing test that defines the desired behavior, then write the minimal code to make it pass, and finally refactor.

Quick Start

Use the tdd skill to begin implementing a new feature by writing a failing test first.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I start test-driven development for a new software feature?▼

Test-driven development begins by writing a failing test that defines the desired behavior, then writing minimal code to pass that test, and finally refactoring to maintain code quality.

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

The Red-Green-Refactor cycle is a TDD methodology requiring a failing test first, writing production code to make it pass, and then refactoring the implementation to ensure high software engineering standards.

Can I use TDD for bug fixes and refactoring existing code?▼

Yes, TDD is applicable to bug fixes and refactoring to catch errors early and prevent regressions by enforcing a structured workflow that requires failing tests before modifying production code.

Why should I write tests before writing implementation code?▼

Writing tests before implementation code prevents bugs and improves code quality by catching errors early and defining exact desired behavior before any production logic is written.

Does test-driven development help with bug prevention?▼

Bug prevention is a core result of test-driven development, achieved by strictly requiring failing tests before any code is written to catch errors early and prevent regressions.