bug-fix

Diagnose and fix bugs with regression tests and automated review gates.

189|25|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/sd0xdev/sd0x-harness --skill bug-fix-sd0xdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bug-fix
Source: https://github.com/sd0xdev/sd0x-harness/tree/main/skills/bug-fix
Command: npx skills add https://github.com/sd0xdev/sd0x-harness --skill bug-fix-sd0xdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Fixing bugs without a structured process often leads to incomplete root-cause analysis, missing regression tests, and unreviewed changes slipping into the codebase. This Skill enforces a disciplined investigate-fix-test-review workflow so every bug fix is verified and gated before completion. ## Core Features & Use Cases - Structured Investigation: Locates root causes via GitHub issues, error message grep, and git history, then documents problem location, cause, and impact scope. - Mandatory Regression Tests: Requires tests at the appropriate level (unit, integration, or E2E) based on the bug type, following project testing conventions. - Automated Review Gates: Runs test adequacy review and code review in an auto-loop until passing, then enforces a precommit gate without ever committing directly. - Use Case: When a user reports "API returning 500 error", the Skill greps the error, fixes the code, writes an integration test, runs verification and review loops, and outputs a bug fix report. ## Quick Start Ask the agent to fix a specific bug or issue, for example: fix issue #123 where the calculation returns incorrect totals.

Frequently Asked Questions about bug-fix

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

FAQPage Schema
How do I fix a bug with regression tests in an AI coding workflow?

Invoke the bug-fix workflow with the issue or error message. It investigates the root cause, applies a minimal fix, writes a regression test at the appropriate level (unit, integration, or E2E), then runs verification and review gates before reporting completion.

What test level is required for different bug types?

Logic errors require unit tests, service issues require unit tests with integration recommended, API issues require integration tests, cross-service data flow bugs require integration tests, and user flow bugs require E2E tests.

Does the bug-fix workflow commit changes automatically?

No, the workflow explicitly prohibits git add, commit, and push. It stops at the precommit quality gate, and the user must separately invoke a commit command such as /smart-commit --execute to commit the fix.

When should I not use the bug-fix workflow?

Do not use it for new feature development, which belongs in a feature-dev workflow, or for simply understanding code, which fits a code-explore workflow. Pure test-only tasks without code changes should go directly to a test review command.

What happens if the code review finds issues after the fix?

The workflow enters an auto-loop: issues are fixed, tests are re-run, and the review repeats until it passes. If code changes after test approval, verification and test adequacy review must be re-run before the precommit gate.