跳到正文
Skillpedia
通用编程48k · #3683

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

可直接粘贴的消息

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

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

repo: sickn33/agentic-awesome-skills

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能