bugfix-tdd

Write a failing regression test before tracing the root cause and fixing the bug.

25|4|Updated Sep 5, 2010
One-click install
npx skills add https://github.com/divad12/dotfiles --skill bugfix-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bugfix-tdd
Source: https://github.com/divad12/dotfiles/tree/main/.claude/skills/bugfix-tdd
Command: npx skills add https://github.com/divad12/dotfiles --skill bugfix-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides engineers through bug fixes using test-driven development: you capture the symptom with a failing regression test before investigating the root cause, ensuring future changes are guarded.

Core Features & Use Cases

  • Write a failing regression test that describes the observed failure from the user's perspective.
  • Trace root cause through iterative debugging, avoiding fixes that only address the symptom.
  • Maintain the regression test as a permanent guard and verify the fix with the test suite.

Quick Start

Write a failing regression test based on the bug report, then run your test suite to confirm it fails before you begin investigation.

Frequently Asked Questions about bugfix-tdd

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

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

To fix a bug using test-driven development, you first write a failing regression test that captures the observed symptom from the user's perspective, then investigate the root cause and implement the fix to make the test pass.

Why write a failing regression test before investigating a bug?

Writing a failing regression test before investigating a bug ensures you capture the exact failure symptom and create a permanent guard, preventing future changes from reintroducing the same defect across features.

What's the best way to trace the root cause of a software bug?

The best way to trace the root cause of a software bug is through iterative debugging after establishing a failing regression test, which helps you avoid fixes that only address the superficial symptom.

Do I need a specific test framework to start fixing bugs with regression tests?

You need an existing test framework and access to the codebase to start fixing bugs with regression tests, enabling you to write tests, run them to confirm failure, and revalidate your suite after the fix.

When should I not use a test-driven approach for bug fixing?

A test-driven approach for bug fixing is not suitable for software projects lacking regression coverage or a reproducible environment, as it requires a test framework to validate the observed failure.

How do I maintain regression tests after fixing a bug?

To maintain regression tests after fixing a bug, you keep the failing test as a permanent guard in your suite and revalidate it continuously to ensure future changes do not break the resolved functionality.