tdd-workflow

Enforce the RED-GREEN-REFACTOR cycle with 80% test coverage.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures all code changes adhere to Test-Driven Development (TDD) principles, guaranteeing high code quality, comprehensive test coverage, and robust error handling.

Core Features & Use Cases

  • TDD Enforcement: Mandates the RED-GREEN-REFACTOR cycle for all new features, bug fixes, and refactoring.
  • Coverage Standards: Enforces a minimum of 80% code coverage across unit, integration, and E2E tests.
  • Test Double Strategy: Guides the use of real infrastructure over mocks, promoting reliable and maintainable tests.
  • Use Case: When developing a new API endpoint, this Skill ensures a failing test is written first, followed by minimal code to pass, and then refactoring, all while maintaining high test coverage.

Quick Start

Use the tdd-workflow skill to write a new feature following the RED-GREEN-REFACTOR cycle.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I enforce a strict Test-Driven Development workflow for new features and refactoring?▼

To enforce Test-Driven Development, this Skill guides you through the RED-GREEN-REFACTOR cycle, ensuring a failing test is written first, followed by minimal passing code, and then refactoring.

What is the minimum code coverage required for unit and integration testing?▼

The minimum code coverage required for unit, integration, and E2E tests is 80 percent. This standard ensures high code quality and comprehensive test coverage across all modifications.

How do I manage test doubles without relying heavily on mocks?▼

To manage test doubles without relying heavily on mocks, this Skill prioritizes real infrastructure over mocks. This strategy promotes reliable, maintainable tests for robust error handling.

Does Test-Driven Development work for both bug fixes and new API endpoints?▼

Yes, Test-Driven Development works for bug fixes, refactoring, and new API endpoints. The Skill mandates writing a failing test first, then minimal code to pass, and refactoring while maintaining high coverage.

What is the best way to start writing a new feature using the RED-GREEN-REFACTOR cycle?▼

The best way to start writing a new feature is to use the tdd-workflow Skill to initiate the RED-GREEN-REFACTOR cycle, writing a failing test first, then creating minimal code to pass it.

Why prioritize real infrastructure over mocks in integration testing?▼

Prioritizing real infrastructure over mocks in integration testing ensures reliable and maintainable tests. This approach validates actual behavior, guaranteeing robust error handling and high code quality.