跳到正文
Skillpedia
部署与云(DevOps)48k · #6004

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/tool-use-guardian/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

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.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#6004
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能