Tooluck logoTooluck
SKILL.md

session-debug

Agent skill fromhoangsonww/Claude-Code-Agent-Monitor

Debug a specific session by inspecting its full event chain (PreToolUse, PostToolUse, Stop, SubagentStop, Compaction, APIError, TurnDuration, Notification events), agent hierarchy (recursive parent/child tree with subagent_type and depth), token usage with compaction baselines, workflow intelligence data (orchestration DAG, error propagation by depth), and session metadata (thinking_blocks, turn_count, total_turn_duration_ms).

How to install session-debug

install session-debug
# install the Claude-Code-Agent-Monitor pack with the skills CLI
npx skills add hoangsonww/Claude-Code-Agent-Monitor

# or add only this skill to Claude Code: copy the folder

plugins/ccam-devtools/skills/session-debug/

# into

~/.claude/skills/session-debug/ (all projects)

.claude/skills/session-debug/ (one project)

plugins/ccam-devtools/skills/session-debug/SKILL.md

MITFull file
1# Session Debug
2
3Debug and inspect a Claude Code session from Agent Monitor data.
4
5## Input
6
7The user provides: **$ARGUMENTS**
8
9This may be:
10- A session ID to debug
11- "latest" or "last" for the most recent session
12- "errors" to find and debug the most recent errored session
13
14## Procedure
15
161. **Identify the target session**:
17 - If session ID given: `GET /api/sessions/{id}` from `http://localhost:4820`
18 - If "latest": `GET /api/sessions?limit=1` (default sort: most recently updated first)
19 - If "errors": `GET /api/sessions?limit=10&status=error`
20
212. **Collect full session data**:
22 - Session metadata: status, model, cwd, timestamps, duration
23 - Events: `GET /api/events?session_id={session_id}` — full event timeline
24 - Agents: `GET /api/agents?session_id={session_id}` — all agents in session
25 - Cost: `GET /api/pricing/cost/{session_id}`
26
273. **Analyze the session**:
28
29 ### Session Lifecycle
30 - Start time → first event → last event → end time
31 - Status transitions (active → working → completed/error)
32 - Total duration and active-vs-idle time
33
34 ### Event Chain Analysis
35 - Chronological event list with timestamps and durations
36 - Identify the **critical path** (longest chain of dependent events)
37 - Flag events that took unusually long
38 - Highlight error events with full error context
39
40 ### Agent Inspection
41 - List all agents: type, task, status, duration
42 - Subagent tree visualization (parent → children)
43…

Excerpt shown under the repository's MIT license.

More skills in Claude-Code-Agent-Monitor

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates