Token导航 LogoToken导航

Agent Skill · 研究检索

error-recovery(错误恢复)

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

error-recovery 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 36,875。

总安装 1,847周安装 74GitHub Stars 6下载 598核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/mgd34msu/goodvibes-plugin --skill error-recovery

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

error-recovery 记录任务执行中的错误模式与恢复尝试,沉淀机构知识。适用于持续改进 Agent 能力,避免重复失败的关键场景。自动分类错误类型,结合多源信息生成解决方案并写入 failures.json。三次尝试未果后升级至协调员,不标记任务为完成。

需区分用户错误与工具故障,优先使用精密工具而非本机 fallback。

来源仓库内路径:skills/error-recovery

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/mgd34msu/goodvibes-plugin --skill error-recove…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

error-recovery 怎么安装?

在终端执行 npx skills add https://github.com/mgd34msu/goodvibes-plugin --skill error-recovery。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

error-recovery 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

error-recovery 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

error-recovery 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

error-recovery 用的人多吗?

公开数据是累计安装 1,847 次,近一周安装 74 次,下载 598 次,GitHub 6 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

error-recovery 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
error-recovery

错误恢复 · 本页

1,8476接触敏感数据未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Resources

scripts/
  validate-error-recovery.sh
references/
  common-errors.md

Error Recovery Protocol

When tasks fail, agents must follow a systematic recovery process that balances efficiency with thoroughness. This skill defines how to categorize errors, leverage institutional memory, apply multi-source recovery strategies, and know when to escalate.

Immediate Response

When an error occurs during task execution:

  1. DO NOT retry blindly. Read the full error message, stack trace, and any diagnostic output.
  2. Categorize the error into one of six types:

- TOOL_FAILURE -- Precision tool or MCP tool returned an error - BUILD_ERROR -- Build/compile command failed (npm, tsc, vite, etc.) - TEST_FAILURE -- Test suite failed (vitest, jest, etc.) - TYPE_ERROR -- TypeScript type checking failed - RUNTIME_ERROR -- Code crashed during execution - EXTERNAL_ERROR -- Third-party service or API failure

  1. Check .goodvibes/memory/failures.json for matching keywords using precision_read:

- Search for keywords from the error message - If a matching failure is found, apply the documented resolution - If the resolution doesn't work, note it and proceed to recovery phases - If not found, proceed directly to recovery phases

Error Categories: Detailed Guidance

TOOL_FAILURE

Common Causes:

  • Wrong file path (absolute vs relative, typo, file doesn't exist)
  • Bad syntax in tool parameters (malformed JSON, incorrect regex)
  • Sandbox blocking external paths
  • Missing required parameters
  • Tool used incorrectly (wrong extract mode, wrong output format)

Recovery Steps:

  1. Re-read the tool's schema and parameter descriptions
  2. Check if the file/path exists using precision_glob
  3. Verify sandbox settings with precision_config get (check sandbox.enabled)
  4. For precision tools, check if you're using the right extract/output mode
  5. Try the operation with minimal parameters first, then add complexity
  6. If precision tool fails repeatedly, check if it's a user error vs actual tool bug:

- User error: wrong params, bad path, misunderstood tool behavior - Tool bug: correct params but tool crashes or returns wrong result

  1. For user errors, fix and retry with precision tools
  2. For tool bugs, use native tool fallback ONLY for that specific operation, then return to precision tools

Common Patterns from Memory:

  • Format/mode mismatch: MCP schema sends output.format, handlers read output.mode. Always check both with ??.
  • Ripgrep glob failures: Patterns like src/**/*.ts fail silently with ripgrep. Use regex to detect literal prefixes and force fast-glob.
  • Path normalization: Ripgrep returns absolute OR relative paths. Always use path.isAbsolute() before path.resolve().
  • Sandbox opt-in: Only enable when sandbox === true || sandbox === 'true'. Never use === false checks.

BUILD_ERROR

Common Causes:

  • Missing dependencies (not installed, wrong version)
  • Type errors not caught during editing
  • Import errors (wrong path, circular dependency)
  • Configuration errors (tsconfig, vite.config, etc.)
  • Environment variable missing

Recovery Steps:

  1. Read the full build output (use precision_exec with expect.exit_code to capture stderr)
  2. Identify the first error in the chain (subsequent errors are often cascading)
  3. For missing deps: Check package.json, run npm install
  4. For type errors: See TYPE_ERROR section below
  5. For import errors: Verify file exists, check import path, look for circular deps
  6. For config errors: Compare with working examples in the codebase
  7. Search first-party docs for the framework/build tool being used

TEST_FAILURE

Common Causes:

  • Wrong test assertions (expected value changed)
  • Missing mocks or stubs
  • Changed API contract (function signature, return type)
  • Test environment not set up correctly
  • Async timing issues

Recovery Steps:

  1. Read the test failure output (assertion error, expected vs actual)
  2. Identify which test file and specific test case failed
  3. Read the test file to understand what it's testing
  4. Read the implementation to see if it matches the test expectations
  5. Determine if the test is wrong or the implementation is wrong:

- If implementation changed intentionally -> update the test - If implementation broke -> fix the implementation

  1. For async issues, check for missing await, improper use of done(), or race conditions
  2. For environment issues, check test setup files (vitest.config, jest.setup.js)

TYPE_ERROR

Common Causes:

  • Unsafe member access (obj.prop where obj could be null/undefined)
  • Type mismatch in assignments (string assigned to number)
  • Wrong function call signature (missing params, wrong types)
  • Unsafe any usage escaping type system
  • Generic constraints violated

Recovery Steps:

  1. Read the TypeScript error message (it includes file, line, and specific type issue)
  2. Use the explain_type_error analysis-engine tool if available
  3. For member access: Add optional chaining (?.) or null check
  4. For assignments: Fix the type at the source or use proper type assertion
  5. For function calls: Check the function signature and provide correct arguments
  6. For any escapes: Replace any with proper types
  7. For generics: Ensure type parameters satisfy constraints

Common Patterns:

  • Add type guards: if (obj && 'prop' in obj)
  • Use optional chaining: obj?.prop?.nestedProp
  • Narrow types with discriminated unions
  • Use type predicates for custom guards

RUNTIME_ERROR

Common Causes:

  • Null/undefined access (property of null, calling undefined as function)
  • Unhandled promise rejections
  • Uncaught exceptions
  • Missing environment variables
  • Network failures (fetch, API calls)
  • File system errors (ENOENT, EACCES)

Recovery Steps:

  1. Read the stack trace to find the exact line that failed
  2. Identify the root cause (null access, missing env var, network, etc.)
  3. For null/undefined: Add runtime checks or use optional chaining
  4. For promises: Add .catch() handlers or try/catch around await
  5. For env vars: Check .env files, verify they're loaded
  6. For network: Add retry logic, check credentials, verify URL
  7. For file system: Verify paths exist, check permissions

Common Patterns:

  • Add error boundaries in React components
  • Use try/catch around all await expressions
  • Validate env vars at startup
  • Add defensive checks: if (!value) throw new Error('...')

EXTERNAL_ERROR

Common Causes:

  • Authentication expired or invalid (401)
  • Rate limit exceeded (429)
  • Service down or unreachable (503, ECONNREFUSED)
  • Invalid API request (400)
  • Quota exceeded

Recovery Steps:

  1. Check the error status code or message
  2. For auth errors (401): Check credentials in .goodvibes/secrets/, verify token hasn't expired
  3. For rate limits (429): Implement exponential backoff, check if quota can be increased
  4. For service down (503): Retry with backoff, check service status page
  5. For bad requests (400): Read API docs, verify request format
  6. For quota: Check usage dashboard, request increase, or wait for reset

Common Patterns:

  • Exponential backoff: 1s, 2s, 4s, 8s
  • Check service status via precision_fetch to status endpoint
  • Rotate API keys if multiple are available
  • Cache responses to reduce API calls

Recovery Strategy: One-Shot Multi-Source

After categorizing the error and checking failures.json, use a one-shot strategy where you consult ALL knowledge sources simultaneously (not sequentially) and apply the best solution:

  1. Internal knowledge -- your training data, codebase patterns (discover, precision_grep, precision_read), GoodVibes memory
  2. First-party docs -- official documentation, API references, changelogs, migration guides
  3. Community knowledge -- Stack Overflow, GitHub Issues, forums
  4. Open internet -- broader web search for edge cases

Applying the Best Solution

Once you've consulted all sources:

  1. Evaluate solutions based on:

- Recency (prefer solutions from similar versions) - Authority (official docs > community > random blog) - Specificity (exact error match > general guidance) - Project fit (matches your stack and patterns)

  1. Apply the solution completely:

- Don't half-apply a fix - Make all related changes at once - Use precision_edit for changes, not incremental tweaks

  1. Validate the fix:

- Re-run the failing operation - Run related tests with precision_exec - Check for new errors introduced

After Resolution

Once you've successfully resolved the error:

1. Log to .goodvibes/memory/failures.json

Use precision_edit to append a new entry with:

{
  "id": "fail_YYYYMMDD_HHMMSS",
  "date": "ISO-8601 timestamp",
  "error": "Brief description of the error",
  "context": "What was being attempted when error occurred",
  "root_cause": "Why it happened (technical explanation)",
  "resolution": "How it was fixed (specific steps taken)",
  "prevention": "How to avoid this in the future",
  "keywords": ["relevant", "search", "terms"]
}

Example:

{
  "id": "fail_20260215_143000",
  "date": "2026-02-15T14:30:00Z",
  "error": "precision_read returns 'file not found' for valid path",
  "context": "Reading component file at src/components/Button.tsx",
  "root_cause": "Path was relative, but precision tools require absolute paths. Sandbox was enabled, blocking CWD resolution.",
  "resolution": "RESOLVED - Used absolute path with process.cwd() to create absolute path before calling precision_read.",
  "prevention": "Always use absolute paths with precision tools. Use path.resolve() to convert relative to absolute.",
  "keywords": ["precision_read", "path", "absolute", "relative", "sandbox", "file-not-found"]
}

2. Log to .goodvibes/logs/errors.md

Append a markdown entry using precision_edit:

## [YYYY-MM-DD HH:MM] ERROR_CATEGORY: Brief Description

**Error**: Full error message

**Context**: What was being done

**Resolution**: How it was fixed

**Time to resolve**: X minutes

---

3. Continue with the task

Once logged, return to the original task. Don't wait for confirmation.

After Max Attempts (3 attempts)

If you've tried to fix the error 3 times and it's still failing:

1. Log the unresolved failure

Add to failures.json with "resolution": "UNRESOLVED - <what was tried>":

{
  "id": "fail_20260215_143500",
  "date": "2026-02-15T14:35:00Z",
  "error": "Vitest tests hang indefinitely on CI",
  "context": "Running npm run test in CI pipeline",
  "root_cause": "Unknown - tests pass locally but hang in CI environment",
  "resolution": "UNRESOLVED - Tried: 1) Added --no-watch flag, 2) Increased timeout to 60s, 3) Disabled coverage collection. Tests still hang.",
  "prevention": "Need deeper investigation into CI environment differences",
  "keywords": ["vitest", "ci", "hang", "timeout", "unresolved"]
}

2. Report to orchestrator

Use structured format in your response:

## Task Status: BLOCKED

### Error
[ERROR_CATEGORY] Brief description

### Attempts Made
1. **Attempt 1**: What was tried -> Result
2. **Attempt 2**: What was tried -> Result
3. **Attempt 3**: What was tried -> Result

### Root Cause Analysis
Best guess at why this is failing based on investigation.

### Suggested Next Steps
- Option 1: [Describe approach that requires different permissions/access]
- Option 2: [Describe alternative architecture/design decision]
- Option 3: [Describe manual intervention needed]

### Files Changed
- `path/to/file.ts` - [what was changed during troubleshooting]

3. Do NOT mark task as complete

Leave the task in BLOCKED state. The orchestrator will decide whether to:

  • Escalate to user
  • Try a different approach
  • Assign to a different agent with different capabilities
  • Defer the task

Immediate Escalation (Skip Recovery)

For certain error types, do NOT attempt recovery. Escalate immediately to the orchestrator:

1. Permission Errors

EACCES: permission denied
EPERM: operation not permitted

Why: These require user intervention to grant permissions. Agents can't fix this.

Escalate with: "Permission error encountered. Need user to: [grant file access / run as sudo / change ownership]."

2. Missing Credentials/Secrets

Error: OPENAI_API_KEY is not defined
Error: Database connection failed: authentication error
401 Unauthorized

Why: Agents can't create or modify secrets. Only users can provide credentials.

Escalate with: "Missing credential: [ENV_VAR_NAME or service name]. User needs to provide via.env or secrets management."

3. Architectural Ambiguity

Context clues indicate multiple valid approaches:
- Use REST API vs GraphQL
- Use Prisma vs Drizzle
- Component composition pattern unclear

Why: These are design decisions that affect the broader system. Agents shouldn't make architectural choices unilaterally.

Escalate with: "Architectural decision required: [describe the choice]. Options: [list 2-3 options with tradeoffs]."

4. Scope Change Discovered

Original task: "Add user profile page"
Discovered: Requires new database schema, auth changes, API endpoints

Why: The task is larger than originally scoped. Orchestrator needs to re-plan.

Escalate with: "Scope expansion discovered. Original: [task]. Required: [new dependencies/changes]. Recommend: [break into subtasks / get user approval]."

Summary

When errors occur:

  1. Categorize immediately (TOOL_FAILURE, BUILD_ERROR, etc.)
  2. Check failures.json for known patterns
  3. Use one-shot multi-source recovery (internal + docs + community + web)
  4. Apply the best solution completely
  5. Log resolution to failures.json and errors.md
  6. Continue with task

After 3 attempts:

  1. Log as UNRESOLVED
  2. Report to orchestrator with structured summary
  3. Do NOT mark task complete

Escalate immediately for:

  1. Permission errors
  2. Missing credentials
  3. Architectural ambiguity
  4. Scope changes

Remember:

  • Precision tools are the default, native tools are the fallback
  • User error!= tool failure
  • Recovery attempts should be systematic, not random
  • Memory is institutional knowledge -- use it and contribute to it

平台分布

Codex

37.17%
按下载量换算222

Claude

30.65%
按下载量换算183

Cursor

16.45%
按下载量换算98

Gemini CLI

8.89%
按下载量换算53

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills