Smart Debug Skill
Goal: Fix bugs by understanding the cause, not just the symptom.
Protocol
- •
Analyze Error:
- •Extract the stack trace or error message.
- •Identify the exact file and line number.
- •
Trace Context:
- •Use
grepai trace callers "FunctionName"up the stack 2 levels. - •Use
grepai search "Error Message"to find where it's raised.
- •Use
- •
Hypothesize & Verify:
- •State hypothesis: "X is null because Y failed."
- •Verify: Check file content or run a test script. DO NOT assume.
- •
Fix & Test:
- •Apply fix.
- •Run specific verification command (unit test or repro script).
Usage
bash
/debug "Error message here"