构建 Claude Code 的经验:我们如何使用技能
What we learned building and scaling hundreds of skills internally at Anthropic.
我们在 Anthropic 内部构建和扩展数百个 skills 的经验总结。
Skills have become one of the most used extension points in Claude Code. They’re flexible, easy to make, and easy to distribute.
技能已成为 Claude Code 中最常用的扩展点之一。它们灵活、易于创建且易于分发。
But this flexibility also makes it hard to know what works best. What type of skills are worth making? How do you structure a skill? When do you share them with others?
但这种灵活性也使得很难知道什么方法最有效。什么类型的技能值得制作?如何构建一个技能?何时与他人分享它们?
We've been using skills in Claude Code extensively at Anthropic with hundreds of them in active use. These are the lessons we've learned about using skills to accelerate our development.
我们在 Anthropic 广泛使用 Claude Code 中的技能,目前有数百个技能处于活跃使用状态。以下是我们在使用技能加速开发方面学到的经验。
What are skills?
什么是技能?
Skills are folders of instructions, scripts, and resources that agents can discover and use to do things more accurately and efficiently. This blog post assumes familiarity with skills basics; if you’re new, start with our Introduction to agent skills course on Skilljar.
技能是指令、脚本和资源的文件夹,代理可以发现并使用它们来更准确、高效地完成任务。本博客文章假设您已熟悉技能的基础知识;如果您是新手,请先从我们在 Skilljar 上的代理技能入门课程开始。
A common misconception we hear about skills is that they are “just markdown files.” They’re actually folders that can include scripts, assets, data, etc. that the agent can discover, explore and manipulate.
我们听到的关于 skills 的一个常见误解是它们“只是 markdown 文件”。实际上,它们是文件夹,可以包含 scripts、assets、data 等,agent 可以发现、探索和操作这些内容。
In Claude Code, skills also have a wide variety of configuration options including registering dynamic hooks.
在 Claude Code 中,技能还具有多种配置选项,包括注册动态钩子。
We’ve found that some of the most effective skills in Claude Code use these configuration options and folder structure effectively.
我们发现,Claude Code 中一些最有效的技能能够有效地使用这些配置选项和文件夹结构。
Or read the documentation
或者阅读文档
Types of skills
技能的类型
After cataloging all of our internal skills at Anthropic, we noticed they cluster into nine categories. The best skills fit cleanly into one; the ones that try to do too much straddle several a...