tdd-workflow

Automate the RED-GREEN-REFACTOR cycle for bug fixes and feature development.

Updated Jan 18, 2026
One-click install
npx skills add https://github.com/rom-orlovich/agents-system --skill tdd-workflow-rom-orlovich
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/rom-orlovich/agents-system/tree/main/claude-code-cli/agents/executor-agent/skills/tdd-workflow
Command: npx skills add https://github.com/rom-orlovich/agents-system --skill tdd-workflow-rom-orlovich

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers to implement changes using a disciplined TDD loop (RED-GREEN-REFACTOR), ensuring tests drive design and prevent regressions.

Core Features & Use Cases

  • Enforce the RED-GREEN-REFACTOR cycle for all bug fixes and feature work.
  • Provide phase-by-phase guidance with practical examples and recommended practices.
  • Help teams maintain test coverage and incremental improvements during refactors.

Quick Start

Begin by writing a failing test to reproduce the desired behavior, run the test to observe the failure, implement the minimal code to make the test pass, run all tests again, and then perform optional refactoring followed by version-control commits.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I automate the RED-GREEN-REFACTOR cycle for bug fixes and feature development?

You can automate the RED-GREEN-REFACTOR cycle by enforcing a workflow that starts with a failing test, implements the minimal code to pass it, and validates changes through green tests before refactoring. This prevents regressions and drives design.

What is the best way to start writing failing tests first for new features?

The best way to start writing failing tests first is to reproduce the desired behavior in a test, run it to observe the failure, implement the minimal code to make it pass, and then run all tests again to validate.

Does test-driven development work with any codebase that has automated tests?

Yes, test-driven development works with any codebase that has automated tests and project-appropriate tooling. It applies the RED-GREEN-REFACTOR loop to guide both bug fixes and feature development while maintaining test coverage.

How do I maintain test coverage during incremental code refactoring?

You maintain test coverage during incremental code refactoring by ensuring all tests remain green after implementing the minimal passing fixes. The automated TDD workflow validates changes continuously to prevent regressions during improvements.

Why should I use TDD for preventing regressions in software engineering?

You should use TDD for preventing regressions because it disciplines developers to write failing tests first and implement minimal passing fixes. This ensures tests drive design and validate changes continuously throughout the development cycle.