# Bug Fix

> Diagnose and fix a defect using reproduction-first investigation and regression testing

- Skill: `iabuelruzz/bug-fix` (Agent Skill)
- Install (CLI): `npx skillmds@latest add iabuelruzz/bug-fix`
- Raw SKILL.md: https://api.skillmd.com/api/skills/iabuelruzz/bug-fix/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: IAbuElRuzz (https://skillmd.com/u/iabuelruzz)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/iabuelruzz/bug-fix

---


# Bug Fix Workflow

Bug report:

$ARGUMENTS

## Required process

1. Do not modify code until the failure is understood.
2. Use a research subagent to trace the affected execution path.
3. Reproduce the bug where practical.
4. Identify the root cause, not only the visible symptom.
5. Create or update a regression test that fails before the fix.
6. Plan the smallest safe correction.
7. Delegate implementation to a Sonnet subagent.
8. Run the regression test and relevant broader tests.
9. Use an Opus reviewer when the fix affects security, concurrency,
   persistence, shared infrastructure, or public APIs.
10. Report the root cause, fix, and validation performed.

Avoid unrelated refactoring.
