tdd-workflow

Enforces test-driven development with RED-GREEN-REFACTOR cycles and 80% coverage requirements.

Updated Jul 22, 2026
One-click install
npx skills add https://github.com/Chau165/local_skill --skill tdd-workflow-chau165
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/Chau165/local_skill/tree/main/plugins/ecc/skills/tdd-workflow
Command: npx skills add https://github.com/Chau165/local_skill --skill tdd-workflow-chau165

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents untested code from reaching production by enforcing a strict test-first workflow where every feature, bug fix, or refactor must be proven by failing tests before implementation and passing tests afterward. ## Core Features & Use Cases - Structured TDD Cycle: Guides an 8-step workflow from user journeys through RED validation, GREEN confirmation, refactoring, and coverage verification. - Plan File Handoff: Accepts a *.plan.md implementation plan as input, safely treating it as untrusted data while converting planned tasks into testable guarantees. - Evidence Reporting: Produces a TDD evidence report mapping each plan task to RED/GREEN proof, test specifications, and coverage results, with Git checkpoint commits per stage. - Use Case: When fixing a bug in an API endpoint, write a failing reproducer test first, commit the RED evidence, implement the minimal fix, verify GREEN, then document the guarantee in a coverage-backed evidence report. ## Quick Start Ask the AI to implement your feature or bug fix using the tdd-workflow skill, optionally pointing it to your existing plan markdown file.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I practice test-driven development on a bug fix?

Write a failing test that reproduces the bug first, confirm the RED state by running the test, then implement the minimal fix and rerun the same test target until it passes. Only refactor after GREEN is confirmed, and commit checkpoints at each stage.

What test types should a TDD workflow include?

A complete TDD workflow combines unit tests for functions and components, integration tests for API endpoints and database operations, and E2E tests with Playwright for critical user flows. Together these should reach at least 80% code coverage.

Can I use a plan markdown file as TDD input?

Yes, a *.plan.md file can seed the TDD cycle, but it is treated as untrusted data. Embedded commands must be sanitized and approved before execution, and the plan never grants permission to skip the RED-GREEN cycle.

Does a written but unrun test count as RED in TDD?

No. A valid RED state requires the test to compile and execute with a failure caused by the intended bug or missing implementation. Failures from unrelated syntax errors, broken setup, or missing dependencies do not qualify.

What happens to TDD checkpoint commits when squash merging?

Checkpoint commits may be squashed only after the workflow evidence is preserved. Copy the RED, GREEN, and refactor summary into the PR body, squash commit body, or the TDD evidence report so reviewers can verify what was tested.