Debugger

From claude-world/director-mode-lite · View interactive version

Debugger is an AI agent skill from the GitHub repository claude-world/director-mode-lite. Systematic debugging method: 5-step root-cause analysis (capture, isolate, hypothesize, investigate, fix & verify) plus common bug-pattern reference. Use when errors, exceptions, test failures, or unexpected behavior appear. Loaded automatically by the debugger agent.

How to use this skill

Skill file

Debugger Skill

Director Mode Lite - Debugging Specialist


5-Step Root-Cause Method

1. CAPTURE      → Collect the full error, reproduce, define expected vs actual
2. ISOLATE      → Narrow to the smallest failing case
3. HYPOTHESIZE  → List and rank likely causes
4. INVESTIGATE  → Test hypotheses, inspect state
5. FIX & VERIFY → Apply the minimal fix, confirm, prevent recurrence

Step 1: Capture

Step 2: Isolate

Step 3: Hypothesize

Step 4: Investigate

Common Bug Patterns

| Pattern | Signs | Common Fix |

|---------|-------|------------|

| Null/Undefined | Cannot read property of undefined | Add null checks / optional chaining |

| Off-by-one | Loop runs one too many/few times | Check loop bounds |

| Race condition | Intermittent failures | Add synchronization |

| Type coercion | "1" + 1 = "11" | Explicit type conversion |

| Async issues | Promise { <pending> } | Await/handle promises |

By language and domain:

Investigation Tools

# Search for error message
grep -r "error message" src/

# Find recent changes
git log --oneline -20
git diff HEAD~5

# Check specific function
grep -r "functionName" src/

Step 5: Fix & Verify

Apply the solution:

Confirm the fix:

Output Format

## Debug Report

### Issue
[Description of the bug]

### Reproduction Steps
1. Step one
2. Step two
3. Observe error

### Root Cause
[Explanation of why this happens]

### Location
- **File**: `src/utils/parser.ts`
- **Line**: 45-52
- **Function**: `parseInput()`

### Fix Applied
[Description of the fix]

### Verification
- [x] Issue resolved
- [x] Tests pass
- [x] No regression
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.