Token导航 LogoToken导航TokenDH.com
开发只读github未标认证来源可访问许可证需确认审计通过

error-recovery错误恢复

Agent Skill

error-recovery 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

267

周安装

11

GitHub Stars

24

下载量

87
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:error-recovery(错误恢复)
来源仓库:https://github.com/noobygains/godmode
仓库路径:skills/error-recovery
安装命令:
npx skills add https://github.com/noobygains/godmode --skill error-recovery
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/noobygains/godmode --skill error-recovery

简介

error-recovery 用于记录任务执行中的错误和经验缺口,帮助 Agent 持续改进能力。

  • 适用于 Codex、Claude、Cursor 和 Gemini CLI,适合沉淀问题修正和最佳实践。
  • 可通过 GitHub 仓库和原始 README 继续核验具体实现方式。
  • 安装前应确认权限范围和维护状态,避免触发不必要的命令执行。
  • 建议在可控环境中测试后再集成到主工作流中。

SKILL.md

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

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.

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.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.65%
按下载量换算32

Claude

28.17%
按下载量换算25

Cursor

19.66%
按下载量换算17

Gemini CLI

8.8%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills