errors — скилл для Claude Code: что делает и как установить
Скилл errors разбирает ошибки сессий Claude Code, группирует их по типам и ищет повторяющиеся случаи. Он подключается к задаче после сбоя команды, сети или инструмента.
MIT 223 установок ★ 305 обновлён 2026-11-07
npx skills add yonatangross/orchestkit --skill errors -a claude-codeЧто делает errors
Скилл собирает ошибки из сессий Claude Code и разделяет их на сетевые, авторизационные, модельные, инструментальные и связанные с разрешениями. Он ищет похожие случаи в прошлых запусках, показывает повторяющиеся шаблоны и предлагает шаги для восстановления. Сырые записи хранятся в .claude/logs/errors.jsonl.
Внутри есть хук .claude/hooks/posttool/error-collector.sh, предупреждение перед рискованными командами и скрипт .claude/scripts/analyze_errors.py для пакетного разбора. Скрипт умеет анализировать последние сутки или 7 дней и создавать Markdown-отчёт. Повторяющиеся правила записываются в .claude/rules/error_rules.json, а посмотреть их можно через jq.
Для Claude Code нужна версия 2.1.277+ и memory MCP server. Без этого MCP-сервера скилл не сможет выполнить свою основную работу.
Какие задачи решает
- разобрать ошибки последней сессии Claude Code
- найти повторяющиеся сбои за 7 дней
- отделить проблемы сети от ошибок авторизации
- проверить правила для часто падающих команд
- сформировать Markdown-отчёт по журналу ошибок
Примеры запросов агенту
- Проанализируй ошибки Claude Code за последние 7 дней и найди повторяющиеся шаблоны.
- Запусти
python .claude/scripts/analyze_errors.py --reportи подготовь Markdown-отчёт. - Проверь
.claude/rules/error_rules.jsonи объясни, какие ошибки требуют восстановления.
Как установить errors
1Через Skills CLI (Vercel)
npx skills add yonatangross/orchestkit --skill errors -a claude-code2Вручную: положить файлы
~/.claude/skills/errors/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/errors/
1Через Skills CLI (Vercel)
npx skills add yonatangross/orchestkit --skill errors -a codex2Вручную: положить файлы
.agents/skills/errors/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add yonatangross/orchestkit --skill errors -a cursor2Вручную: положить файлы
.cursor/skills/errors/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install yonatangross/orchestkit src/skills/errors2Вручную: положить файлы
.github/skills/errors/SKILL.md1Через Skills CLI (Vercel)
npx skills add yonatangross/orchestkit --skill errors -a gemini-cli2Командой платформы
gemini skills install https://github.com/yonatangross/orchestkit --path src/skills/errorsВручную: положить файлы
.devin/skills/errors/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add yonatangross/orchestkit --skill errors -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об errors
Как установить errors в Claude Code?
Выполните npx skills add yonatangross/orchestkit --skill errors -a claude-code, затем используйте файл ~/.claude/skills/errors/SKILL.md.
Что делает скилл errors?
Он собирает ошибки сессий Claude Code, группирует их по типам, ищет повторения и предлагает варианты восстановления. Для анализа использует журнал .claude/logs/errors.jsonl и правила из .claude/rules/error_rules.json.
Что нужно для работы errors?
Нужны Claude Code 2.1.277+ и memory MCP server. Скилл также использует Read, Bash и Grep.
Исходный текст
SKILL.md · MIT
---
name: errors
license: MIT
compatibility: "Claude Code 2.1.277+. Requires memory MCP server."
description: "Claude Code session error triage: categorizes network, auth, model, tool and permission errors, finds prior occurrences, suggests recovery. Use when a session hits errors or failures."
context: inherit
user-invocable: false
allowed-tools: "Read Bash Grep"
effort: low
model: haiku
metadata:
category: document-asset-creation
mcp-server: memory
version: "1.0.0"
author: "OrchestKit"
complexity: "low"
tags: "errors, debugging, troubleshooting, patterns"
---
# Error Pattern Analysis
Analyze errors captured from Claude Code sessions to identify patterns and get actionable insights.
## Quick Start
```bash
/errors # Batch analysis of historical error patterns
/debug # CC 2.1.30 real-time debug for current session
```
### When to Use Which
| Command | Purpose | Scope |
|---------|---------|-------|
| `/errors` | Batch analysis of error patterns (last 24h/7d) | Historical patterns |
| `/debug` | Real-time debug of current session state | Current session |
| `fix-issue` | Full RCA workflow for specific bug | Single issue |
> **CC 2.1.169+:** for errors that survive `/clear` and restarts, `claude --safe-mode` boots with every customization disabled (CLAUDE.md/plugins/skills/hooks/MCP) — the one-step test that separates "ork/hook/MCP bug" from "CC bug" before deeper analysis.
## Quick Analysis
```bash
# Run batch analysis on last 24h of errors
python .claude/scripts/analyze_errors.py
# Analyze last 7 days
python .claude/scripts/analyze_errors.py --days 7
# Generate markdown report
python .claude/scripts/analyze_errors.py --report
```
## What Gets Captured
The error collector hook captures:
- Tool name (Bash, mcp__memory__search_nodes, etc.)
- Error message (first 500 chars)
- Tool input (command/query that failed)
- Timestamp and session ID
**Location:** `.claude/logs/errors.jsonl`
## Current Error Rules
Check learned patterns that trigger warnings:
```bash
cat .claude/rules/error_rules.json | jq '.rules[] | {id, signature, count: .occurrence_count}'
```
## Files
| File | Purpose |
|------|---------|
| `.claude/hooks/posttool/error-collector.sh` | Captures errors to JSONL |
| `.claude/hooks/pretool/bash/error-pattern-warner.sh` | Warns before risky commands |
| `.claude/scripts/analyze_errors.py` | Batch pattern analysis |
| `.claude/rules/error_rules.json` | Learned error patterns |
| `.claude/logs/errors.jsonl` | Raw error log |
## Common Patterns
### Connection Refused / Wrong Port
```
pattern: ECONNREFUSED|connection refused|ERR_CONNECTION_REFUSED|connect ECONNREFUSED
fix: The port may have changed or the service isn't running.
1. Check services: portless list (if installed)
2. Use named URLs: api.localhost instead of localhost:PORT
3. Fallback: lsof -iTCP -sTCP:LISTEN -nP | grep -E 'node|python|java'
4. Install Portless to avoid port guessing: npm i -g portless
pattern: ERR_CONNECTION_RESET|ECONNRESET|socket hang up
fix: Service may have crashed. Check process logs, restart the service,
and use agent-browser to verify the app is responding:
agent-browser open "https://myapp.localhost"
```
### PostgreSQL Connection Errors
```
pattern: role "X" does not exist
fix: Use Docker connection: docker exec -it orchestkit-postgres-dev psql -U orchestkit_user -d orchestkit_dev
pattern: relation "X" does not exist
fix: Check MCP postgres server connection string - may be connected to wrong database
```
### Hook Errors (CC 2.1.98)
Since CC 2.1.98, hook errors show the first line of stderr directly in the transcript — no need for `--debug`:
```
pattern: hook.*error|hook.*failed|PreToolUse.*error
diagnosis: Read the stderr line shown in the transcript.
1. If path error → check CLAUDE_PLUGIN_ROOT is set
2. If JSON parse error → hook is returning invalid JSON
3. If timeout → hook exceeds 50ms budget (PreToolUse) or 100ms (PostToolUse)
4. If "module not found" → run: cd src/hooks && npm run build
```
## Related Skills
- `ork:fix-issue`: Fix identified errors
- `debug-investigator`: Debug error root causes
## Adding New Rules
Rules are auto-generated by `analyze_errors.py` when patterns repeat 2+ times.
For manual rules, edit `.claude/rules/error_rules.json`:
```json
{
"id": "custom-001",
"pattern": "your regex pattern",
"signature": "human readable signature",
"tool": "Bash",
"occurrence_count": 1,
"fix_suggestion": "How to fix this"
}
```
© OrchestKit · MIT · yonatangross/orchestkit