Tooluck logoTooluck
SKILL.md

event-trace

Agent skill fromhoangsonww/Claude-Code-Agent-Monitor

Trace the full event chain for one Claude Code session into an ordered timeline of every event type with tool_name and summary, highlighting gaps, out-of-order events, and failures. Reads /api/events?session_id= and /api/sessions/:id from the Agent Monitor dashboard. Use when debugging what a session actually did, step by step.

How to install event-trace

install event-trace
# 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/event-trace/

# into

~/.claude/skills/event-trace/ (all projects)

.claude/skills/event-trace/ (one project)

plugins/ccam-devtools/skills/event-trace/SKILL.md

MITFull file
1# Event Trace
2
3Build a chronological, annotated event timeline for a single session.
4
5## Input
6
7The user provides: **$ARGUMENTS**
8
9This is a session ID. It may also be:
10- `latest` / `last` — trace the most recently updated session
11- `errors` — trace the most recent session whose status is `error`
12
13## Data Sources
14
15| Endpoint | Returns |
16|----------|---------|
17| `GET /api/sessions?limit=N` | session list (used to resolve `latest`/`errors` and the target id) |
18| `GET /api/sessions/:id` | full session detail (status, model, cwd, started_at, ended_at, cost, nested agents + events) |
19| `GET /api/events?session_id=X` | the ordered event stream: event_type, tool_name, summary, data, timestamp |
20
21## Report Sections
22
23### 1. Resolve the session
24If `$ARGUMENTS` is a raw id, use it. If `latest`/`last`, call
25`GET /api/sessions?limit=1`. If `errors`, call
26`GET /api/sessions?limit=10&status=error` and pick the newest. Confirm the id
27resolves via `GET /api/sessions/:id`; if not, report it as missing and stop.
28
29### 2. Session header
30From `GET /api/sessions/:id`: id, status, model, cwd, started_at → ended_at,
31total duration, cost (USD to 4 decimals), and counts (events, agents).
32
33### 3. Ordered timeline
34From `GET /api/events?session_id=X`, list every event in timestamp order. One row
35per event:
36
37`| # | time | Δ since prev | event_type | tool_name | summary |`
38
39Cover all event types present: SessionStart, PreToolUse, PostToolUse, Stop,
40…

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