- Home
- Skills
- Agents & Orchestration
- 加固工具调用协议 · Tool Protocol Hardener
加固工具调用协议 · Tool Protocol Hardener
审计并加固 Agent 工具调用协议:参数、返回结构、异常处理与绕过风险逐项检查,输出拦截/放行清单。
$7
Works with the AI tools you already use
加固工具调用协议 · Tool Protocol Hardener
Example session with this skill installed
帮我们审计一个「订单查询」工具的调用协议,在 ChatGPT 自定义 GPT 里用。工具参数:order_id(string,必填)、include_pii(boolean,可选)。返回:订单 JSON,含 customer_name、phone、address。要求:先给结论,再说风险和怎么加固,输出要能让运营同事看懂。
- Read your context and instructions
- Compiled the tool protocol hardener
- Generated the UI component
结论:协议「不建议按现状上线」,主要风险有 2 个:include_pii 默认放开敏感字段、缺少权限校验说明。修好这两点即可上线,改动约 10 分钟。
| 检查项 | 现状 | 评级 | 说明 |
|---|---|---|---|
| 参数命名 | order_id / include_pii | 通过 | 命名清晰,无歧义 |
| 类型约束 | string / boolean | 通过 | 类型明确 |
| 必填性 | order_id 必填 | 通过 | 描述已注明 |
| 敏感数据 | 默认返回姓名电话地址 | 高风险 | 默认含 PII,建议默认 false |
| 权限校验 | 未说明调用方身份校验 | 高风险 | 需注明仅限本人订单 |
| 错误码 | 未定义 | 中风险 | 补充 404/403/429 映射 |
| 幂等性 | 查询操作 | 低风险 | 天然幂等,无需处理 |
加固清单
- 拦截:include_pii 默认改为 false,仅当用户明确要求时开启。
- 拦截:在协议 description 里写明「仅允许查询当前会话用户本人的订单」,并加后端校验。
- 放行:错误码表补 404(订单不存在)、403(无权查询)、429(限流),并给运营一句话话术。
- 放行:返回字段对 customer_name 做脱敏(如 王**)。
下一步
- 按拦截项改完协议后,用 3 个用例回归:本人订单、他人订单、不存在的订单。
- 上线前让安全同事复核一次 include_pii 的开关逻辑。
- 给运营配一张错误码速查表,客服按话术回复。
tool-protocol-hardener.tsx
TSX · React component
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
它解决什么问题
Agent 的工具调用协议写得含糊,轻则参数对不上、调用总失败,重则被提示注入绕过,把不该开放的动作暴露出去。这个技能把「能跑就行」的工具定义变成可审计的协议:逐项检查参数、返回结构、异常处理与安全边界,先给结论,再给证据与加固建议。
这个技能做什么
围绕工具调用协议提供结构化审计与加固能力:先澄清工具的用途、调用方与安全边界,再按参数命名、类型约束、返回结构、错误码、幂等性与绕过风险逐项检查,输出一份结论先行的审计报告,附可直接落地的加固清单(拦截项/放行项)与修改后的协议片段。
为什么比裸提示词强
- 内嵌安全红线:注入绕过、权限越界、敏感数据回传逐项排查
- 结论先行:先给「能否上线」的判断,再给证据与改法
- 输出可直接落地的拦截/放行清单,而不是泛泛而谈
- 不确定的信息标「待确认」,不编造协议细节
典型用例
- 上线新的自定义 GPT 前,审计工具定义是否安全
- Agent 调用频繁失败,排查协议里的参数与错误处理问题
- 给非技术成员讲解一个工具协议到底怎么工作
- 审计存量 API 交互协议的清晰度与风险
局限
审计基于你提供的协议文本,不接入真实运行时;涉及生产权限的工具,请在上线前做一次人工复核与压测。
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- Passed all security checks, Safe to install