通过智能体技能(Agent Skills)赋能智能体应对真实世界
Equipping agents for the real world with Agent Skills
Update: We've publishedAgent Skillsas an open standard for cross-platform portability. (December 18, 2025) As model capabilities improve, we can now build general-purpose agents that interact with full-fledged computing environments.Claude Code, for example, can accomplish complex tasks across domains using local code execution and filesystems. But as these agents become more powerful, we need more composable, scalable, and portable ways to equip them with domain-specific expertise. This led us to createAgent Skills: organized folders of instructions, scripts, and resources that agents can discover and load dynamically to perform better at specific tasks.Skills extend Claude’s capabilities by packaging your expertise into composable resources for Claude, transforming general-purpose agents into specialized agents that fit your needs. Building a skill for an agent is like putting together an onboarding guide for a new hire. Instead of building fragmented, custom-designed agents for each use case, anyone can now specialize their agents with composable capabilities by capturing and sharing their procedural knowledge. In this article, we explain what Skills are, show how they work, and share best practices for building your own.
更新:我们已将智能体技能(Agent Skills)作为跨平台可移植性的开放标准发布。(2025年12月18日)
The anatomy of a skill
随着模型能力的提升,我们现在可以构建与完整计算环境交互的通用智能体(Agent)。例如,Claude Code 可以利用本地代码执行和文件系统完成跨领域的复杂任务。但随着这些智能体变得越来越强大,我们需要更具可组合性、可扩展性和可移植性的方式来为它们配备领域专业知识。
To see Skills in action, let’s walk through a real example: one of the skills that powersClaude’s recently launched document editing abilities. Claude already knows a lot about understanding PDFs, but is limited in its ability to manipulate them directly (e.g. to fill out a form). ThisPDF skilllets us give Claude these new abilities. At its simplest, a skill is a directory that contains aSKILL.md file. This file must start with YAML frontmatter that contains some required metadata:nameanddescription. At startup, the agent pre-loads thenameanddescriptionof every installed skill into its system prompt. SKILL.md file name description name description This metadata is thefirst levelofprogressive disclosure: it provides just enough information for Claude to know when each skill should be used without loading all of it into context. The actual body of this file is thesecond levelof detail. If Claude thinks the skill is relevant to the current task, it will load the skill by reading its fullSKILL.mdinto context. SKILL.md As skills grow in complexity, they may contain too much context to fit into a singleSKILL.md, or context that’s relevant only in specific scenarios. In these cases, skills can bundle additional files within the skill directory and reference them by name fromSKILL.md. These additional linked files are thethird level(and beyond) of detail, which Claude can choose to navigate and discover only as needed. SKILL.md SKILL.md In the PDF skill shown below, theSKILL.mdrefers to two additional files (reference.mdandforms.md) that the skill author chooses to bundle alongside the coreSKILL.md. By moving the form-filling instructions to a separate file (forms.md), the skill author is able to keep the core of the skill lean, trusting that Claude will readforms.mdonly when filling out a form. SKILL.md reference.md forms.md SKILL.md forms.md forms.md Progressive disclosure is the core design principle that makes Agent Skills flexible and scalable. Like a well-organized manual that starts with a table of contents, then specific chapters, and finally a detailed appendix, skills let Claude load information only as needed: Agents with a filesystem and code execution tools don’t need to read the entirety of a skill into their context window when working on a particular task. This means that the amount of context that can be bundled into a skill is effectively unbounded.
这促使我们创建了智能体技能(Agent Skills):一种由指令、脚本和资源组成的有组织的文件夹,智能体可以动态发现和加载它们,从而在特定任务上表现得更好。技能通过将您的专业知识打包成可组合的资源来扩展 Claude 的能力,将通用智能体转化为符合您需求的专业化智能体。
Skills and the context window
为智能体构建技能就像为新员工编写入职指南一样。与其为每个用例构建零散的、定制设计的智能体现在任何人都可以通过捕获和共享他们的程序性知识,用可组合的能力来专业化他们的智能体。在本文中,我们将解释什么是技能,展示它们的工作原理,并分享构建自己技能的最佳实践。
The following diagram shows how the context window changes when a skill is triggered by a user’s message. The sequence of operations shown:
技能的结构解析
- To start, the context window has the core system prompt and the metadata for each of the installed skills, along with the user’s initial message;
- Claude triggers the PDF skill by invoking a Bash tool to read the contents ofpdf/SKILL.md;
为了直观了解技能的工作方式,让我们通过一个真实案例来说明:驱动 Claude 最新推出的文档编辑功能的技能之一。Claude 已经对理解 PDF 了解很多,但在直接操作 PDF 方面(例如填写表单)的能力有限。这个 PDF 技能让我们能够赋予 Claude 这些新能力。
pdf/SKILL.md
最简单的技能是一个包含 SKILL.md 文件的目录。该文件必须以 YAML 前置元数据(frontmatter)开头,其中包含一些必需的元数据:name 和 description。在启动时,智能体会将每个已安装技能的 name 和 description 预加载到其系统提示词中。
- Claude chooses to read theforms.mdfile bundled with the skill;
这些元数据是渐进式披露(progressive disclosure)的第一层:它仅提供足够的信息,让 Claude 知道何时应该使用某个技能,而无需将全部内容加载到上下文中。该文件的实际正文是第二层细节。如果 Claude 认为该技能与当前任务相关,它会通过将完整的 SKILL.md 读入上下文来加载该技能。
forms.md
随着技能复杂度的增长,它们可能包含过多的上下文而无法放入单个 SKILL.md 中,或者某些上下文仅在特定场景下才相关。在这些情况下,技能可以在技能目录中捆绑额外的文件,并从 SKILL.md 中按名称引用它们。这些额外的链接文件是第三层(及更深层)的细节,Claude 可以选择仅在需要时才导航和发现它们。
- Finally, Claude proceeds with the user’s task now that it has loaded relevant instructions from the PDF skill.
在下面展示的 PDF 技能中,SKILL.md 引用了两个额外的文件(reference.md 和 forms.md),技能作者选择将它们与核心 SKILL.md 一起捆绑。通过将表单填写指令移至单独的文件(forms.md),技能作者能够保持技能核心的精简,信任 Claude 仅在填写表单时才会读取 forms.md。
Skills and code execution
渐进式披露是使智能体技能灵活且可扩展的核心设计原则。就像一本组织良好的手册,从目录开始,然后是具体章节,最后是详细的附录一样,技能让 Claude 仅在需要时才加载信息:
Skills can also include code for Claude to execute as tools at its discretion. Large language models excel at many tasks, but certain operations are better suited for traditional code execution. For example, sorting a list via token generation is far more expensive than simply running a sorting algorithm. Beyond efficiency concerns, many applications require the deterministic reliability that only code can provide. In our example, the PDF skill includes a pre-written Python script that reads a PDF and extracts all form fields. Claude can run this script without loading either the script or the PDF into context. And because code is deterministic, this workflow is consistent and repeatable.
拥有文件系统和代码执行工具的智能体在处理特定任务时,不需要将技能的全部内容读入其上下文窗口。这意味着可以捆绑到技能中的上下文量实际上是无限制的。
Developing and evaluating skills
技能与上下文窗口
Here are some helpful guidelines for getting started with authoring and testing skills:
下图展示了当用户的某条消息触发技能时,上下文窗口的变化情况。
- Start with evaluation:Identify specific gaps in your agents’ capabilities by running them on representative tasks and observing where they struggle or require additional context. Then build skills incrementally to address these shortcomings.
- Structure for scale:When theSKILL.mdfile becomes unwieldy, split its content into separate files and reference them. If certain contexts are mutually exclusive or rarely used together, keeping the paths separate will reduce the token usage. Finally, code can serve as both executable tools and as documentation. It should be clear whether Claude should run scripts directly or read them into context as reference.
图中展示的操作序列如下:
SKILL.md
- 首先,上下文窗口包含核心系统提示词和每个已安装技能的元数据,以及用户的初始消息;
- Claude 通过调用 Bash 工具读取 pdf/SKILL.md 的内容来触发 PDF 技能;
- Claude 选择读取与该技能捆绑的 forms.md 文件;
- 最后,Claude 在从 PDF 技能加载了相关指令后,继续执行用户的任务。
- Think from Claude’s perspective:Monitor how Claude uses your skill in real scenarios and iterate based on observations: watch for unexpected trajectories or overreliance on certain contexts. Pay special attention to thenameanddescriptionof your skill. Claude will use these when deciding whether to trigger the skill in response to its current task.
技能与代码执行
name description
技能还可以包含供 Claude 自行决定作为工具执行的代码。
- Iterate with Claude:As you work on a task with Claude, ask Claude to capture its successful approaches and common mistakes into reusable context and code within a skill. If it goes off track when using a skill to complete a task, ask it to self-reflect on what went wrong. This process will help you discover what context Claude actually needs, instead of trying to anticipate it upfront.
大语言模型(LLM)在许多任务上表现出色,但某些操作更适合传统的代码执行。例如,通过 token 生成来排序一个列表远比直接运行排序算法昂贵得多。除了效率方面的考虑,许多应用还需要只有代码才能提供的确定性可靠性。
Security considerations when using Skills
在我们的示例中,PDF 技能包含一个预编写的 Python 脚本,用于读取 PDF 并提取所有表单字段。Claude 可以运行此脚本,而无需将脚本或 PDF 加载到上下文中。而且由于代码是确定性的,这个工作流具有一致性和可重复性。
Skills provide Claude with new capabilities through instructions and code. While this makes them powerful, it also means that malicious skills may introduce vulnerabilities in the environment where they’re used or direct Claude to exfiltrate data and take unintended actions. We recommend installing skills only from trusted sources. When installing a skill from a less-trusted source, thoroughly audit it before use. Start by reading the contents of the files bundled in the skill to understand what it does, paying particular attention to code dependencies and bundled resources like images or scripts. Similarly, pay attention to instructions or code within the skill that instruct Claude to connect to potentially untrusted external network sources.
开发和评估技能
The future of Skills
以下是一些有助于开始编写和测试技能的指导原则:
Agent Skills aresupported todayacrossClaude.ai, Claude Code, the Claude Agent SDK, and the Claude Developer Platform. In the coming weeks, we’ll continue to add features that support the full lifecycle of creating, editing, discovering, sharing, and using Skills. We’re especially excited about the opportunity for Skills to help organizations and individuals share their context and workflows with Claude. We’ll also explore how Skills can complementModel Context Protocol(MCP) servers by teaching agents more complex workflows that involve external tools and software. Looking further ahead, we hope to enable agents to create, edit, and evaluate Skills on their own, letting them codify their own patterns of behavior into reusable capabilities. Skills are a simple concept with a correspondingly simple format. This simplicity makes it easier for organizations, developers, and end users to build customized agents and give them new capabilities. We’re excited to see what people build with Skills. Get started today by checking out our Skillsdocsandcookbook.
- 从评估开始: 通过让智能体在代表性任务上运行并观察它们在哪里遇到困难或需要额外上下文,来识别智能体能力的具体不足。然后逐步构建技能来弥补这些不足。
- 为扩展而组织结构: 当 SKILL.md 文件变得难以管理时,将其内容拆分为单独的文件并引用它们。如果某些上下文是互斥的或很少一起使用,将路径分开可以减少 token 使用量。最后,代码既可以作为可执行工具,也可以作为文档。应该明确 Claude 是应该直接运行脚本还是将其作为参考读入上下文。
- 从 Claude 的视角思考: 监控 Claude 在实际场景中如何使用您的技能,并根据观察进行迭代:留意意外的行为路径或对某些上下文的过度依赖。特别注意技能的
name和description。Claude 在决定是否针对当前任务触发该技能时会使用这些信息。 - 与 Claude 一起迭代: 当您与 Claude 一起完成任务时,请 Claude 将其成功的做法和常见错误捕获为技能中可复用的上下文和代码。如果它在使用技能完成任务时偏离了方向,请让它自我反思出了什么问题。这个过程将帮助您发现 Claude 实际需要什么上下文,而不是试图提前预判。
Acknowledgements
使用技能时的安全注意事项
Written by Barry Zhang, Keith Lazuka, and Mahesh Murag, who all really like folders. Special thanks to the many others across Anthropic who championed, supported, and built Skills.
技能通过指令和代码为 Claude 提供新能力。虽然这使它们功能强大,但也意味着恶意技能可能会在使用环境中引入漏洞,或引导 Claude 泄露数据并执行非预期的操作。
我们建议仅从受信任的来源安装技能。当从不太受信任的来源安装技能时,请在使用前对其进行彻底审计。首先阅读技能中捆绑的文件内容以了解其功能,特别注意代码依赖项和捆绑的资源(如图像或脚本)。同样,注意技能中指示 Claude 连接到潜在不受信任的外部网络来源的指令或代码。
技能的未来
智能体技能目前已在 Claude.ai、Claude Code、Claude Agent SDK 和 Claude 开发者平台上得到支持。
在未来几周内,我们将继续添加功能,以支持创建、编辑、发现、共享和使用技能的完整生命周期。我们对技能帮助组织和个人将其上下文和工作流与 Claude 共享的机会感到特别兴奋。我们还将探索技能如何通过教会智能体涉及外部工具和软件的更复杂工作流来补充模型上下文协议(Model Context Protocol, MCP)服务器。
展望更远的未来,我们希望使智能体能够自行创建、编辑和评估技能,让它们将自己的行为模式编码为可复用的能力。
技能是一个简单的概念,其格式也同样简洁。这种简洁性使组织、开发者和终端用户更容易构建定制化的智能体并赋予它们新能力。
我们期待看到人们利用技能构建出什么。请通过查阅我们的技能文档和实战指南来开始使用吧。
致谢
由 Barry Zhang、Keith Lazuka 和 Mahesh Murag 撰写,他们都非常喜欢文件夹。特别感谢 Anthropic 内部许多支持、推动和构建技能的同事。
更新:我们已将智能体技能(Agent Skills)作为跨平台可移植性的开放标准发布。(2025年12月18日)
随着模型能力的提升,我们现在可以构建与完整计算环境交互的通用智能体(Agent)。例如,Claude Code 可以利用本地代码执行和文件系统完成跨领域的复杂任务。但随着这些智能体变得越来越强大,我们需要更具可组合性、可扩展性和可移植性的方式来为它们配备领域专业知识。
这促使我们创建了智能体技能(Agent Skills):一种由指令、脚本和资源组成的有组织的文件夹,智能体可以动态发现和加载它们,从而在特定任务上表现得更好。技能通过将您的专业知识打包成可组合的资源来扩展 Claude 的能力,将通用智能体转化为符合您需求的专业化智能体。
为智能体构建技能就像为新员工编写入职指南一样。与其为每个用例构建零散的、定制设计的智能体现在任何人都可以通过捕获和共享他们的程序性知识,用可组合的能力来专业化他们的智能体。在本文中,我们将解释什么是技能,展示它们的工作原理,并分享构建自己技能的最佳实践。
技能的结构解析
为了直观了解技能的工作方式,让我们通过一个真实案例来说明:驱动 Claude 最新推出的文档编辑功能的技能之一。Claude 已经对理解 PDF 了解很多,但在直接操作 PDF 方面(例如填写表单)的能力有限。这个 PDF 技能让我们能够赋予 Claude 这些新能力。
最简单的技能是一个包含 SKILL.md 文件的目录。该文件必须以 YAML 前置元数据(frontmatter)开头,其中包含一些必需的元数据:name 和 description。在启动时,智能体会将每个已安装技能的 name 和 description 预加载到其系统提示词中。
这些元数据是渐进式披露(progressive disclosure)的第一层:它仅提供足够的信息,让 Claude 知道何时应该使用某个技能,而无需将全部内容加载到上下文中。该文件的实际正文是第二层细节。如果 Claude 认为该技能与当前任务相关,它会通过将完整的 SKILL.md 读入上下文来加载该技能。
随着技能复杂度的增长,它们可能包含过多的上下文而无法放入单个 SKILL.md 中,或者某些上下文仅在特定场景下才相关。在这些情况下,技能可以在技能目录中捆绑额外的文件,并从 SKILL.md 中按名称引用它们。这些额外的链接文件是第三层(及更深层)的细节,Claude 可以选择仅在需要时才导航和发现它们。
在下面展示的 PDF 技能中,SKILL.md 引用了两个额外的文件(reference.md 和 forms.md),技能作者选择将它们与核心 SKILL.md 一起捆绑。通过将表单填写指令移至单独的文件(forms.md),技能作者能够保持技能核心的精简,信任 Claude 仅在填写表单时才会读取 forms.md。
渐进式披露是使智能体技能灵活且可扩展的核心设计原则。就像一本组织良好的手册,从目录开始,然后是具体章节,最后是详细的附录一样,技能让 Claude 仅在需要时才加载信息:
拥有文件系统和代码执行工具的智能体在处理特定任务时,不需要将技能的全部内容读入其上下文窗口。这意味着可以捆绑到技能中的上下文量实际上是无限制的。
技能与上下文窗口
下图展示了当用户的某条消息触发技能时,上下文窗口的变化情况。
图中展示的操作序列如下:
- 首先,上下文窗口包含核心系统提示词和每个已安装技能的元数据,以及用户的初始消息;
- Claude 通过调用 Bash 工具读取 pdf/SKILL.md 的内容来触发 PDF 技能;
- Claude 选择读取与该技能捆绑的 forms.md 文件;
- 最后,Claude 在从 PDF 技能加载了相关指令后,继续执行用户的任务。
技能与代码执行
技能还可以包含供 Claude 自行决定作为工具执行的代码。
大语言模型(LLM)在许多任务上表现出色,但某些操作更适合传统的代码执行。例如,通过 token 生成来排序一个列表远比直接运行排序算法昂贵得多。除了效率方面的考虑,许多应用还需要只有代码才能提供的确定性可靠性。
在我们的示例中,PDF 技能包含一个预编写的 Python 脚本,用于读取 PDF 并提取所有表单字段。Claude 可以运行此脚本,而无需将脚本或 PDF 加载到上下文中。而且由于代码是确定性的,这个工作流具有一致性和可重复性。
开发和评估技能
以下是一些有助于开始编写和测试技能的指导原则:
- 从评估开始: 通过让智能体在代表性任务上运行并观察它们在哪里遇到困难或需要额外上下文,来识别智能体能力的具体不足。然后逐步构建技能来弥补这些不足。
- 为扩展而组织结构: 当 SKILL.md 文件变得难以管理时,将其内容拆分为单独的文件并引用它们。如果某些上下文是互斥的或很少一起使用,将路径分开可以减少 token 使用量。最后,代码既可以作为可执行工具,也可以作为文档。应该明确 Claude 是应该直接运行脚本还是将其作为参考读入上下文。
- 从 Claude 的视角思考: 监控 Claude 在实际场景中如何使用您的技能,并根据观察进行迭代:留意意外的行为路径或对某些上下文的过度依赖。特别注意技能的
name和description。Claude 在决定是否针对当前任务触发该技能时会使用这些信息。 - 与 Claude 一起迭代: 当您与 Claude 一起完成任务时,请 Claude 将其成功的做法和常见错误捕获为技能中可复用的上下文和代码。如果它在使用技能完成任务时偏离了方向,请让它自我反思出了什么问题。这个过程将帮助您发现 Claude 实际需要什么上下文,而不是试图提前预判。
使用技能时的安全注意事项
技能通过指令和代码为 Claude 提供新能力。虽然这使它们功能强大,但也意味着恶意技能可能会在使用环境中引入漏洞,或引导 Claude 泄露数据并执行非预期的操作。
我们建议仅从受信任的来源安装技能。当从不太受信任的来源安装技能时,请在使用前对其进行彻底审计。首先阅读技能中捆绑的文件内容以了解其功能,特别注意代码依赖项和捆绑的资源(如图像或脚本)。同样,注意技能中指示 Claude 连接到潜在不受信任的外部网络来源的指令或代码。
技能的未来
智能体技能目前已在 Claude.ai、Claude Code、Claude Agent SDK 和 Claude 开发者平台上得到支持。
在未来几周内,我们将继续添加功能,以支持创建、编辑、发现、共享和使用技能的完整生命周期。我们对技能帮助组织和个人将其上下文和工作流与 Claude 共享的机会感到特别兴奋。我们还将探索技能如何通过教会智能体涉及外部工具和软件的更复杂工作流来补充模型上下文协议(Model Context Protocol, MCP)服务器。
展望更远的未来,我们希望使智能体能够自行创建、编辑和评估技能,让它们将自己的行为模式编码为可复用的能力。
技能是一个简单的概念,其格式也同样简洁。这种简洁性使组织、开发者和终端用户更容易构建定制化的智能体并赋予它们新能力。
我们期待看到人们利用技能构建出什么。请通过查阅我们的技能文档和实战指南来开始使用吧。
致谢
由 Barry Zhang、Keith Lazuka 和 Mahesh Murag 撰写,他们都非常喜欢文件夹。特别感谢 Anthropic 内部许多支持、推动和构建技能的同事。
Update: We've publishedAgent Skillsas an open standard for cross-platform portability. (December 18, 2025) As model capabilities improve, we can now build general-purpose agents that interact with full-fledged computing environments.Claude Code, for example, can accomplish complex tasks across domains using local code execution and filesystems. But as these agents become more powerful, we need more composable, scalable, and portable ways to equip them with domain-specific expertise. This led us to createAgent Skills: organized folders of instructions, scripts, and resources that agents can discover and load dynamically to perform better at specific tasks.Skills extend Claude’s capabilities by packaging your expertise into composable resources for Claude, transforming general-purpose agents into specialized agents that fit your needs. Building a skill for an agent is like putting together an onboarding guide for a new hire. Instead of building fragmented, custom-designed agents for each use case, anyone can now specialize their agents with composable capabilities by capturing and sharing their procedural knowledge. In this article, we explain what Skills are, show how they work, and share best practices for building your own.
The anatomy of a skill
To see Skills in action, let’s walk through a real example: one of the skills that powersClaude’s recently launched document editing abilities. Claude already knows a lot about understanding PDFs, but is limited in its ability to manipulate them directly (e.g. to fill out a form). ThisPDF skilllets us give Claude these new abilities. At its simplest, a skill is a directory that contains aSKILL.md file. This file must start with YAML frontmatter that contains some required metadata:nameanddescription. At startup, the agent pre-loads thenameanddescriptionof every installed skill into its system prompt. SKILL.md file name description name description This metadata is thefirst levelofprogressive disclosure: it provides just enough information for Claude to know when each skill should be used without loading all of it into context. The actual body of this file is thesecond levelof detail. If Claude thinks the skill is relevant to the current task, it will load the skill by reading its fullSKILL.mdinto context. SKILL.md As skills grow in complexity, they may contain too much context to fit into a singleSKILL.md, or context that’s relevant only in specific scenarios. In these cases, skills can bundle additional files within the skill directory and reference them by name fromSKILL.md. These additional linked files are thethird level(and beyond) of detail, which Claude can choose to navigate and discover only as needed. SKILL.md SKILL.md In the PDF skill shown below, theSKILL.mdrefers to two additional files (reference.mdandforms.md) that the skill author chooses to bundle alongside the coreSKILL.md. By moving the form-filling instructions to a separate file (forms.md), the skill author is able to keep the core of the skill lean, trusting that Claude will readforms.mdonly when filling out a form. SKILL.md reference.md forms.md SKILL.md forms.md forms.md Progressive disclosure is the core design principle that makes Agent Skills flexible and scalable. Like a well-organized manual that starts with a table of contents, then specific chapters, and finally a detailed appendix, skills let Claude load information only as needed: Agents with a filesystem and code execution tools don’t need to read the entirety of a skill into their context window when working on a particular task. This means that the amount of context that can be bundled into a skill is effectively unbounded.
Skills and the context window
The following diagram shows how the context window changes when a skill is triggered by a user’s message. The sequence of operations shown:
- To start, the context window has the core system prompt and the metadata for each of the installed skills, along with the user’s initial message;
- Claude triggers the PDF skill by invoking a Bash tool to read the contents ofpdf/SKILL.md;
pdf/SKILL.md
- Claude chooses to read theforms.mdfile bundled with the skill;
forms.md
- Finally, Claude proceeds with the user’s task now that it has loaded relevant instructions from the PDF skill.
Skills and code execution
Skills can also include code for Claude to execute as tools at its discretion. Large language models excel at many tasks, but certain operations are better suited for traditional code execution. For example, sorting a list via token generation is far more expensive than simply running a sorting algorithm. Beyond efficiency concerns, many applications require the deterministic reliability that only code can provide. In our example, the PDF skill includes a pre-written Python script that reads a PDF and extracts all form fields. Claude can run this script without loading either the script or the PDF into context. And because code is deterministic, this workflow is consistent and repeatable.
Developing and evaluating skills
Here are some helpful guidelines for getting started with authoring and testing skills:
- Start with evaluation:Identify specific gaps in your agents’ capabilities by running them on representative tasks and observing where they struggle or require additional context. Then build skills incrementally to address these shortcomings.
- Structure for scale:When theSKILL.mdfile becomes unwieldy, split its content into separate files and reference them. If certain contexts are mutually exclusive or rarely used together, keeping the paths separate will reduce the token usage. Finally, code can serve as both executable tools and as documentation. It should be clear whether Claude should run scripts directly or read them into context as reference.
SKILL.md
- Think from Claude’s perspective:Monitor how Claude uses your skill in real scenarios and iterate based on observations: watch for unexpected trajectories or overreliance on certain contexts. Pay special attention to thenameanddescriptionof your skill. Claude will use these when deciding whether to trigger the skill in response to its current task.
name description
- Iterate with Claude:As you work on a task with Claude, ask Claude to capture its successful approaches and common mistakes into reusable context and code within a skill. If it goes off track when using a skill to complete a task, ask it to self-reflect on what went wrong. This process will help you discover what context Claude actually needs, instead of trying to anticipate it upfront.
Security considerations when using Skills
Skills provide Claude with new capabilities through instructions and code. While this makes them powerful, it also means that malicious skills may introduce vulnerabilities in the environment where they’re used or direct Claude to exfiltrate data and take unintended actions. We recommend installing skills only from trusted sources. When installing a skill from a less-trusted source, thoroughly audit it before use. Start by reading the contents of the files bundled in the skill to understand what it does, paying particular attention to code dependencies and bundled resources like images or scripts. Similarly, pay attention to instructions or code within the skill that instruct Claude to connect to potentially untrusted external network sources.
The future of Skills
Agent Skills aresupported todayacrossClaude.ai, Claude Code, the Claude Agent SDK, and the Claude Developer Platform. In the coming weeks, we’ll continue to add features that support the full lifecycle of creating, editing, discovering, sharing, and using Skills. We’re especially excited about the opportunity for Skills to help organizations and individuals share their context and workflows with Claude. We’ll also explore how Skills can complementModel Context Protocol(MCP) servers by teaching agents more complex workflows that involve external tools and software. Looking further ahead, we hope to enable agents to create, edit, and evaluate Skills on their own, letting them codify their own patterns of behavior into reusable capabilities. Skills are a simple concept with a correspondingly simple format. This simplicity makes it easier for organizations, developers, and end users to build customized agents and give them new capabilities. We’re excited to see what people build with Skills. Get started today by checking out our Skillsdocsandcookbook.
Acknowledgements
Written by Barry Zhang, Keith Lazuka, and Mahesh Murag, who all really like folders. Special thanks to the many others across Anthropic who championed, supported, and built Skills.