claude-handoff
MAmattpocock/skills290k近 7 天新增 10,235 个 star
Handle cascading data retrieval tool failures by falling back to embedded knowledge generation
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.
Use this pattern when you observe:
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
Before switching strategies, explicitly restate the original objective:
ORIGINAL OBJECTIVE: [Restate the core task goal]
CONTEXT PRESERVED: [Key requirements, constraints, deliverables]
Immediately switch to embedded knowledge generation:
Generate the required document:
# Fallback to generating from embedded knowledge
write_file(
path="output/document.md",
content="[Generate content from internal knowledge base]"
)
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"
write-file-fallback: Generate documents when data sources unavailabletask-context-preservation: Maintain objective continuity through errorsMAmattpocock/skills290k近 7 天新增 10,235 个 star
AFaffaan-m/ECC279k近 7 天新增 4,056 个 star
AFaffaan-m/ECC279k近 7 天新增 4,056 个 star
AFaffaan-m/ECC279k近 7 天新增 4,056 个 star
DIDietrichGebert/ponytail163k近 7 天新增 5,418 个 star
DIDietrichGebert/ponytail163k近 7 天新增 5,418 个 star