error-recovery

error-recovery is a skill for Claude Code from MadAppGang/magus. It costs 39 tokens per session (7,784 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,784 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.07784
Opus 5.5 $0.00016 $0.03114
Sonnet 5.5 $0.00008 $0.01557
Haiku 4.5 $0.00004 $0.00778

Measured 4d ago against content hash cf6614b321ae, 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 4d 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,002 lines

How it starts

The opening of the file, as written. The whole thing — 1,002 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,002 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. 4d ago Changed cf6614b321ae
  2. 1mo ago Changed 83d7894cbca4
  3. 1mo ago Changed · +2 lines 11588a2c724a
  4. 1mo ago Changed · +4 lines 5b5a0ebade53
  5. 2mo ago Changed · -178 lines 400066862761
  6. 2mo ago Changed · -101 lines 5eb8ce595ac0
  7. 2mo ago Changed 363a69870907
  8. 2mo 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 (16 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 7,784 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

error-recovery compared with skills from other repositories

error-recovery next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
error-recoveryMadAppGang/magusSkill16todayMITA39Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9ktodayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill342todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
diagnosing-missing-recordingsPostHog/posthogSkill41ktodaynoneA76Claude Code, Codex