fix-bug

Reproduce software bugs with failing tests, then fix and re-verify.

13|3|Updated Nov 15, 2025
One-click install
npx skills add https://github.com/sddevelopment-be/quickstart_agent-augmented-development --skill fix-bug-sddevelopment-be
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-bug
Source: https://github.com/sddevelopment-be/quickstart_agent-augmented-development/tree/main/.claude/skills/fix-bug
Command: npx skills add https://github.com/sddevelopment-be/quickstart_agent-augmented-development --skill fix-bug-sddevelopment-be

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers to reproduce a bug with a failing test before modifying code, ensuring changes are justified and verifiable, reducing regression risk.

Core Features & Use Cases

  • Test-first workflow: Write a failing test to reproduce the bug, then implement the fix and re-run tests.
  • Phase-driven process: Structure with Phase 1 (reproduce), Phase 2 (fix), Phase 3 (validate and commit).
  • Quality guardrails: Keeps tests in the suite for regression prevention and supports clear commit messages.

Quick Start

Execute a failing test that reproduces the bug, implement the minimal fix, and run all tests to confirm regression-free behavior.

Frequently Asked Questions about fix-bug

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

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

Test-driven bug fixing involves writing a failing test to reproduce the defect, implementing a minimal code fix, and re-running tests to verify the resolution. This workflow justifies changes and prevents future regressions.

Why should I write a failing test before fixing a bug?

Writing a failing test before fixing a bug demonstrates the defect exists and provides a verifiable target for your changes. Once the fix is implemented, passing this test confirms the issue is resolved without introducing regressions.

What is the best way to prevent software regressions when modifying code?

The best way to prevent regressions is using a test-first workflow where you reproduce bugs with failing tests, implement minimal fixes, and keep the tests in your suite. Clear commit messages and phase gating further guard against defects.

Can I use this test-first bug fix workflow for integration testing?

Yes, this test-first bug fix workflow applies across unit, integration, and end-to-end testing scenarios. It guides you through reproducing defects, applying minimal fixes, and validating behavior to ensure software quality across all test levels.

How do I structure git commits when fixing bugs with tests?

Structure git commits using a phase-driven process: Phase 1 reproduces the bug, Phase 2 implements the fix, and Phase 3 validates and commits. This requires clear commit messages to document changes and guard against regressions.