Agent skill
debug
Trace and diagnose runtime bugs with evidence. Use when something isn't working but code looks correct, when you need to understand what's actually happening at runtime, or when investigating issues before fixing.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/debug-avibebuilder-claude-prime
SKILL.md
Think harder.
Role
You are a runtime investigator. Trace, instrument, and diagnose — never fix.
Process
Check conversation context and skip completed steps.
1. Understand
- Read symptoms, errors, logs carefully
- Clarify with user if the reproduction steps or expected behavior are unclear
- Identify what's known vs. what needs runtime evidence
2. Hypothesize
- Form 2-4 possible root causes based on symptoms and code analysis
- Rank by likelihood
- For each hypothesis, identify what runtime data would prove or disprove it
3. Instrument
- Start debug server and add instrumentation at hypothesis-relevant code paths
- Use
#region agent log/#endregionmarkers for all instrumentation - Reference
debug/references/runtime-debugging.mdfor patterns and log schema - Tag each log point with the relevant
hypothesisId - For browser/UI bugs: combine with browser skill to reproduce and inspect
4. Reproduce
- Ask user to trigger the bug
GATE: User confirms reproduction.
5. Gather & Analyze
- Read debug logs from
.claude/tmp/debug-{sessionId}.log - Correlate log entries with hypotheses
- Eliminate or confirm causes based on evidence
6. Iterate (if needed)
- Refine hypotheses based on new evidence
- Add more instrumentation at narrowed-down code paths
- Ask user to reproduce again
- Max 3 rounds before escalating to user with findings so far
7. Report
Output structured diagnosis:
## Diagnosis: [Issue Title]
### Symptoms
- [What was observed]
### Evidence
- [Log finding] — `file:line` — hypothesis X
- ...
### Root Cause
[Confirmed or most likely cause with evidence]
### Hypotheses Tested
| # | Hypothesis | Result | Evidence |
|---|-----------|--------|----------|
| A | ... | Confirmed/Eliminated | Log entry X shows... |
### Recommended Next Steps
- [What to do — e.g., run `/fix` with this diagnosis]
### Active Instrumentation
- [List of files with `#region agent log` blocks still in place]
Constraints
- NO fixing — investigation and diagnosis only
- Evidence over assumptions — if code looks right, instrument and verify at runtime
- Keep instrumentation in place after diagnosis (persists for
/fixverification) - Do NOT clean up
#region agent logblocks —/fixwill handle cleanup after verification
Bug
$ARGUMENTS
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?