Use when fixing a bug, defect, issue, or unexpected behavior. Follows Goal-Driven Execution: reproduce with a test, implement the fix, verify no regressions.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Bugfix?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/fco3lho-bugfix)
---
name: bugfix
description: "Use when fixing a bug, defect, issue, or unexpected behavior. Follows Goal-Driven Execution: reproduce with a test, implement the fix, verify no regressions."
---
# Bug Fix Workflow
Follow these steps in order. Do not skip to implementation before reproducing the bug.
## Step 1: Reproduce
Write a test that reproduces the bug:
```
function test_<describes_the_bug>():
// Arrange
input = <value_that_triggers_the_bug>
expected = <correct_output>
// Act
result = function_under_test(input)
// Assert
assert result == expected
```
**Verify:** The test fails with the expected error.
## Step 2: Implement the Fix
Change the minimum code necessary. Follow Surgical Changes:
- Touch only the lines causing the bug
- Do not improve adjacent code, styles, or comments
- Match existing project style
## Step 3: Verify
- The reproduction test passes
- All existing tests still pass (no regressions)
## Step 4: Edge Cases
- Check null/empty/boundary cases related to this bug
- Add tests for those too