mcpbeat Sign in

Error Recovery Agent Skill

Standard recovery patterns for all squad agents. When something fails, adapt — don't just report the failure.

866 tokens
context cost
SKILL.md, read when the skill is used
1
files
instructions only
1
copies elsewhere
how many repositories repackaged it
2 939
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/Generative-AI-for-beginners-dotnet --skill error-recovery

The instruction itself

7 sections, as written by the author

Error Recovery Patterns

Standard recovery patterns for all squad agents. When something fails, adapt — don't just report the failure.


1. Retry with Backoff

When: Transient failures — API timeouts, rate limits, network errors, temporary service unavailability.

Pattern:

  • Wait briefly, then retry (start at 2s, double each attempt)
  • Maximum 3 retries before escalating
  • Log each attempt with the error received

Example: API call returns 429 Too Many Requests → wait 2s → retry → wait 4s → retry → wait 8s → retry → escalate if still failing.


2. Fallback Alternatives

When: Primary tool or approach fails and an alternative exists.

Pattern:

  • Attempt primary approach
  • On failure, identify alternative tool/method
  • Try the alternative with the same intent
  • Document which alternative was used and why

Example: Primary CLI tool fails → fall back to direct API call for the same operation.


3. Diagnose-and-Fix

When: Build failures, test failures, linting errors — structured errors with actionable output.

Pattern:

  • Read the full error output carefully
  • Identify the root cause from error messages
  • Attempt a targeted fix
  • Re-run to verify the fix
  • Maximum 3 fix-retry cycles before escalating

Example: Build fails with a type error → check for missing import → add it → rebuild.


4. Escalate with Context

When: Recovery attempts have been exhausted, or the failure requires human judgment.

Pattern:

  • Summarize what was attempted and what failed
  • Include the exact error messages
  • State what you believe the root cause is
  • Suggest next steps or who might be able to help
  • Hand off to the coordinator or the appropriate specialist

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."


5. Graceful Degradation

When: A non-critical step fails but the overall task can still deliver value.

Pattern:

  • Determine if the failed step is critical to the task outcome
  • If non-critical, log the failure and continue
  • Deliver partial results with a clear note of what was skipped
  • Offer to retry the skipped step separately

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.


Applying These Patterns

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 | — |

Other skills for the same job

different authors, same section of the catalogue
Executing Plans
by ZhanlinCui
×5

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

3.9k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3.1k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

5.9k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

878 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

2.8k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

3.5k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

3.7k tokens

How to use it

Copy the folder

Take microsoft/generative-ai-for-beginners-dotnet-error-recovery from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.