Claude Agent Skills Explained

章节 1:Agent Skills 的定义与技术实现机制

📝 本节摘要

演讲者 Otto 首先介绍了 "Agent Skills"(代理技能)的概念,将其定义为可移植的专业知识包。随后,他详细解释了其技术实现方式:通过“渐进式披露”(progressive disclosure)机制,在启动时仅加载技能描述以节省 Token,待触发后再动态加载完整内容,从而在不占用大量上下文窗口的前提下赋予 Claude 复杂的专业能力。

[原文] [Otto]: hi my name is Otto and in this video we're going to discuss agent skills

[译文] [Otto]: 嗨,我是 Otto,在这个视频中我们将讨论代理技能(agent skills)。

[原文] [Otto]: agents today are pretty intelligent but they don't always have the domain expertise you need for real work and skills help solve this

[译文] [Otto]: 如今的代理(Agents)已经相当智能,但它们往往缺乏你在实际工作所需的领域专业知识,而“技能”正是为了解决这个问题。

[原文] [Otto]: you can think of skills as organized folders that package expertise that Cloud can automatically invoke when relevant to the task at hand

[译文] [Otto]: 你可以将技能想象成打包了专业知识的整理好的文件夹,当与手头的任务相关时,Claude 可以自动调用它们。

[原文] [Otto]: and most importantly these skills are portable across cloud code the API as well as cla.ai

[译文] [Otto]: 最重要的是,这些技能在 Claude code、API 以及 claude.ai 之间是可移植的。

[原文] [Otto]: and the way skills work is at startup only the name and description of every installed skill is loaded in the system prompt

[译文] [Otto]: 技能的工作原理是,在启动时,系统提示词(system prompt)中仅加载每个已安装技能的名称和描述。

[原文] [Otto]: this is going to consume about 30 to 50 tokens per skill and make Claude aware of the skill's existence

[译文] [Otto]: 这每个技能大约会消耗 30 到 50 个 Token,主要是为了让 Claude 知道该技能的存在。

[原文] [Otto]: then when a user prompt matches a skills description Claude is going to dynamically load the full skill.md file into context

[译文] [Otto]: 然后,当用户的提示词与某个技能的描述相匹配时,Claude 会动态地将完整的 skill.md 文件加载到上下文中。

[原文] [Otto]: and finally if the skill references other files or scripts they are also progressively loaded and run as needed

[译文] [Otto]: 最后,如果该技能引用了其他文件或脚本,它们也会根据需要被渐进式地加载和运行。

[原文] [Otto]: this progressive disclosure allows you to install many different skills to perform complex tasks without bloating your context window

[译文] [Otto]: 这种“渐进式披露”(progressive disclosure)允许你安装许多不同的技能来执行复杂的任务,而不会导致你的上下文窗口变得臃肿。

章节 2:Skills 与 Claude.md 及 MCP 的差异化定位

📝 本节摘要

本节重点对比了 Skills 与 Claude 生态中其他功能的区别。Otto 指出,Claude.md 用于定义特定项目的上下文(如技术栈),而 Skills 则是可跨项目复用的通用专业知识(如前端设计规范)。同时,他区分了 MCP(模型上下文协议)与 Skills 的关系:MCP 负责连接数据源,而 Skills 教导 Claude 如何处理这些数据。

[原文] [Otto]: but let's see how skills fit in with the other Claude features

[译文] [Otto]: 不过,让我们看看技能是如何与 Claude 的其他功能相融合的。

[原文] [Otto]: while skills teach Claude how to do specialized tasks Claude.md files tell Claude about the specific project things like your text stack coding conventions and repo structure

[译文] [Otto]: 虽然技能教会 Claude 如何执行专门的任务,但 Claude.md 文件则是告诉 Claude 关于特定项目的信息,比如你的技术栈(tech stack)、编码规范和仓库结构。

[原文] [Otto]: cloudmd files live alongside your code in the repository

[译文] [Otto]: Claude.md 文件与你的代码一起存放在仓库中。

[原文] [Otto]: a CloudMD file may say things like we use Nex.js JS and Tailwind but skills on the other hand are portable expertise that work across any project

[译文] [Otto]: 一个 Claude.md 文件可能会说“我们使用 Next.js 和 Tailwind”,但另一方面,技能是可以在任何项目中使用的可移植专业知识。

[原文] [Otto]: so a front-end design skill can teach Claude your typography standards animation patterns and layout conventions and activate automatically when building UI components

[译文] [Otto]: 因此,一个前端设计技能可以教会 Claude 你的排版标准、动画模式和布局规范,并在构建 UI 组件时自动激活。

[原文] [Otto]: mcp servers on the other hand provide universal integration a single protocol that connects Claude to external context sources like GitHub linear Postgress and many many others

[译文] [Otto]: 另一方面,MCP 服务器提供通用的集成,这是一个单一协议,将 Claude 连接到外部上下文源,如 GitHub、Linear、Postgres 以及许许多多其他源。

[原文] [Otto]: mcp connects to data skills teach Claude what to do with it

[译文] [Otto]: MCP 连接数据,而技能则教导 Claude 如何处理这些数据。

[原文] [Otto]: so an MCP server may give Claude access to your database but a database query skill can teach Claude your team's query optimization patterns

[译文] [Otto]: 所以,一个 MCP 服务器可能会让 Claude 访问你的数据库,但一个数据库查询技能可以教会 Claude 你团队的查询优化模式。

章节 3:子代理协同、生态整合与应用场景

📝 本节摘要

最后一节阐述了 Skills 如何与子代理(Sub-agents)结合,以及整个 Claude 生态系统(Claude.md、MCP、Sub-agents、Skills)如何协同工作。Otto 强调了 Skills 的复用性,不同角色的子代理可以共享同一个技能。视频最后总结了 Skills 的实际应用价值,如新员工入职指导、代码审查(PR)规范化以及数据分析方法论的共享。

[原文] [Otto]: finally sub agents are specialized AI assistants with fixed roles each sub agent has its own context window custom prompt and specific tool permissions

[译文] [Otto]: 最后,子代理(sub agents)是具有固定角色的专业 AI 助手,每个子代理都有自己的上下文窗口、自定义提示词和特定的工具权限。

[原文] [Otto]: skills provide portable expertise that any agent can use

[译文] [Otto]: 技能提供了任何代理都可以使用的可移植专业知识。

[原文] [Otto]: so your front-end developer sub agent can use a component pattern skill your UI reviewer sub agent on the other hand can use a design system skill but both can load and use the same accessibility standard skill

[译文] [Otto]: 所以,你的前端开发子代理可以使用“组件模式技能”,而你的 UI 审查子代理可以使用“设计系统技能”,但它们都可以加载并使用同一个“无障碍标准技能”。

[原文] [Otto]: and the best part is these capabilities are designed to work together

[译文] [Otto]: 最棒的是,这些能力是被设计来协同工作的。

[原文] [Otto]: your cloudMD file sets the foundation mcp servers connect the data sub agents specialize in their roles and skills bring the expertise making every piece smarter and more capable

[译文] [Otto]: 你的 Claude.md 文件奠定基础,MCP 服务器连接数据,子代理专注于各自的角色,而技能带来专业知识,这使得每一部分都变得更聪明、更强大。

[原文] [Otto]: at the end of the day skills let you package workflows into reusable capabilities like helping onboard new hires to your team's coding standards ensuring every PR follows a specific security best practices or sharing your data analysis methodology across your team

[译文] [Otto]: 归根结底,技能让你将工作流打包成可复用的能力,比如帮助新员工熟悉团队的编码标准,确保每个 PR(Pull Request)都遵循特定的安全最佳实践,或者在团队中共享你的数据分析方法论。

[原文] [Otto]: and that's how skills can help you achieve more with Claude we encourage you to give them a try and see how they can improve your workflows

[译文] [Otto]: 这就是技能如何帮助你利用 Claude 实现更多成就,我们鼓励你试一试,看看它们如何改善你的工作流程。