Fix

From TheBushidoCollective/han · View interactive version

Fix is an AI agent skill from the GitHub repository TheBushidoCollective/han. Debug and fix bugs, errors, or unexpected behavior

How to use this skill

Skill file

fix

Name

han-core:fix - Debug and fix bugs, errors, or unexpected behavior

Synopsis

/fix [arguments]

Description

Debug and fix bugs, errors, or unexpected behavior

Implementation

Investigate, diagnose, and fix bugs or unexpected behavior in the codebase.

Process

Follow this process to fix bugs:

  1. Reproduce the issue: Confirm the bug exists and understand when it happens
  2. Gather information: Error messages, logs, stack traces, user reports
  3. Form hypothesis: What might be causing the issue?
  4. Investigate: Use debugging tools, add logging, trace execution
  5. Identify root cause: Find the actual source of the problem
  6. Implement fix: Change code to resolve the issue
  7. Verify fix: Confirm the bug is resolved and no new issues introduced
  8. Add regression test: Prevent the bug from returning

Bug Fixing Principles

Understand before fixing:

Fix properly:

Verify thoroughly:

Examples

When the user says:

Debugging Techniques

Add logging:

console.log('Value at checkpoint:', value)
logger.debug('Processing item', { id: item.id, status: item.status })

Use debugger:

debugger;  // Browser will pause here

Binary search:

Compare working vs broken:

Output Format

After fixing:

## Bug Fix: [Brief description]

### Issue
[What was broken and how it manifested]

### Root Cause
[Why the bug existed]

### Fix
[What was changed and why it fixes the issue]

### Verification
[Evidence the fix works - use proof-of-work skill]
- Original issue no longer reproduces
- Tests pass (include test output)
- Related scenarios still work

### Prevention
[What test was added to prevent regression]

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.