跳到正文
Skillpedia
智能体11k · #11801

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/aden-hive/hive/blob/main/core/framework/skills/_default_skills/error-recovery/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我希望你对失败的步骤重试一次,如果仍然失败,就换一种方式,而不是直接放弃。”

每周 5 个新技能,1 分钟读完。

工作原理

AI 首先判断失败是临时性的还是永久性的。对于临时问题它会重试一次,能修正输入时就修正,无法修正时则记录该失败。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Operational Protocol: Error Recovery

When a tool call fails:

  1. Diagnose — classify the failure as transient (network blip, rate limit, timeout) or structural (wrong selector, missing auth, invalid schema, permission denied).

  2. 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.
  3. 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能