‹ 首页

cascade-fail-recovery

@hkuds · 收录于 5 天前 · 上游提交 1 周前

Handle cascading data retrieval tool failures by falling back to embedded knowledge generation

适合你,如果数据检索工具经常失败,需要自动恢复机制

/ 通过 npx 安装 校验哈希
npx oh-my-skill add hkuds/openspace/cascade-fail-recovery
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- hkuds/openspace/cascade-fail-recovery
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify hkuds/openspace/cascade-fail-recovery
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
6920GitHub stars
~587上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 2c5cc40 · 表述以原文为准
它做什么

当连续两次数据获取工具(如读取网页、搜索网页)失败时,Claude会立即使用内置知识生成内容,而不是放弃任务或反复重试。它会保留原始目标,生成文档并标注哪些信息未经外部验证。

什么时候触发

当连续两次或更多次数据获取工具(如读取网页、搜索网页)失败(如网络错误、超时)时触发。

装好后可以这样说
触发回退机制,跳过外部源。
Claude会使用内置知识生成文档。
技能原文 SKILL.md作者撰写 · MIT · 2c5cc40

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:

  1. Acknowledge the limitation: Note that external data sources are unavailable
  2. Activate internal knowledge: Use pre-trained knowledge relevant to the task
  3. Generate content: Use write_file to create the deliverable from available knowledge
  4. 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
  1. Threshold: Trigger fallback after 2 consecutive retrieval failures
  2. No endless retries: Do not attempt more than 1 repair/retry cycle
  3. Preserve objective: Never switch to unrelated tasks when tools fail
  4. Transparency: Clearly mark any content that lacks external verification
  5. Document limitations: Note what could not be verified due to tool failures
Related Skills
  • write-file-fallback: Generate documents when data sources unavailable
  • task-context-preservation: Maintain objective continuity through errors
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。