tdd-bug-fix

Reproduce bugs with failing tests and guide a minimal TDD fix workflow.

Updated Mar 1, 2026
One-click install
npx skills add https://github.com/mazicimert/RunDom --skill tdd-bug-fix-mazicimert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-bug-fix
Source: https://github.com/mazicimert/RunDom/tree/main/.claude/skills/testing/tdd-bug-fix
Command: npx skills add https://github.com/mazicimert/RunDom --skill tdd-bug-fix-mazicimert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a disciplined workflow to reproduce defects with tests, then apply minimal, regression-safe fixes to prevent reintroduction of bugs, especially when AI is involved. It guides through red-green-refactor, ensuring fixes are verifiable and maintainable.

Core Features & Use Cases

  • Reproduce defects with structured tests to lock in the bug behavior.
  • Apply minimal, targeted changes and verify through the test suite to prevent regressions.
  • Use in scenarios where a defect is reported and a regression-safe fix is required, with a test-as-proof workflow.

Quick Start

Use the skill to reproduce a failing test, then write a minimal fix and run the test suite to verify.

Frequently Asked Questions about tdd-bug-fix

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

FAQPage Schema
How do I fix a bug using TDD without introducing regressions?

To fix a bug using TDD without regressions, first write a failing test that reproduces the reported defect. Then apply a minimal code change to make the test pass, and run the full test suite to verify no other behavior broke.

What is the red-green-refactor workflow for bug fixing?

The red-green-refactor workflow for bug fixing involves writing a failing test to lock in the bug behavior, implementing a minimal targeted fix to turn the test green, and refactoring safely while confirming the test suite still passes.

How can I reproduce a defect with a unit test before fixing it?

You reproduce a defect with a unit test by creating a focused failing test that captures the exact incorrect behavior reported. This test acts as proof of the bug and guards the fix by ensuring the test passes after the code change.

Can I use this TDD bug fix workflow in a regression-sensitive environment?

Yes, you can use this TDD bug fix workflow in a regression-sensitive environment. It enforces a minimal-change principle by adding a focused test and verifying the entire test suite, ensuring your targeted fix does not reintroduce previous bugs.

When should I use a test-driven approach to fix software defects?

You should use a test-driven approach to fix software defects when a regression-safe fix is required and you need verifiable proof. It is ideal for defect reports where a failing test can guard the fix and prevent future reintroduction of the bug.

Does fixing bugs with TDD require any specific testing frameworks?

Fixing bugs with TDD does not require specific testing frameworks. The workflow focuses on adding a focused unit test to reproduce the defect and running your existing test suite to confirm the fix, adapting to your current quality assurance setup.