api-error-report — скилл для Claude Code: разбор ошибок API
Разбирает события APIError из Agent Monitor: сколько их, в каких сессиях и моделях, и что скорее всего стало причиной.
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill api-error-report -a claude-codeЧто делает api-error-report
Скилл читает данные Agent Monitor через локальный API и собирает отчёт по ошибкам APIError. Считает их долю от общего числа событий, строит динамику по дням и отмечает дни, где частота выше средней по выбранному окну.
Дальше группировка: по сессиям и по моделям, чтобы видеть, где ошибок больше всего. Каждое событие классифицируется по причине — лимит запросов, перегрузка (529) или давление контекстного окна; если по summary и data понять нельзя, ошибка попадает в «Other». В конце — таблицы в Markdown, проценты с двумя знаками после точки, суммы в USD с четырьмя.
Скилл только читает. Если curl не достаёт до http://localhost:4820, значит дашборд не запущен — поднимите его командой npm start из корня репозитория. Причины скилл не выдумывает: без подтверждения в payload он не назовёт виновника.
Какие задачи решает
- понять, почему посыпались запросы к API
- найти сессию, в которой копится больше всего ошибок
- отличить лимит запросов от перегрузки и переполнения контекста
- показать динамику ошибок за нужное окно
- собрать отчёт по ошибкам конкретной модели
Примеры запросов агенту
- Сделай отчёт по всем ошибкам API за последние 7 дней
- Разбери ошибки в сессии
abc123и скажи, что чаще всего ломается - Отчёт по ошибкам API с фильтром по причине «context»
Как установить api-error-report
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill api-error-report -a claude-code2Вручную: положить файлы
~/.claude/skills/api-error-report/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/api-error-report/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill api-error-report -a codex2Вручную: положить файлы
.agents/skills/api-error-report/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill api-error-report -a cursor2Вручную: положить файлы
.cursor/skills/api-error-report/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install hoangsonww/Claude-Code-Agent-Monitor api-error-report2Вручную: положить файлы
.github/skills/api-error-report/SKILL.md1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill api-error-report -a gemini-cli2Командой платформы
gemini skills install https://github.com/hoangsonww/Claude-Code-Agent-Monitor --path plugins/ccam-quality/skills/api-error-reportВручную: положить файлы
.devin/skills/api-error-report/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill api-error-report -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о api-error-report
Как установить api-error-report в Claude Code?
Выполните npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill api-error-report -a claude-code, после чего скилл появится в ~/.claude/skills/api-error-report/SKILL.md.
Что делает api-error-report?
Собирает отчёт по событиям APIError: объём и динамику, затронутые сессии и модели, предполагаемую причину каждого события и хронологию последних ошибок.
Что нужно, чтобы скилл заработал?
Запущенный дашборд Agent Monitor: он отдаёт данные на http://localhost:4820. Если curl туда не доходит, запустите npm start из корня репозитория.
Исходный текст
SKILL.md · MIT
--- name: api-error-report description: > Produce a detailed report on APIError events from Agent Monitor data — counts over time, which sessions and models are affected, and the likely root cause (rate limits, overload/529, or context-window pressure) inferred from each event's summary and data payload. Use when API errors spike or when you need to explain why requests are failing. --- # API Error Report Drill into `APIError` events: how many, when, where, and most likely why. ## Input The user provides: **$ARGUMENTS** This may be: - empty or "all" — report on every APIError in the recent window (default) - a session ID — report APIErrors for that one session only - a window like "today" or "last 7d" — restrict the time range - a cause filter: "rate-limit", "overload", or "context" ## Data Sources | Endpoint | Returns | |----------|---------| | `GET /api/analytics` | `event_types` (total `APIError` count), `daily_events` (365d) — APIError volume and trend over time | | `GET /api/events?session_id=X` | Per-session event stream — each `APIError` carries `summary`, `data`, and `timestamp` used to classify the cause | | `GET /api/sessions?limit=N` | Sessions with `id`, `model`, `started_at` — attribute each error to a model and place it on the timeline | ## Report Sections ### 1. Volume & Trend From `GET /api/analytics`: total `APIError` count and its share of `total_events`. Use `daily_events` to chart APIErrors over the requested window and flag any day that spikes above the window mean. ### 2. Affected Sessions & Models For each session in scope, pull `GET /api/events?session_id=X` and collect `APIError` events. Group by `session_id` and, via `GET /api/sessions`, by `model`. Report the top affected sessions and which model accounts for the most errors. ### 3. Likely Cause Classification Inspect each error's `summary`/`data` and bucket it: - **Rate limit** — mentions 429, "rate limit", "quota", or retry-after. - **Overload** — mentions 529, "overloaded", or capacity. - **Context** — mentions context length, token limit, or "too long" (correlate with nearby `Compaction` events). - **Other** — anything else; quote the `summary`. Report the count and percentage in each bucket. ### 4. Timeline List the most recent APIErrors with `timestamp`, `session_id`, `model`, classified cause, and a one-line `summary` excerpt. ## Output - A Markdown table per section (volume, by model, by cause). - Rates as percentages to 2 decimals; any currency in USD to 4 decimals. - Cite exact `session_id`, `model`, `timestamp`, and `summary` values — never invent a cause not supported by the payload; bucket as "Other" when unclear. - End with the dominant cause and a concrete mitigation (e.g., back off and retry on 529, reduce context to cut context errors, slow request rate on 429). - Read-only: only report what the API returns. If `curl` cannot reach `http://localhost:4820`, tell the user to start the dashboard with `npm start` from the repo root.
© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor