error-recovery-patterns
Skill0 starsChanged 3 months agoMITView on GitHub
故障恢复模式:分层恢复策略+预判规避+降级链路。从"拦截+重试"到"韧性系统
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- github/gh-awtheir own version, first seen May 27, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- github/gh-aw★ 5.3ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository219 other files it gives its agents.
- agent-doctrineSkill
- agent-evaluation-frameworkSkill
- agent-visualization-flintSkill
- hermes-agentSkill
- bailian-cliSkill
- edge-browser-automationSkill
- computer-useSkill
- jupyter-live-kernelSkill
- backup-strategiesSkill
- browser-automationSkill
- chinese-ai-free-apiSkill
- cicd-pipeline-templatesSkill
- copybaraSkill
- devops-toolkitSkill
- email-deliverabilitySkill
- monitoring-observabilitySkill
- obsidian-maintenanceSkill
- obsidian-troubleshootingSkill
- openclaw-windowsSkill
- openclaw-workerSkill
- webhook-subscriptionsSkill
- windows-dev-environmentSkill
- windows-masterSkill
- zero-downtime-deploySkill
- codebase-inspectionSkill
- github-workflowSkill
- adaptive-communicationSkill
- agent-cost-dashboardSkill
- agent-evolutionSkill
- agent-governanceSkill
- agent-osSkill
- context-efficient-toolsSkill
- context-loss-awarenessSkill
- creative-synthesisSkill
- hermes-desktop-pluginsSkill
- emotional-intelligenceSkill
- graph-engineering-workflowSkill
- hermes-maintenanceSkill
- hermes-voiceSkill
- hermes-hygieneSkill
- identity-coreSkill
- income-loopSkill
- master-synthesisSkill
- meta-cognitionSkill
- reasoning-engineSkill
- self-preservationSkill
- teaching-abilitySkill
- temporal-awarenessSkill
- hermes-themesSkill
- thinking-visualizationSkill
- user-modelingSkill
- voice-full-restoreSkill
- knowledge-graph-traversalSkill
- mcp-browser-canvasSkill
- free-api-gatewaySkill
- native-mcpSkill
- web-reverse-apiSkill
- ai-edaSkill
- huggingface-hubSkill
- industrial-ai-siemens-mcpSkill
- The first 60 shown.
The file
Files
Error Recovery Patterns — 故障恢复模式
safety-shield 负责拦截,error-recovery 负责恢复。一个是盾,一个是急救包。
一、分层恢复策略
| 层级 | 故障类型 | 恢复策略 | 示例 |
| L0 重试 | 瞬时故障(网络波动、临时超时) | 等2s→重试 ×3 | API调用超时 |
| L1 降级 | 服务不可用(API挂了、MCP崩了) | 切换到备选方案 | 即梦API→替代方案 |
| L2 回退 | 操作失败(文件写坏、git冲突) | 回滚到操作前状态 | config.yaml改坏了 |
| L3 熔断 | 连续失败(同服务3次失败) | 暂停该服务5分钟 | 某个MCP一直403 |
| L4 人工 | 无法自动恢复(逻辑错误、数据丢失) | 清晰报告+建议 | 不确定怎么修 |
二、预判规避
在执行前预测可能故障,提前准备恢复方案:
操作: 修改config.yaml
预判: 格式错误 → 先备份 → yaml验证 → 改 → 验证
操作: 调用即梦API
预判: 超时/限流 → 设30s超时 → 3次重试 → 降级到本地生成
操作: git merge
预判: 冲突 → 先fetch → 预检测冲突 → 有冲突先报告三、降级链路
每个关键操作都要有降级方案:
| 主方案 | 降级1 | 降级2 | 最后手段 |
| GitHub API | ghfast.top镜像 | gh-proxy.com | 告诉用户手动查 |
| 即梦API | 本地FFmpeg生成 | 静态图替代 | 跳过视频 |
| pip install | 清华镜像 | 阿里云镜像 | 手动下载whl |
| MCP server | Gateway热重载 | 重启server | 直连替代 |
四、恢复日志
{
"operation": "config.yaml edit",
"predicted_risks": ["YAML格式错误", "缩进不对"],
"precautions": ["备份", "yaml验证"],
"actual_failure": "缩进错误",
"recovery": "回退到备份→重新编辑",
"lesson": "改config.yaml前必须先yaml验证"
}恢复日志→3次同一模式→升级到safety-shield禁止列表。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

