error-scan — скилл для Claude Code: поиск сбоев и установка
Сканирует недавние сессии Claude Code и группирует ошибки по инструментам и моделям. Пригодится, когда нужно понять, что сейчас ломается.
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill error-scan -a claude-codeЧто делает error-scan
Скилл анализирует данные Agent Monitor: события APIError и запуски инструментов PreToolUse, которым не соответствует PostToolUse. Сбои группируются по инструментам и моделям, а затем ранжируются по частоте. Можно просмотреть все сигналы, только ошибки API, только сбои инструментов, ограничить анализ числом недавних сессий или указать ID сессии.
В отчёт входят охват по сессиям, общие счётчики ошибок и группировки по инструментам и моделям. Также он выделяет наиболее проблемные инструмент, модель и сессию. Данные берутся через API Agent Monitor; скилл работает только на чтение. Если curl не может подключиться к http://localhost:4820, дашборд нужно запустить командой npm start из корня репозитория — без работающего сервера сканировать нечего.
Какие задачи решает
- найти ошибки API в недавних сессиях
- обнаружить запуски инструментов без завершения
- сравнить частоту сбоев по инструментам
- определить, с какой моделью связаны ошибки
- выделить сессию с наибольшим числом сбоев
Примеры запросов агенту
- Просканируй все сессии и сгруппируй ошибки.
- Найди только ошибки API:
api. - Проверь сбои инструментов в последних 10 сессиях:
tools 10.
Как установить error-scan
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill error-scan -a claude-code2Вручную: положить файлы
~/.claude/skills/error-scan/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/error-scan/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill error-scan -a codex2Вручную: положить файлы
.agents/skills/error-scan/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill error-scan -a cursor2Вручную: положить файлы
.cursor/skills/error-scan/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install hoangsonww/Claude-Code-Agent-Monitor error-scan2Вручную: положить файлы
.github/skills/error-scan/SKILL.md1Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill error-scan -a gemini-cli2Командой платформы
gemini skills install https://github.com/hoangsonww/Claude-Code-Agent-Monitor --path plugins/ccam-quality/skills/error-scanВручную: положить файлы
.devin/skills/error-scan/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill error-scan -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о error-scan
Как установить error-scan в Claude Code?
Выполните npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill error-scan -a claude-code. Файл скилла находится по пути ~/.claude/skills/error-scan/SKILL.md.
Что делает error-scan?
Он ищет ошибки API и незавершённые вызовы инструментов в данных Agent Monitor, затем группирует и ранжирует сбои по инструментам и моделям.
Что означают аргументы error-scan?
api ограничивает анализ событиями ошибок API, а tools — незавершёнными вызовами инструментов. Число задаёт количество недавних сессий; ID позволяет проверить одну сессию.
Исходный текст
SKILL.md · MIT
--- name: error-scan description: > Scan recent Claude Code activity for errors and failure signals across all sessions using Agent Monitor data — APIError events and PreToolUse→PostToolUse gaps (tools that started but never completed) — then group failures by tool and model and rank them by frequency. Use when checking for errors or asking "what's failing right now". --- # Error Scan Sweep recent events across sessions for error and failure signals, then rank them by how often they occur and which tool or model produced them. ## Input The user provides: **$ARGUMENTS** This may be: - empty or "all" — scan every failure signal (default) - "api" — APIError events only - "tools" — tool-failure gaps only - a number N — limit the scan to the most recent N sessions - a session ID — scan a single session ## Data Sources | Endpoint | Returns | |----------|---------| | `GET /api/analytics` | `event_types` (counts per type incl. PreToolUse, PostToolUse, APIError), `tool_usage` (top 20), `daily_events` (365d) — fleet-wide failure baseline | | `GET /api/events?session_id=X` | Per-session event stream: `event_type`, `tool_name`, `summary`, `data`, `timestamp` — locate `APIError` and unmatched `PreToolUse` | | `GET /api/sessions?limit=N` | Sessions with `id`, `status`, `model`, `started_at` — pick the recent window and attribute failures to a model | ## Report Sections ### 1. Scope Resolve `$ARGUMENTS` to a session set: pull `GET /api/sessions?limit=N` (default 50, ordered by `started_at`). Report how many sessions and what time span are covered. ### 2. Fleet Failure Counts From `GET /api/analytics` `event_types`, report total `APIError` count and the PreToolUse→PostToolUse gap: `gap = PreToolUse − PostToolUse` (unmatched tool starts = likely failures). State both as raw counts and as a share of `total_events`. ### 3. Group by Tool For each session in scope, pull `GET /api/events?session_id=X`. Match each `PreToolUse` to its following `PostToolUse` by `tool_name`; unmatched starts are failures. Aggregate failures and `APIError` events per `tool_name`. Rank tools by failure frequency (descending). ### 4. Group by Model Join failures to the owning session's `model` (from `GET /api/sessions`). Rank models by APIError count and tool-failure count. ### 5. Top Offenders List the single most failure-prone tool, the most error-prone model, and the session with the most failures, each with its exact count and one-line `summary` excerpt from a representative event. ## Output - A ranked Markdown table: tool/model | APIError count | tool-failure (gap) count | total failures | share of events. - Rates as percentages to 2 decimals. - Cite exact `event_type`, `tool_name`, and `session_id` values — never fabricate counts. - End with the one failure pattern most worth investigating and a concrete next step. - 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