event-trace — скилл для Claude Code: таймлайн событий сессии
Собирает все события одной сессии Claude в хронологический таймлайн с пометками провалов, пауз и незакрытых вызовов инструментов.
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill event-trace -a claude-codeЧто делает event-trace
Скилл берёт id сессии и вытягивает её историю из дашборда Agent Monitor. Вместо $ARGUMENTS можно передать latest или last — тогда он сам найдёт самую свежую сессию, а errors заставит его искать последнюю со статусом error. Данные приходят с трёх эндпоинтов: GET /api/sessions?limit=N, GET /api/sessions/:id и GET /api/events?session_id=X.
На выходе — markdown-таблица, где на каждое событие отведена строка: номер, время, дельта от предыдущего, тип события, имя инструмента и краткое описание. Отдельным блоком идут пометки: пауза дольше 30 секунд между событиями, PreToolUse без парного PostToolUse, ошибки из APIError, компакция и отсутствие SessionStart в начале или Stop/SessionEnd в конце. В конце — вердикт одной строкой: чисто, есть разрывы или есть сбои.
Дашборд должен быть запущен, иначе скилл ничего не прочитает и попросит поднять его командой npm start из корня репозитория. Стоимость в отчёте выводится в долларах с четырьмя знаками после точки.
Какие задачи решает
- разобрать, что именно делала сессия шаг за шагом
- найти вызов инструмента, который начался и не завершился
- отловить паузу в работе агента длиннее 30 секунд
- посмотреть текст ошибки API в контексте остальных событий
- проверить, не потерялись ли события начала и конца сессии
Примеры запросов агенту
- Построй таймлайн событий для сессии
latest - Разбери сессию
errorsи покажи, где она сломалась - Сделай отчёт по событиям сессии
abc123с пометками разрывов
Как установить event-trace
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill event-trace -a claude-code2Вручную: положить файлы
~/.claude/skills/event-trace/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/event-trace/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill event-trace -a codex2Вручную: положить файлы
.agents/skills/event-trace/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill event-trace -a cursor2Вручную: положить файлы
.cursor/skills/event-trace/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install hoangsonww/Claude-Code-Agent-Monitor event-trace2Вручную: положить файлы
.github/skills/event-trace/SKILL.md1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill event-trace -a gemini-cli2Командой платформы
gemini skills install https://github.com/hoangsonww/Claude-Code-Agent-Monitor --path plugins/ccam-devtools/skills/event-traceВручную: положить файлы
.devin/skills/event-trace/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill event-trace -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о event-trace
Как установить event-trace в Claude Code?
Выполните npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill event-trace -a claude-code, после чего файл скилла окажется по пути ~/.claude/skills/event-trace/SKILL.md.
Что делает event-trace?
Строит хронологический таймлайн всех событий одной сессии Claude и помечает разрывы, незакрытые вызовы инструментов, ошибки и компакции.
Что нужно для работы event-trace?
Запущенный дашборд Agent Monitor — скилл читает его эндпоинты /api/sessions и /api/events. Если дашборд недоступен, поднимите его командой npm start из корня репозитория.
Исходный текст
SKILL.md · MIT
--- name: event-trace description: > 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. --- # Event Trace Build a chronological, annotated event timeline for a single session. ## Input The user provides: **$ARGUMENTS** This is a session ID. It may also be: - `latest` / `last` — trace the most recently updated session - `errors` — trace the most recent session whose status is `error` ## Data Sources | Endpoint | Returns | |----------|---------| | `GET /api/sessions?limit=N` | session list (used to resolve `latest`/`errors` and the target id) | | `GET /api/sessions/:id` | full session detail (status, model, cwd, started_at, ended_at, cost, nested agents + events) | | `GET /api/events?session_id=X` | the ordered event stream: event_type, tool_name, summary, data, timestamp | ## Report Sections ### 1. Resolve the session If `$ARGUMENTS` is a raw id, use it. If `latest`/`last`, call `GET /api/sessions?limit=1`. If `errors`, call `GET /api/sessions?limit=10&status=error` and pick the newest. Confirm the id resolves via `GET /api/sessions/:id`; if not, report it as missing and stop. ### 2. Session header From `GET /api/sessions/:id`: id, status, model, cwd, started_at → ended_at, total duration, cost (USD to 4 decimals), and counts (events, agents). ### 3. Ordered timeline From `GET /api/events?session_id=X`, list every event in timestamp order. One row per event: `| # | time | Δ since prev | event_type | tool_name | summary |` Cover all event types present: SessionStart, PreToolUse, PostToolUse, Stop, SubagentStop, Compaction, APIError, TurnDuration, Notification, SessionEnd. ### 4. Gap & failure highlights Annotate the timeline: - **Gaps**: any Δ > 30s between consecutive events — mark ⏳ and note the wait. - **Unpaired tool calls**: a PreToolUse with no matching PostToolUse (same tool_name, next in stream) — mark ⚠️ "no completion recorded". - **Failures**: APIError events and PostToolUse whose `summary`/`data` indicates an error — mark ❌ with the error text. - **Compaction**: mark ♻️ and note it resets the visible token baseline. - **Missing bookends**: no SessionStart at the head or no Stop/SessionEnd at the tail of an ended session — mark 🚩. ### 5. Verdict One line: CLEAN, GAPS DETECTED, or FAILURES PRESENT — with the count of each flag type and the single most likely thing to investigate next. ## Output - Markdown timeline table, events in strict timestamp order. - Status glyphs inline: ✅ ok, ❌ error, ⚠️ warning/unpaired, ⏳ gap, ♻️ compaction, 🚩 missing bookend. - Currency in USD to 4 decimals. - Cite only event data returned by the API — do not invent timestamps or summaries. - If the dashboard is unreachable, tell the user to start it with `npm start` from the repo root.
© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor