返回顶部
热门问答 更多热门问答
技术文章 更多技术文章

Anthropic 官方开源 Skills:Claude 智能体开发的“标准答案”

[复制链接]
链载Ai 显示全部楼层 发表于 昨天 17:13 |阅读模式 打印 上一主题 下一主题


ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">做 Agent 开发的朋友应该都有过这种抓狂时刻:模型明明很强,但一让它调 API 或者读本地文件,就开始各种“胡言乱语”或者参数填不对。

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">是为了这个写一堆复杂的正则去兜底?还是在 Prompt 里写死各种if-else

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">最近 Anthropic 悄悄在 GitHub 上开源了一个叫skills的库。我看了一圈代码,觉得这东西不仅仅是个工具库,它其实是 Claude 官方给出的Agent 开发最佳实践。今天《云栈开源日记》就带大家拆解一下,大厂是怎么优雅解决“工具调用”难题的。

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">到底什么是 Agent Skills?

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">简单说,这就是 Claude 的“外挂包”。

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">以前我们写工具调用(Tool Use),往往只关注 Python/TypeScript 代码怎么写。但这个库通过实战告诉我们:写给 AI 看的说明书,和代码逻辑一样重要

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">它把每个“技能”拆成了两部分:

  1. 干活的代码:实际处理业务逻辑的脚本。
  2. SKILL.md:这是核心,一套专门写给 AI 看的接口定义。

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">这种把“怎么做”和“怎么用”完全剥离的思路,其实就是非常经典的后端架构解耦思想,维护起来非常舒服。

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">为什么说 SKILL.md 是神来之笔?

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;">我在云栈社区里常跟大伙聊,现在的程序员得有“双语”能力——既要写给机器跑,又要写给模型看。

这个项目最大的价值就在SKILL.md。它不是那种给人看的 API 文档,而是专门喂给 LLM 的结构化数据。它用非常清晰的 XML 或 Markdown 格式告诉 Claude:

  • “我是什么工具?”
  • “我在什么场景下能帮你?”
  • “我的参数有哪些约束?”

这就好比给模型装了个“防呆接口”,极大降低了 AI 瞎编参数(幻觉)的概率。

拿来就能用的实战案例

仓库里有几个现成的例子特别好使,建议 clone 下来直接读源码:

  • Excel 分析师 (xlsx): 它不光是读 Excel,还能让 Claude 理解表头结构、自己写公式筛选数据。做数据分析 Agent 的同学,直接抄作业就行。
  • 自我进化 (skill-creator): 这个有点意思,它是一个“元技能”,能让 Claude 自己编写新的工具代码。这不就是人工智能领域一直想做的“自我进化”雏形吗?

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

链载AI是专业的生成式人工智能教程平台。提供Stable Diffusion、Midjourney AI绘画教程,Suno AI音乐生成指南,以及Runway、Pika等AI视频制作与动画生成实战案例。从提示词编写到参数调整,手把手助您从入门到精通。
  • 官方手机版

  • 微信公众号

  • 商务合作

  • Powered by Discuz! X3.5 | Copyright © 2025-2025. | 链载Ai
  • 桂ICP备2024021734号 | 营业执照 | |广西笔趣文化传媒有限公司|| QQ