tool-use-guardian
它能做什么
这是一个帮助确保 AI 所用工具正常运行的助手。它会重试失败的调用,修复损坏的响应,并记录哪些工具不可靠。
适用场景
- ✓工具返回的数据不完整或格式错误时。
- ✓工具响应过慢或暂时被阻止时。
- ✓一连串任务在中途失败时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/tool-use-guardian/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“天气查询工具返回了错误,请帮我重新调用一次。”
每周 5 个新技能,1 分钟读完。
工作原理
在使用工具之前,它会先检查各项内容是否正确。如果工具调用失败,它会尝试修复问题或重新调用,并从错误中吸取经验,防止以后再出现同样的问题。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Tool Use Guardian
Overview
The reliability wrapper every AI agent needs. Monitors tool calls, auto-retries failures, fixes truncated responses, and learns which tools are unreliable — so you never lose your chain of thought.
Free forever. Built by the Genesis Agent Marketplace.
Install
npx skills add christopherlhammer11-ai/tool-use-guardian
When to Use This Skill
- Use when tool calls return truncated or malformed JSON
- Use when APIs timeout or rate-limit your agent mid-task
- Use when a multi-step chain breaks partway through
- Use when you need automatic retry logic without writing it yourself
- Use for any agent workflow that depends on external tool reliability
How It Works
Step 1: Pre-Call Validation
Before every tool call, Guardian validates:
- Required parameters are present and correctly typed
- The tool is not marked as "unreliable" from previous failures
- Request size is within known limits
Step 2: Failure Classification
When a tool call fails, Guardian classifies the failure into one of 9 categories:
| Failure Type | Recovery Action |
|---|---|
| Truncated JSON | Re-fetch with pagination or smaller chunks |
| API Timeout | Retry once with simpler request, then decompose |
| Rate Limit (429) | Exponential backoff, max 3 retries |
| Auth Expired | Flag for user intervention |
| Mid-chain Break | Resume from last successful checkpoint |
| Error-as-200 | Detect {"error": "..."} disguised as success |
| Schema Mismatch | Attempt auto-coercion, warn if lossy |
| Network Failure | Retry with jitter, max 2 attempts |
| Unknown Error | Log full context, escalate to user |
Step 3: Chain Protection
For multi-step tool chains, Guardian maintains checkpoints. If step 4 of 7 fails, it resumes from step 4 — never restarts from scratch.
Step 4: Learning
Guardian tracks failure patterns per tool. After 3+ failures of the same type, it marks the tool as unreliable and suggests alternatives.
Best Practices
- ✅ Let Guardian wrap all external tool calls automatically
- ✅ Review Guardian's reliability reports to identify flaky tools
- ✅ Use checkpoint recovery for long chains
- ❌ Don't disable retry logic for rate-limited APIs
- ❌ Don't ignore repeated failure warnings
Related Skills
@recallmax- Long-context memory enhancement (also free from Genesis Marketplace)
Links
- Repo: https://github.com/christopherlhammer11-ai/tool-use-guardian
- Marketplace: https://genesis-node-api.vercel.app
- Browse skills: https://genesis-marketplace.vercel.app
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题
如果工具调用失败会怎样?
它会尝试修复响应、重新调用工具,或者判断该工具不可靠,并建议改用其他工具。
什么是“思维链”?
指 AI 完成任务时所遵循的一系列步骤。如果其中一步失败,AI 就可能“迷失方向”。这个助手能帮助这些步骤顺利进行下去。
使用它安全吗?
安全。它的设计目的是让 AI 与其他工具的交互更加可靠、更有保障。
详情
作者的原始描述
FREE — Intelligent tool-call reliability wrapper. Monitors, retries, fixes, and learns from tool failures. Auto-recovers from truncated JSON, timeouts, rate limits, and mid-chain failures.
热度
- GitHub 星标
- 48k
- 排名
- #6004
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。