Agent skill

Error Recovery

by NoobyGains in NoobyGains/godmode

A skill your agent uses when repeated fix attempts fail, the agent appears stuck in a loop, or complexity is increasing without progress

MITAuto-check passedDevelopment

Install Error Recovery

skills CLI
$ npx skills add NoobyGains/godmode --skill error-recovery -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NoobyGains/godmode error-recovery --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NoobyGains/godmode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/error-recovery .claude/skills/error-recovery && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
error-recovery
GitHub stars
107
Token cost
~2k tokens
SKILL.md length
1,012 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when repeated fix attempts fail, the agent appears stuck in a loop, or complexity is increasing without progress

  • Works in 6 steps: Re-read the actual error message. Not… → Try a fundamentally different approach.… → Simplify ruthlessly. Strip the problem… → …
  • Repeated fix attempts fail
  • SKILL.md covers Overview, The Prime Directive, When to Use and Failure Counter, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Error Recovery is an agent skill from NoobyGains/godmode. Use when repeated fix attempts fail, the agent appears stuck in a loop, or complexity is increasing without progress

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: The AI development framework that thinks before it builds. 36 composable skills for Claude Code, Cursor, Codex, and OpenCode. The licence is MIT.

When your agent uses it

  • Repeated fix attempts fail
  • The agent appears stuck in a loop
  • Complexity is increasing without progress

Example prompts

  • “/error-recovery”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Re-read the actual error message. Not your interpretation of it -- the literal text. Errors frequently contain the answer.
  2. Try a fundamentally different approach. Not a variation. If you were editing config, try code. If you were patching, try replacing. If you…
  3. Simplify ruthlessly. Strip the problem to its smallest reproducible case. Remove everything non-essential. Test the simplest possible…
  4. Verify your assumptions. Print values. Check types. Confirm the file you think you are editing is the one actually being executed. Confirm…
  5. Escalate with honesty. Tell the user: "I have tried N approaches. None worked. Here is what I know and what I recommend."
  6. Rollback to last known-good state. If you have made things worse, undo all changes and return to where things last worked. Start fresh…

What it can do on your machine

Read from SKILL.md and the folder at commit 441103a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dot).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Error Recovery loads about 2k tokens when it runs. Until then it costs about 33 tokens; SKILL.md has 1,012 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~33
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NoobyGains/godmode at commit 441103a, republished under its MIT licence (© NoobyGains). 1,012 words, ~1,993 tokens.

Download SKILL.mdSave it as .claude/skills/error-recovery/SKILL.md (or your agent's skills folder).
name
error-recovery
description
Use when repeated fix attempts fail, the agent appears stuck in a loop, or complexity is increasing without progress

Error Recovery

Overview

AI agents get stuck. They try the same approach repeatedly, add complexity to fix complexity, and rationalize "one more attempt" long past the point of diminishing returns. This skill detects stuck patterns proactively and forces recovery before wasted effort compounds.

Core principle: Track every failed attempt. Escalate at defined thresholds. Never allow unbounded retries.

The Prime Directive

NO CONTINUED ATTEMPTS WITHOUT ACKNOWLEDGING FAILURE COUNT

Before EVERY fix attempt, state: "This is attempt N of the current issue." If N >= 3, you are not authorized to continue without user direction.

When to Use

This skill activates automatically when any of these patterns appear:

  • Same error message after 2+ attempted fixes
  • A fix for problem A introduces problem B
  • File edited 3+ times for the same issue without resolution
  • Increasing line count or complexity with each attempt
  • "Let me try one more thing" after 2+ failures
  • Test suite results getting worse, not better
  • Reverting a fix and trying a variation of the same approach

This skill overrides optimism. When triggered, it takes priority over whatever strategy is currently failing.

Failure Counter

You MUST maintain an internal failure counter for each distinct issue:

FAILURE LOG
Issue: [description]
Attempt 1: [what you tried] -> [result]
Attempt 2: [what you tried] -> [result]
Attempt 3: [what you tried] -> [result]  <- STOP HERE

Rules:

  • Increment the counter for every attempted fix, including "small tweaks"
  • A variation of the same approach counts as a new attempt
  • Reverting and retrying counts as a new attempt
  • The counter resets ONLY when the issue is resolved or the user explicitly resets scope

Severity Levels

Yellow -- 2 Failed Attempts
  • Log the concern explicitly: "Two attempts have failed for [issue]."
  • Identify what both attempts had in common
  • Your next attempt MUST use a fundamentally different approach
  • If you cannot identify a different approach, escalate to Orange immediately
Orange -- 3 Failed Attempts
  • STOP all fix attempts.
  • Step back completely. Re-read the original error from scratch
  • Re-analyze the problem as if seeing it for the first time
  • List what you know, what you assumed, and what you have not verified
  • Formulate a new hypothesis that contradicts your previous assumptions
  • Present the situation to the user: "Three attempts have failed. Here is my revised analysis."
Red -- 4+ Failed Attempts
  • HALT. Do not continue without explicit user direction.
  • Present an honest assessment:
    • What you tried (all attempts, briefly)
    • What you learned from each failure
    • What you believe the actual problem might be
    • What you recommend as next steps (including "I may not be able to solve this")
  • Wait for user input before proceeding
  • If the user says continue, reset to Yellow with the new direction

Escalation Flowchart

dot
digraph recovery {
  rankdir=TB
  node [shape=box]

  start [label="Fix attempt fails"]
  count [label="Increment failure counter"]
  check [label="How many failures?"]
  yellow [label="YELLOW: Log concern\nTry fundamentally different approach"]
  orange [label="ORANGE: STOP\nRe-analyze from scratch\nPresent revised analysis"]
  red [label="RED: HALT\nPresent honest assessment\nWait for user direction"]
  resolved [label="Issue resolved\nReset counter"]
  user [label="User provides direction\nReset to Yellow"]

  start -> count
  count -> check
  check -> yellow [label="2"]
  check -> orange [label="3"]
  check -> red [label="4+"]
  yellow -> start [label="Next attempt fails"]
  yellow -> resolved [label="Fix works"]
  orange -> start [label="New hypothesis\nattempt fails"]
  orange -> resolved [label="Fix works"]
  red -> user [label="User responds"]
  user -> start [label="New attempt"]
}

Recovery Strategies

When a fix fails, apply these in order:

  1. Re-read the actual error message. Not your interpretation of it -- the literal text. Errors frequently contain the answer.

  2. Try a fundamentally different approach. Not a variation. If you were editing config, try code. If you were patching, try replacing. If you were adding, try removing.

  3. Simplify ruthlessly. Strip the problem to its smallest reproducible case. Remove everything non-essential. Test the simplest possible version.

  4. Verify your assumptions. Print values. Check types. Confirm the file you think you are editing is the one actually being executed. Confirm the function you think is being called is actually being called.

  5. Escalate with honesty. Tell the user: "I have tried N approaches. None worked. Here is what I know and what I recommend."

  6. Rollback to last known-good state. If you have made things worse, undo all changes and return to where things last worked. Start fresh from there.

Show full SKILL.md (443 more words)Show less

Anti-Patterns to Block

These patterns indicate the agent is stuck and MUST trigger this skill:

Anti-PatternWhat to Do Instead
"Let me try one more thing" (after 3+ failures)STOP. You said that last time. Escalate.
Adding complexity to fix complexitySimplify. Remove code. Reduce moving parts.
Ignoring the error message, trying random changesRead the error. It is telling you something specific.
Blaming the environment ("must be a cache issue")Verify the claim. Run a clean build. Check actually.
Widening scope instead of narrowing itFocus on the smallest failing case, not the whole system.
Editing the same file repeatedlyStep back. The problem may not be in that file.
"It should work" without verifyingRun it. Check output. Trust evidence, not expectations.
Fixing the test instead of the codeThe test is probably right. Fix what it is testing.

Cognitive Traps

RationalizationReality
"This is a different issue"If it appeared while fixing the original, it is the same issue. Count it.
"I almost had it last time"Almost does not count. Two near-misses is a pattern, not progress.
"The approach is right, just needs tweaking"Three tweaks of the same approach is not three different attempts.
"I need to understand the whole system first"You need to understand the failing part. Scope down, not up.
"Let me refactor first, then fix"Refactoring while debugging creates two problems. Fix first.
"This is an edge case"If it blocks completion, it is a primary case.
"One more log statement will reveal it"If three log statements did not help, you are looking in the wrong place.

Guardrails

STOP and activate this skill if you observe:

  • You have edited the same file 3+ times for one issue
  • Your fix introduced a new failure
  • You are writing more code to handle an error than the original feature
  • The test suite has more failures now than when you started
  • You are suppressing errors or warnings instead of fixing them
  • You are about to say "let me try" for the 3rd+ time
  • Your solution is more complex than the original problem
  • You have been working on the same error for more than 10 minutes of active attempts

Connections

  • godmode:fault-diagnosis -- Error recovery activates when fault diagnosis is not converging. If Phase 4 has failed 3+ times, this skill takes over.
  • godmode:completion-gate -- After recovery, use completion-gate to verify the fix actually holds. Prevents false "done" claims after a recovery sequence.
  • godmode:test-first -- Recovery should include writing a test that reproduces the exact failure. A fix without a regression test is not complete.
  • godmode:task-planning -- If recovery reveals the task was scoped wrong, return to task planning to re-scope before continuing.

© NoobyGains, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/error-recovery of NoobyGains/godmode.

Open the folder on GitHubat commit 441103a

Compare with similar skills

Error Recovery next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Error Recovery compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Error Recovery this skillNoobyGains/godmode107—~2kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from NoobyGains/godmode

All 34 skills in this repo
  • Activation

    NoobyGains/godmode

    A skill your agent uses when starting any conversation - establishes how to locate and invoke skills, mandating Skill tool usage before ANY response including clarifying questions

    107 GitHub stars~2.4k tokensUpdated 7 mo ago
    Auto-check passed
  • Agent Messaging

    NoobyGains/godmode

    A skill your agent uses when dispatching subagents, composing prompts for teammates, structuring handoff reports, or managing context boundaries between agents.

    107 GitHub stars~3k tokensUpdated 7 mo ago
    Auto-check passed
  • Codebase Research

    NoobyGains/godmode

    A skill your agent uses when building ANY feature within an existing project - search the current codebase for existing patterns, conventions, similar implementations, and established approaches…

    107 GitHub stars~3.2k tokensUpdated 7 mo ago
    Auto-check: notes
  • Completion Gate

    NoobyGains/godmode

    A skill your agent uses when about to declare work done, fixed, or passing, before committing or opening PRs - demands executing verification commands and reading their output before making any…

    107 GitHub stars~1.6k tokensUpdated 7 mo ago
    Auto-check passed
  • Comprehension Check

    NoobyGains/godmode

    A skill your agent uses when implementing any substantial feature, multi-file modification, or architectural change - produces a plain-language walkthrough of every alteration so the developer can…

    107 GitHub stars~1.5k tokensUpdated 7 mo ago
    Auto-check passed
  • Delegated Execution

    NoobyGains/godmode

    A skill your agent uses when executing implementation plans with independent tasks in the current session

    107 GitHub stars~2.4k tokensUpdated 7 mo ago
    Auto-check passed

Categories

Questions about Error Recovery

What does Error Recovery do?

A skill your agent uses when repeated fix attempts fail, the agent appears stuck in a loop, or complexity is increasing without progress. Error Recovery is an agent skill from NoobyGains/godmode.

When should I use Error Recovery?

Error Recovery fits situations like: repeated fix attempts fail; the agent appears stuck in a loop; complexity is increasing without progress.

How do I install Error Recovery in Claude Code?

Run `npx skills add NoobyGains/godmode --skill error-recovery -a claude-code`. Or copy the skill folder (skills/error-recovery in NoobyGains/godmode) into .claude/skills/error-recovery in your project. Claude Code loads it when a task matches its description.

How do I install Error Recovery in Codex?

Run `npx skills add NoobyGains/godmode --skill error-recovery -a codex`. Or copy the skill folder (skills/error-recovery in NoobyGains/godmode) into .agents/skills/error-recovery in your project. Codex loads it when a task matches its description.

Can I use Error Recovery in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NoobyGains/godmode --skill error-recovery -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/error-recovery, .gemini/skills/error-recovery, .github/skills/error-recovery and .opencode/skills/error-recovery in your project.

What does Error Recovery need to run?

SKILL.md names no scripts, command-line tools or credentials: Error Recovery is instructions for the agent only.

Does Error Recovery access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Error Recovery safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Error Recovery use?

Error Recovery is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Error Recovery use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Error Recovery?

Skills that share tags, products or a category with Error Recovery: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Error Recovery?

NoobyGains (a GitHub user) maintains it in NoobyGains/godmode, which has 107 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on March 9, 2026.

Source: NoobyGains/godmode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.