error-recovery

error-recovery is a skill for Claude Code from MadAppGang/magus. It costs 39 tokens per session (7,665 once invoked), scanned A, original, MIT.

A collection of patterns for handling failures in workflows that use several AI agents and outside services. It covers timeouts, API errors, partial results, cancellations, missing tools, quota limits, and retries.

In plain words
What is it for?
Use it to decide when to retry, stop and ask the user, continue with partial results, handle cancellations, and report failures safely.
Why use it?
A failed agent, network request, or model call does not have to stop the whole workflow or leave its result unclear.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the multimodel plugin — 2 skills, 2 commands, 1 agent shipped together

Good fit Use it to decide when to retry, stop and ask the user, continue with partial results, handle cancellations, and report failures safely.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/madappgang/magus/error-recovery
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add MadAppGang/magus --skill error-recovery
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/magus

Made for: Claude Code.

Or install multimodel, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for error-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/madappgang/magus/error-recovery/github.svg)](https://agentmods.dev/skills/madappgang/magus/error-recovery)
Your own site
<a href="https://agentmods.dev/skills/madappgang/magus/error-recovery"><img src="https://agentmods.dev/badge/skills/madappgang/magus/error-recovery/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for error-recovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/madappgang/magus/error-recovery"><img src="https://agentmods.dev/badge/skills/madappgang/magus/error-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,665 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 8 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 251
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 253
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 259
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 671
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Excessive Agency · line 55
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 954
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 1047
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 1048
    Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
    Fix: Set explicit rate limits, timeouts, and resource quotas for API calls, file operations, and compute. Implement circuit breakers for runaway loops.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.07665
Opus 5.5 $0.00016 $0.03066
Sonnet 5.5 $0.00008 $0.01533
Haiku 4.5 $0.00004 $0.00766

Measured 10d ago against content hash 5b5a0ebade53, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

error-recovery scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Never check `OPENROUTER_API_KEY` or call a provider with `curl` yourself. Keys and routes are
plugins/multimodel/skills/error-recovery/SKILL.md · 1,000 lines

How it starts

The opening of the file, as written. The whole thing — 1,000 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Error Recovery

Version: 1.2.0 Purpose: Patterns for handling failures in multi-agent workflows Status: Production Ready

Overview

Error recovery is the practice of handling failures gracefully in multi-agent workflows, ensuring that temporary errors, timeouts, or partial failures don't derail entire workflows. In production systems with external dependencies (AI models, APIs, network calls), failures are inevitable. The question is not "will it fail?" but "how will we handle it when it does?"

This skill provides battle-tested patterns for:

  • User escalation (STOP and report before fallback — DEFAULT)
  • Timeout handling (external models running longer than expected)
  • API failure recovery (401, 500, network errors)
  • Partial success strategies (some agents succeed, others fail)
  • User cancellation (graceful Ctrl+C handling)
  • Missing tools (claudish not installed)
  • Out of credits (payment/quota errors)
  • Re-running a failed model (only when the user chooses it)

With proper error recovery, workflows become resilient and production-ready.

Core Patterns

Pattern 0: User Escalation (DEFAULT — Read First)

This is the MOST IMPORTANT pattern. It overrides all other patterns when the user has requested a specific model.

Rule: NEVER silently substitute, retry with a different model, or fall back to embedded Claude when the user requested a specific model. STOP and REPORT the failure first.

When this applies:

  • User explicitly requested a model (e.g., "use Gemini to redesign X")
  • User selected specific models for a task
  • Any workflow where the model choice was intentional

When graceful degradation (Patterns 1-7) applies instead:

  • Automated pipelines where any result > no result
  • User explicitly said "use whatever works"
  • /team workflows where the command already handles failure reporting

The Protocol:

Step 1: Model fails (non-zero exit, empty output, API error, rate limit, binary crash)

Step 2: STOP immediately. Do NOT:
  ❌ Silently launch a different model
  ❌ Retry with a different provider prefix
  ❌ Fall back to embedded Claude without asking
  ❌ Run `claudish --top-models` or invent model IDs — use the live catalog (`list_models`) instead
  ❌ Substitute a "similar" model

Step 3: REPORT to the user with:
  - What model was requested
  - What happened (exact error message)
  - How many attempts were made and what was tried
  - Actionable options for the user to choose from

Step 4: WAIT for user's decision before proceeding

Read the full file on GitHub · 1,000 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago Changed · +4 lines 5b5a0ebade53
  2. 20d ago Changed · -178 lines 400066862761
  3. 22d ago Changed · -101 lines 5eb8ce595ac0
  4. 1mo ago Changed 363a69870907
  5. 1mo ago First seen · 1,275 lines · 39 tokens per session scan A 6b9b02e054f1

Subscribe to this mod's changes

error-recovery is a skill published in the GitHub repository MadAppGang/magus (13 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 7,665 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

systematic-debugging

Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.

open-metadata/OpenMetadata · 37 tokens

diagnose

Trace from a reproduced symptom to the source code that causes it. Pin the specific file and approximate line, rate confidence in the cause and clarity of the fix independently, and always propose a concrete fix.

emdash-cms/emdash · 43 tokens

repro-admin

Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.

emdash-cms/emdash · 48 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

deck-retro

Run a fully local agent-deck retrospective over the user's own transcripts, Recall index and logs. Use when a user wants to find recurring failures or take their own finding from investigation through synthetic reproduction, a user-filed issue, a test-first fix and contributor PR handoff. Also use for weekly usage…

asheshgoplani/agent-deck · 86 tokens