cascade-fail-recovery
它能做什么
这项技能告诉 AI,当反复的数据查询(例如读取网页或执行搜索)持续失败时应该怎么做。它适合那些在在线工具出错时任务就会卡住的人。
适用场景
- ✓当网页读取工具或搜索工具连续失败两次或以上的时候。
- ✓当网络错误让 AI 始终无法获取所需内容的时候。
- ✓当我希望 AI 完成任务,而不是在工具报错后放弃的时候。
技能链接
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/cascade-fail-recovery/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的 AI 一直无法打开网页。请仍然完成这份报告,并告诉我哪些部分来自它自己的知识。”
每周 5 个新技能,1 分钟读完。
工作原理
在多次失败后,AI 会重新陈述目标,并根据内置知识撰写结果。它会注明外部来源不可用。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Cascade Failure Recovery
Purpose
When multiple data retrieval tools (read_webpage, search_web) fail in succession, immediately fall back to generating content from embedded knowledge rather than attempting repairs or abandoning the task. This preserves task context and ensures completion.
When to Apply
Use this pattern when you observe:
- 2+ consecutive failures from data retrieval tools
- Network/access errors preventing web content retrieval
- Risk of task abandonment due to tool errors
Recovery Procedure
Step 1: Recognize Cascading Failure
Identify the failure pattern:
Iteration N: read_webpage failed - connection error
Iteration N+1: search_web failed - timeout/unavailable
Iteration N+2: [risk] Agent may abandon task or switch objectives
Step 2: Preserve Task Context
Before switching strategies, explicitly restate the original objective:
ORIGINAL OBJECTIVE: [Restate the core task goal]
CONTEXT PRESERVED: [Key requirements, constraints, deliverables]
Step 3: Invoke Fallback Strategy
Immediately switch to embedded knowledge generation:
- Acknowledge the limitation: Note that external data sources are unavailable
- Activate internal knowledge: Use pre-trained knowledge relevant to the task
- Generate content: Use write_file to create the deliverable from available knowledge
- Document the fallback: Note in the output what information could not be verified externally
Step 4: Execute write_file
Generate the required document:
# Fallback to generating from embedded knowledge
write_file(
path="output/document.md",
content="[Generate content from internal knowledge base]"
)
Example Application
Scenario: PACT Act veterans benefits document needed, but web access failing
Wrong approach (observed failure):
Iter 11: read_webpage failed - access error
Iter 12: search_web failed - unavailable
Iter 13: [ABANDONED] Switched to unrelated musician payroll task
Correct approach (with this skill):
Iter 11: read_webpage failed - access error
Iter 12: search_web failed - unavailable
Iter 13: CASCADE FAIL DETECTED - invoking fallback
Iter 14: write_file - generate PACT Act document from embedded knowledge
- Note: "External verification unavailable; content based on training knowledge"
Guidelines
- Threshold: Trigger fallback after 2 consecutive retrieval failures
- No endless retries: Do not attempt more than 1 repair/retry cycle
- Preserve objective: Never switch to unrelated tasks when tools fail
- Transparency: Clearly mark any content that lacks external verification
- Document limitations: Note what could not be verified due to tool failures
Related Skills
write-file-fallback: Generate documents when data sources unavailabletask-context-preservation: Maintain objective continuity through errors
常见问题
回答会使用实时信息吗?
不会。这种退路使用的是内置知识,因此较新的或实时的信息可能缺失。
AI 会说明它使用了退路吗?
会。指南要求在输出中注明这一退路。
这和重试一样吗?
不一样。指南要求在多次失败后改用内置知识,而不是不断尝试修复。
详情
作者的原始描述
Handle cascading data retrieval tool failures by falling back to embedded knowledge generation
repo: HKUDS/AgentPilot
热度
- GitHub 星标
- 7.8k
- 排名
- #12843
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
agentpilot
7.8k帮你的智能体准备任务并运行 AgentPilot 循环,逐步改进项目:循环会提出修改、测试修改并为其打分。
openspace
7.8k帮你的智能体设置 OpenSpace,这是一个用于存储和获取智能体技能的工具,并通过 MCP 将其连接到你的 AI 应用。
rsi-arena
7.8k帮你的智能体设置并运行标准 AI 基准测试,例如 AIME 和 Terminal-Bench,用来比较不同的改进方法。
experiment-guide
7.8k帮你的智能体规划小型实验、阅读实验结果并记录发现,同时研究如何改进一个程序。