Agent skill
debug-error
Use when the user has an error, bug, stack trace, failing test, or unexpected behavior to diagnose.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/debug-error
SKILL.md
Debug and fix: $ARGUMENTS
Steps
-
Parse the error
- Identify error type (runtime, compile, type, network, etc.)
- Extract file paths and line numbers from stack trace
- Identify the error message
-
Find the source
- Read the file(s) mentioned in the stack trace
- If no stack trace, Grep for the error message in codebase
- Read surrounding code to understand context
-
Trace the root cause
- Follow the call chain backwards
- Check recent git changes that might have caused it:
git log --oneline -10 git diff HEAD~3 - Look for common causes: null/undefined, wrong types, missing imports, race conditions
-
Implement the fix
- Fix the root cause, not just the symptom
- Handle edge cases that led to the error
-
Verify
- Run the failing scenario
- Run related tests
- Check for similar patterns elsewhere:
grep -r "similar_pattern" src/
-
Report
## Bug Fix Report ### Error [original error] ### Root Cause [why it happened] ### Fix [what was changed and why] ### Files Modified - [file] — [change] ### Verified - [how it was tested]
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?