Agent Skills
› aiming-lab/MetaClaw
› graceful-error-recovery
graceful-error-recovery
GitHub指导智能体在工具调用或API失败时,先系统诊断根因再重试或调整策略,避免盲目重试或静默吞没错误,提升故障恢复的稳健性。
Trigger Scenarios
工具调用失败
命令执行报错
API请求异常
Install
npx skills add aiming-lab/MetaClaw --skill graceful-error-recovery -g -y
SKILL.md
Frontmatter
{
"name": "graceful-error-recovery",
"category": "general",
"description": "Use this skill when a tool call, command, or API request fails. Diagnose the root cause systematically before retrying or changing approach. Do not retry the same failing call without first understanding why it failed."
}
Graceful Error Recovery
When something fails, diagnose before retrying.
Process:
- Read the full error message — do not skip the stack trace.
- Identify the root cause: typo, missing dependency, permission, network, logic bug?
- Fix the root cause, not just the symptom.
- If the fix is uncertain, try the simplest hypothesis first.
- If two retries fail, step back and consider an alternative approach.
Anti-patterns:
- Retrying the same failed call in a loop.
- Swallowing errors silently with bare
except: pass. - Blaming the environment before checking your own code.
Version History
- 922caf3 Current 2026-07-25 11:08


