errors by yonatangross/orchestkit
npx skills add https://github.com/yonatangross/orchestkit --skill errors分析从 Claude Code 会话中捕获的错误,识别模式并获取可操作的见解。
/errors # 批量分析历史错误模式
/debug # 针对当前会话的 CC 2.1.30 实时调试
| 命令 | 用途 | 范围 |
|---|---|---|
/errors | 批量分析错误模式(最近 24 小时/7 天) | 历史模式 |
/debug | 当前会话状态的实时调试 | 当前会话 |
/ork:fix-issue | 针对特定错误的完整 RCA 工作流 | 单个问题 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 对最近 24 小时的错误运行批量分析
python .claude/scripts/analyze_errors.py
# 分析最近 7 天
python .claude/scripts/analyze_errors.py --days 7
# 生成 Markdown 报告
python .claude/scripts/analyze_errors.py --report
错误收集器钩子捕获:
位置: .claude/logs/errors.jsonl
检查触发警告的学习模式:
cat .claude/rules/error_rules.json | jq '.rules[] | {id, signature, count: .occurrence_count}'
| 文件 | 用途 |
|---|---|
.claude/hooks/posttool/error-collector.sh | 将错误捕获到 JSONL |
.claude/hooks/pretool/bash/error-pattern-warner.sh | 在执行有风险命令前发出警告 |
.claude/scripts/analyze_errors.py | 批量模式分析 |
.claude/rules/error_rules.json | 学习到的错误模式 |
.claude/logs/errors.jsonl | 原始错误日志 |
pattern: ECONNREFUSED|connection refused|ERR_CONNECTION_REFUSED|connect ECONNREFUSED
fix: 端口可能已更改或服务未运行。
1. 检查服务:portless list(如果已安装)
2. 使用命名 URL:api.localhost:1355 而不是 localhost:PORT
3. 备用方案:lsof -iTCP -sTCP:LISTEN -nP | grep -E 'node|python|java'
4. 安装 Portless 以避免端口猜测:npm i -g portless
pattern: ERR_CONNECTION_RESET|ECONNRESET|socket hang up
fix: 服务可能已崩溃。检查进程日志,重启服务,
并使用 agent-browser 验证应用是否响应:
agent-browser open "http://myapp.localhost:1355"
pattern: role "X" does not exist
fix: 使用 Docker 连接:docker exec -it orchestkit-postgres-dev psql -U orchestkit_user -d orchestkit_dev
pattern: relation "X" does not exist
fix: 检查 MCP postgres 服务器连接字符串 - 可能连接到了错误的数据库
ork:fix-issue: 修复已识别的错误debug-investigator: 调试错误根本原因当模式重复出现 2 次或以上时,规则由 analyze_errors.py 自动生成。对于手动规则,编辑 .claude/rules/error_rules.json:
{
"id": "custom-001",
"pattern": "your regex pattern",
"signature": "human readable signature",
"tool": "Bash",
"occurrence_count": 1,
"fix_suggestion": "How to fix this"
}
每周安装量
88
仓库
GitHub 星标数
134
首次出现
2026 年 1 月 22 日
安全审计
安装于
gemini-cli80
opencode80
github-copilot78
codex78
cursor76
claude-code75
Analyze errors captured from Claude Code sessions to identify patterns and get actionable insights.
/errors # Batch analysis of historical error patterns
/debug # CC 2.1.30 real-time debug for current session
| Command | Purpose | Scope |
|---|---|---|
/errors | Batch analysis of error patterns (last 24h/7d) | Historical patterns |
/debug | Real-time debug of current session state | Current session |
/ork:fix-issue | Full RCA workflow for specific bug | Single issue |
# 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
The error collector hook captures:
Location: .claude/logs/errors.jsonl
Check learned patterns that trigger warnings:
cat .claude/rules/error_rules.json | jq '.rules[] | {id, signature, count: .occurrence_count}'
| 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 |
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:1355 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 "http://myapp.localhost:1355"
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
ork:fix-issue: Fix identified errorsdebug-investigator: Debug error root causesRules are auto-generated by analyze_errors.py when patterns repeat 2+ times. For manual rules, edit .claude/rules/error_rules.json:
{
"id": "custom-001",
"pattern": "your regex pattern",
"signature": "human readable signature",
"tool": "Bash",
"occurrence_count": 1,
"fix_suggestion": "How to fix this"
}
Weekly Installs
88
Repository
GitHub Stars
134
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
gemini-cli80
opencode80
github-copilot78
codex78
cursor76
claude-code75
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
145,500 周安装