Debug Session Analysis
Claude Code's official bundled skill /debug analyzes debug logs from current or past sessions to diagnose problems. It automatically detects error patterns, failed tool calls, abnormal token usage, and presents root causes with recommended fixes.
/debugWhen Claude Code behaves unexpectedly? Run /debug to analyze session logs and identify root cause
When token usage is abnormally high? Use /debug to find which tool calls consumed the most tokens
How It Works
Skill Code
Copy and paste into your CLAUDE.md to start using immediately.
How Debug Session Analysis Works
Debug collects session logs and analyzes error patterns, failed tool calls, and abnormal token consumption. It classifies issues by severity and provides root cause analysis with recommended fixes.
When to Use Debug Session Analysis
Most useful when Claude Code behaves unexpectedly, session costs are abnormally high, or specific tools fail repeatedly.
Key Strengths
- Automated session log analysis saves manual debugging time
- Issues classified by severity with priority suggestions
- Past session analysis enables post-mortem diagnostics
- Bundled skill — available instantly with no installation