agent-tool-builder
它能做什么
这个智能体可以帮你创建“工具”,让其他 AI 能够可靠地与外部世界交互。它会教你如何正确设计这些工具,避免出错,也避免不必要的成本。
适用场景
- ✓你希望 AI 调用外部工具来获取信息时。
- ✓需要定义 AI 应该如何与某项服务或数据交互时。
- ✓想确保为 AI 创建的工具运行良好、不会频繁出错时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/agent-tool-builder/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我该如何创建一个工具,让 AI 告诉我某个城市的天气?”
每周 5 个新技能,1 分钟读完。
工作原理
它会教你如何描述 AI 将要使用的工具,重点是解释工具的作用,以及它需要哪些信息。对 AI 来说,描述比代码本身更重要,因为 AI 读取的正是这些描述。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Agent Tool Builder
Tools are how AI agents interact with the world. A well-designed tool is the difference between an agent that works and one that hallucinates, fails silently, or costs 10x more tokens than necessary.
This skill covers tool design from schema to error handling. JSON Schema best practices, description writing that actually helps the LLM, validation, and the emerging MCP standard that's becoming the lingua franca for AI tools.
Key insight: Tool descriptions are more important than tool implementations. The LLM never sees your code - it only sees the schema and description.
Detailed Guide
Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
Python Example
""" import anthropic from anthropic import beta_tool
client = anthropic.Anthropic()
@beta_tool def get_weather(location: str, unit: str = "fahrenheit") -> str: '''Get the current weather in a given location.
Args:
location: The city and state, e.g. San Francisco, CA
unit: Temperature unit, either 'celsius' or 'fahrenheit'
'''
# Implementation
return json.dumps({"temperature": "72°F", "conditions": "Sunny"})
@beta_tool def search_web(query: str) -> str: '''Search the web for information.
Args:
query: The search query
'''
# Implementation
return json.dumps({"results": [...]})
Tool runner handles the loop
runner = client.beta.messages.tool_runner( model="claude-sonnet-4-5", max_tokens=1024, tools=[get_weather, search_web], messages=[ {"role": "user", "content": "What's the weather in Paris?"} ] )
Process each message
for message in runner: print(message.content[0].text)
Or just get final result
final = runner.until_done() """
When to Use
- User mentions or implies: agent tool
- User mentions or implies: function calling
- User mentions or implies: tool schema
- User mentions or implies: tool design
- User mentions or implies: mcp server
- User mentions or implies: mcp tool
- User mentions or implies: tool use
- User mentions or implies: build tool for agent
- User mentions or implies: define function
- User mentions or implies: input_schema
- User mentions or implies: tool_use
- User mentions or implies: tool_result
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 并不会直接看到你的代码,它是通过工具的描述和“schema”(数据结构定义)来理解工具的。好的描述能正确引导 AI。
什么是“schema”?
它就像一张地图,定义了工具所使用或返回的数据结构,确保数据有条理,并且能被 AI 正确理解。
“hallucinate”和“fail silently”是什么意思?
这是 AI 可能犯的两类错误。“hallucinate”指 AI 编造信息;“fail silently”指工具没有按预期工作,但 AI 没有提示这个问题。
详情
作者的原始描述
Tools are how AI agents interact with the world. A well-designed tool is the difference between an agent that works and one that hallucinates, fails silently, or costs 10x more tokens than necessary. This skill covers tool design from schema to error handling.
热度
- GitHub 星标
- 48k
- 排名
- #3683
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。