Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计未展示

error-recovery错误恢复

Agent Skill

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

总安装

4,903

周安装

139

GitHub Stars

公开资料未说明

下载量

1,255
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add zpankz/mcp-skillset --skill "error-recovery"

简介

用于记录任务执行中的错误、用户纠正和经验缺口,帮助持续优化 Agent 表现。

  • 适合在希望让 Agent 沉淀问题修正和最佳实践时使用。
  • 可结合来源仓库和 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网或文件读写。
  • 安装方式:github;适用宿主:Codex、Claude、Cursor、Gemini CLI。

SKILL.md

name
Error Recovery
description
Comprehensive error handling methodology with 13-category taxonomy, diagnostic workflows, recovery patterns, and prevention guidelines. Use when error rate >5%, MTTD/MTTR too high, errors recurring, need systematic error prevention, or building error handling infrastructure. Provides error taxonomy (file operations, API calls, data validation, resource management, concurrency, configuration, dependency, network, parsing, state management, authentication, timeout, edge cases - 95.4% coverage), 8 diagnostic workflows, 5 recovery patterns, 8 prevention guidelines, 3 automation tools (file path validation, read-before-write check, file size validation - 23.7% error prevention). Validated with 1,336 historical errors, 85-90% transferability across languages/platforms, 0.79 confidence retrospective validation.
allowed-tools
Read, Write, Edit, Bash, Grep, Glob

Error Recovery

Systematic error handling: detection, diagnosis, recovery, and prevention.

Errors are not failures - they're opportunities for systematic improvement. 95% of errors fall into 13 predictable categories.

When to Use This Skill

Use this skill when:

  • 📊 High error rate: >5% of operations fail
  • ⏱️ Slow recovery: MTTD (Mean Time To Detect) or MTTR (Mean Time To Resolve) too high
  • 🔄 Recurring errors: Same errors happen repeatedly
  • 🎯 Building error infrastructure: Need systematic error handling
  • 📈 Prevention focus: Want to prevent errors, not just handle them
  • 🔍 Root cause analysis: Need diagnostic frameworks

Don't use when:

  • ❌ Error rate <1% (handling ad-hoc sufficient)
  • ❌ Errors are truly random (no patterns)
  • ❌ No historical data (can't establish taxonomy)
  • ❌ Greenfield project (no errors yet)

Quick Start (20 minutes)

Step 1: Quantify Baseline (10 min)

# For meta-cc projects
meta-cc query-tools --status error | jq '. | length'
# Output: Total error count

# Calculate error rate
meta-cc get-session-stats | jq '.total_tool_calls'
echo "Error rate: errors / total * 100"

# Analyze distribution
meta-cc query-tools --status error | \
  jq -r '.error_message' | \
  sed 's/:.*//' | sort | uniq -c | sort -rn | head -10
# Output: Top 10 error types

Step 2: Classify Errors (5 min)

Map errors to 13 categories (see taxonomy below):

  • File operations (12.2%)
  • API calls, Data validation, Resource management, etc.

Step 3: Apply Top 3 Prevention Tools (5 min)

Based on bootstrap-003 validation:

  1. File path validation (prevents 12.2% of errors)
  2. Read-before-write check (prevents 5.2%)
  3. File size validation (prevents 6.3%)

Total prevention: 23.7% of errors


13-Category Error Taxonomy

Validated with 1,336 errors (95.4% coverage):

1. File Operations (12.2%)

  • File not found, permission denied, path validation
  • Prevention: Validate paths before use, check existence

2. API Calls (8.7%)

  • HTTP errors, timeouts, invalid responses
  • Recovery: Retry with exponential backoff

3. Data Validation (7.5%)

  • Invalid format, missing fields, type mismatches
  • Prevention: Schema validation, type checking

4. Resource Management (6.3%)

  • File handles, memory, connections not cleaned up
  • Prevention: Defer cleanup, use resource pools

5. Concurrency (5.8%)

  • Race conditions, deadlocks, channel errors
  • Recovery: Timeout mechanisms, panic recovery

6. Configuration (5.4%)

  • Missing config, invalid values, env var issues
  • Prevention: Config validation at startup

7. Dependency Errors (5.2%)

  • Missing dependencies, version conflicts
  • Prevention: Dependency validation in CI

8. Network Errors (4.9%)

  • Connection refused, DNS failures, proxy issues
  • Recovery: Retry, fallback to alternative endpoints

9. Parsing Errors (4.3%)

  • JSON/XML parse failures, malformed input
  • Prevention: Validate before parsing

10. State Management (3.7%)

  • Invalid state transitions, missing initialization
  • Prevention: State machine validation

11. Authentication (2.8%)

  • Invalid credentials, expired tokens
  • Recovery: Token refresh, re-authentication

12. Timeout Errors (2.4%)

  • Operation exceeded time limit
  • Prevention: Set appropriate timeouts

13. Edge Cases (1.2%)

  • Boundary conditions, unexpected inputs
  • Prevention: Comprehensive test coverage

Uncategorized: 4.6% (edge cases, unique errors)


Eight Diagnostic Workflows

1. File Operation Diagnosis

  1. Check file existence
  2. Verify permissions
  3. Validate path format
  4. Check disk space

2. API Call Diagnosis

  1. Verify endpoint availability
  2. Check network connectivity
  3. Validate request format
  4. Review response codes

3-8. (See reference/diagnostic-workflows.md for complete workflows)


Five Recovery Patterns

1. Retry with Exponential Backoff

Use for: Transient errors (network, API timeouts)

for i := 0; i < maxRetries; i++ {
    err := operation()
    if err == nil {
        return nil
    }
    time.Sleep(time.Duration(math.Pow(2, float64(i))) * time.Second)
}
return fmt.Errorf("operation failed after %d retries", maxRetries)

2. Fallback to Alternative

Use for: Service unavailability

3. Graceful Degradation

Use for: Non-critical functionality failures

4. Circuit Breaker

Use for: Cascading failures prevention

5. Panic Recovery

Use for: Unhandled runtime errors

See reference/recovery-patterns.md for complete patterns.


Eight Prevention Guidelines

  1. Validate inputs early: Check before processing
  2. Use type-safe APIs: Leverage static typing
  3. Implement pre-conditions: Assert expectations
  4. Defensive programming: Handle unexpected cases
  5. Fail fast: Detect errors immediately
  6. Log comprehensively: Capture error context
  7. Test error paths: Don't just test happy paths
  8. Monitor error rates: Track trends over time

See reference/prevention-guidelines.md.


Three Automation Tools

1. File Path Validator

Prevents: 12.2% of errors (163/1,336) Usage: Validate file paths before Read/Write operations Confidence: 93.3% (sample validation)

2. Read-Before-Write Checker

Prevents: 5.2% of errors (70/1,336) Usage: Verify file readable before writing Confidence: 90%+

3. File Size Validator

Prevents: 6.3% of errors (84/1,336) Usage: Check file size before processing Confidence: 95%+

Total prevention: 317 errors (23.7%) with 0.79 overall confidence

See scripts/ for implementation.


Proven Results

Validated in bootstrap-003 (meta-cc project):

  • ✅ 1,336 errors analyzed
  • ✅ 13-category taxonomy (95.4% coverage)
  • ✅ 23.7% error prevention validated
  • ✅ 3 iterations, 10 hours (rapid convergence)
  • ✅ V_instance: 0.83
  • ✅ V_meta: 0.85
  • ✅ Confidence: 0.79 (high)

Transferability:

  • Error taxonomy: 95% (errors universal across languages)
  • Diagnostic workflows: 90% (process universal, tools vary)
  • Recovery patterns: 85% (patterns universal, syntax varies)
  • Prevention guidelines: 90% (principles universal)
  • Overall: 85-90% transferable

Related Skills

Parent framework:

Acceleration used:

Complementary:


References

Core methodology:

Automation:

Examples:


Status: ✅ Production-ready | 1,336 errors validated | 23.7% prevention | 85-90% transferable

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

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

平台分布

OpenCode

28.89%
按下载量换算363

Claude Code

21.37%
按下载量换算268

windsurf

19.18%
按下载量换算241

Codex

12.12%
按下载量换算152

kiro-cli

8.07%
按下载量换算101

mcpjam

3.25%
按下载量换算41

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills