tdd-bugfix

Reproduce bugs with failing tests and verify fixes via the full test suite.

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/nobelk/claude-tools --skill tdd-bugfix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-bugfix
Source: https://github.com/nobelk/claude-tools/tree/main/skills/tdd-bugfix
Command: npx skills add https://github.com/nobelk/claude-tools --skill tdd-bugfix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bug fixes are risky without a disciplined approach. This skill enforces a test-driven workflow that ensures bugs are reproduced with failing tests, fixes are minimal and project-conforming, and regressions are caught by running the full test suite.

Core Features & Use Cases

  • Reproduce bugs with targeted failing tests that mirror user-reported issues.
  • Write minimal, project-conformant code changes validated by the existing test suite.
  • Validate fixes by re-running the failing tests and then the full suite to prevent regressions.
  • Adaptable to any language or framework as long as the project has established conventions for tests and mocks.

Quick Start

Begin by reproducing the bug with a failing test, then implement a minimal fix following the project's conventions, and finally run the full test suite to verify there are no regressions.

Frequently Asked Questions about tdd-bugfix

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

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

To fix bugs using test-driven development, you reproduce the issue with a failing test, implement a minimal code change that conforms to existing project conventions, and run the full test suite to verify the fix without causing regressions.

What is the best way to reproduce a bug before writing a fix?

The best way to reproduce a bug is to write a targeted failing unit test that accurately mirrors the user-reported issue, ensuring you validate the test failure before attempting any code changes.

How do you ensure a bug fix does not introduce regressions in an existing codebase?

To prevent regressions, you run the full test suite after implementing a fix and validating the previously failing test, ensuring the new code integrates safely with existing project scaffolding and test patterns.

Can I apply a test-driven bugfix workflow to any programming language or framework?

You can apply this test-driven bugfix workflow to any language or framework, provided the project has an established build process and existing conventions for unit tests and mocks.

How do I maintain coding conventions when applying a test-driven bugfix?

Maintaining coding conventions requires discovering existing project scaffolding, test patterns, and styles, then writing minimal code changes that strictly adhere to these discovered rules during the bugfix process.

Why should I write a failing test before implementing a bug fix?

Writing a failing test before a bug fix ensures the reported issue is accurately reproduced and provides a measurable validation target, guaranteeing that your subsequent code changes directly resolve the specific defect.