Standard recovery patterns for all squad agents. When something fails, adapt — don't just report the failure.
68
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Standard recovery patterns for all squad agents. When something fails, adapt — don't just report the failure.
When: Transient failures — API timeouts, rate limits, network errors, temporary service unavailability.
Pattern:
Example: API call returns 429 Too Many Requests → wait 2s → retry → wait 4s → retry → wait 8s → retry → escalate if still failing.
When: Primary tool or approach fails and an alternative exists.
Pattern:
Example: Primary CLI tool fails → fall back to direct API call for the same operation.
When: Build failures, test failures, linting errors — structured errors with actionable output.
Pattern:
Example: Build fails with a type error → check for missing import → add it → rebuild.
When: Recovery attempts have been exhausted, or the failure requires human judgment.
Pattern:
Example: After 3 failed build attempts → "Build fails on line 42 with null reference. Tried X, Y, Z. Likely a design issue in the Foo module. Recommend the code owner review."
When: A non-critical step fails but the overall task can still deliver value.
Pattern:
Example: Generating a report with 5 sections — section 3 data source is unavailable → produce the report with 4 sections, note that section 3 was skipped and why.
Each agent should reference these patterns in their charter's ## Error Recovery section, tailored to their domain. The charter should list the agent's most common failure modes and map each to the appropriate pattern above.
Selection guide:
| Failure Type | Primary Pattern | Fallback Pattern |
|---|---|---|
| Network/API transient | Retry with Backoff | Escalate with Context |
| Tool/dependency missing | Fallback Alternatives | Escalate with Context |
| Build/test error | Diagnose-and-Fix | Escalate with Context |
| Auth/permissions | Retry with Backoff | Escalate with Context |
| Non-critical data missing | Graceful Degradation | — |
| Unknown/novel error | Escalate with Context | — |
f466c4f
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.