hive.error-recovery
它能做什么
这个技能为失败的步骤提供一套简单的决策方案。适合运行使用工具的 AI 智能体、并希望它们能自行恢复的人。
适用场景
- ✓当工具调用因超时、速率限制或输入错误而失败的时候。
- ✓当同一工具持续失败,AI 应该尝试其他方法的时候。
- ✓当失败的项目必须被记录,而不是悄悄丢弃的时候。
技能链接
https://github.com/aden-hive/hive/blob/main/core/framework/skills/_default_skills/error-recovery/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我希望你对失败的步骤重试一次,如果仍然失败,就换一种方式,而不是直接放弃。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 首先判断失败是临时性的还是永久性的。对于临时问题它会重试一次,能修正输入时就修正,无法修正时则记录该失败。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Operational Protocol: Error Recovery
When a tool call fails:
Diagnose — classify the failure as transient (network blip, rate limit, timeout) or structural (wrong selector, missing auth, invalid schema, permission denied).
Decide:
- Transient → retry once.
- Structural + fixable → fix the input and retry.
- Structural + unfixable → record the failure and move to the next item.
- Blocking all progress → escalate.
Adapt — if the same tool has failed {{max_retries_per_tool}}+ times in a row, stop using it and find an alternative approach.
Never silently drop a failed item. If the item is a task in the colony queue, write the failure to the DB instead of an in-memory buffer:
sqlite3 "$DB_PATH" "UPDATE tasks SET status='failed', last_error='<one-sentence reason>', completed_at=datetime('now'), updated_at=datetime('now') WHERE id='<task-id>' AND worker_id='<your-worker-id>';"
The tasks.retry_count column and the stale-claim reclaimer handle auto-retry for crashes; your job is the within-run decision tree above. See hive.colony-progress-tracker for the full queue protocol.
常见问题
什么算临时失败?
网络问题、速率限制或超时都算临时失败,会被重试一次。
多次失败之后会怎样?
AI 会停止使用该工具,并寻找其他方法。
失败的项目会丢失吗?
不会。它们会连同原因一并被记录,不会被悄悄丢弃。
详情
作者的原始描述
Follow a structured recovery decision tree when tool calls fail instead of blindly retrying or giving up.
repo: aden-hive/hive
热度
- GitHub 星标
- 11k
- 排名
- #11801
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
browser-edge-cases
11k帮你的智能体修复在 LinkedIn、X 或脚本繁重的页面等复杂网站上失败的浏览器自动化任务。
hive.browser-automation
11k教你的智能体使用 hive-browser 工具控制你自己的 Chrome 浏览器,通过截图和点击完成操作。
hive.colony-progress-tracker
11k帮你的智能体认领任务,并把它的步骤和检查记录在共享数据库中,让工作在进行中就被跟踪。
hive.context-preservation
11k帮你的智能体在较早的细节从记忆中被移除之前,把长篇工具结果中的关键事实保存到笔记里。