skill-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Creator
Skill创建指南
This skill provides guidance for creating effective skills.
本技能为创建有效的Claude Skills提供指导。
About Skills
关于Skills
Skills are modular, self-contained packages that extend Claude's capabilities by providing
specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific
domains or tasks—they transform Claude from a general-purpose agent into a specialized agent
equipped with procedural knowledge that no model can fully possess.
IMPORTANT:
- Skills are not documentation, they are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
- Each skill teaches Claude how to perform a specific development task, not what a tool does.
- Claude Code can activate multiple skills automatically to achieve the user's request.
Skills是模块化、独立的软件包,通过提供专业知识、工作流和工具来扩展Claude的能力。可以将它们视为特定领域或任务的“入门指南”——它们将Claude从通用Agent转变为具备过程性知识的专业Agent,而这类知识是任何模型都无法完全拥有的。
重要提示:
- Skills不是文档,而是指导Claude Code使用工具、软件包、插件或API完成任务的实用说明。
- 每个Skill都教授Claude如何执行特定的开发任务,而非工具的功能介绍。
- Claude Code可以自动激活多个Skill来完成用户的请求。
What Skills Provide
Skills提供的内容
- Specialized workflows - Multi-step procedures for specific domains
- Tool integrations - Instructions for working with specific file formats or APIs
- Domain expertise - Company-specific knowledge, schemas, business logic
- Bundled resources - Scripts, references, and assets for complex and repetitive tasks
- 专业工作流 - 特定领域的多步骤流程
- 工具集成 - 处理特定文件格式或API的操作说明
- 领域专业知识 - 公司特定知识、数据结构、业务逻辑
- 捆绑资源 - 用于复杂和重复任务的脚本、参考资料和资产
Anatomy of a Skill
Skill的结构
Every skill consists of a required SKILL.md file and optional bundled resources:
.claude/skills/
└── skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ ├── description: (required)
│ │ ├── license: (optional)
│ │ └── version: (optional)
│ └── Markdown instructions (required)
└── Bundled Resources (optional)
├── scripts/ - Executable code (Python/Bash/etc.)
├── references/ - Documentation intended to be loaded into context as needed
└── assets/ - Files used in output (templates, icons, fonts, etc.)每个Skill都包含一个必填的SKILL.md文件和可选的捆绑资源:
.claude/skills/
└── skill-name/
├── SKILL.md (必填)
│ ├── YAML前置元数据 (必填)
│ │ ├── name: (必填)
│ │ ├── description: (必填)
│ │ ├── license: (可选)
│ │ └── version: (可选)
│ └── Markdown操作说明 (必填)
└── 捆绑资源 (可选)
├── scripts/ - 可执行代码(Python/Bash等)
├── references/ - 按需加载到上下文的文档
└── assets/ - 输出中使用的文件(模板、图标、字体等)Requirements (IMPORTANT)
要求(重要)
- Skill should be combined into specific topics, for example: ,
cloudflare,cloudflare-r2,cloudflare-workers,dockershould be combined intogclouddevops - should be less than 150 lines and include the references of related markdown files and scripts.
SKILL.md - Each script or referenced markdown file should be also less than 150 lines, remember that you can always split them into multiple files (progressive disclosure principle).
- Descriptions in metadata of files should be both concise (less than 200 characters) and still contains enough usecases of the references and scripts, this will help skills can be activated automatically during the implementation process of Claude Code.
SKILL.md - Referenced markdowns:
- Sacrifice grammar for the sake of concision when writing these files.
- Can reference other markdown files or scripts as well.
- Referenced scripts:
- Prefer nodejs or python scripts instead of bash script, because bash scripts are not well-supported on Windows.
- If you're going to write python scripts, make sure you have
requirements.txt - Make sure scripts respect file follow this order:
.env>process.env(global) >$HOME/.claude/skills/${SKILL}/.env(global) >$HOME/.claude/skills/.env(global) >$HOME/.claude/.env(cwd) >./.claude/skills/${SKILL}/.env(cwd) >./.claude/skills/.env(cwd)./.claude/.env - Create files to show the required environment variables.
.env.example - Always write tests for these scripts.
IMPORTANT:
- Always keep in mind that and reference files should be token consumption efficient, so that progressive disclosure can be leveraged at best.
SKILL.md - should be less than 150 lines
SKILL.md - Referenced markdown files should be also less than 150 lines, remember that you can always split them into multiple files (progressive disclosure principle).
- Referenced scripts: no limit on length, just make sure it works, no compile issues, no runtime issues, no dependencies issues, no environment issues, no platform issues.
Why?
Better context engineering: leverage progressive disclosure technique of Agent Skills, when agent skills are activated, Claude Code will consider to load only relevant files into the context, instead of reading all long as before.
SKILL.md- Skill应按特定主题归类,例如:、
cloudflare、cloudflare-r2、cloudflare-workers、docker应归类到gcloud主题下devops - 应少于150行,并包含相关markdown文件和脚本的引用
SKILL.md - 每个脚本或参考markdown文件也应少于150行,记住你可以将内容拆分为多个文件(遵循渐进式披露原则)
- 元数据中的描述应简洁(少于200个字符),同时包含足够的参考资料和脚本用例,这有助于Claude Code在执行过程中自动激活Skills
SKILL.md - 参考markdown文件:
- 编写这些文件时,为了简洁性可以适当牺牲语法
- 也可以引用其他markdown文件或脚本
- 参考脚本:
- 优先选择Node.js或Python脚本而非Bash脚本,因为Bash脚本在Windows上支持不佳
- 如果编写Python脚本,请确保包含
requirements.txt - 确保脚本遵循以下文件加载顺序:
.env>process.env(全局) >$HOME/.claude/skills/${SKILL}/.env(全局) >$HOME/.claude/skills/.env(全局) >$HOME/.claude/.env(当前目录) >./.claude/skills/${SKILL}/.env(当前目录) >./.claude/skills/.env(当前目录)./.claude/.env - 创建文件展示所需的环境变量
.env.example - 始终为这些脚本编写测试用例
重要提示:
- 始终牢记和参考文件应高效消耗token,以便充分利用渐进式披露的优势
SKILL.md - 应少于150行
SKILL.md - 参考markdown文件也应少于150行,记住你可以将内容拆分为多个文件(遵循渐进式披露原则)
- 参考脚本:长度无限制,但必须确保可正常运行,无编译问题、运行时问题、依赖问题、环境问题和平台问题
原因:
更好的上下文工程:利用Agent Skills的渐进式披露技术,当Agent Skills被激活时,Claude Code会考虑仅将相关文件加载到上下文中,而非像以前那样读取所有冗长的内容。
SKILL.mdSKILL.md (required)
SKILL.md(必填)
File name: (uppercase)
File size: Under 150 lines, if you need more, split it to multiple files (<150 lines each) in folder.
is always short and concise, straight to the point, treat it as a quick reference guide.
SKILL.mdreferencesSKILL.mdMetadata Quality: The and (MUST be under 200 characters) in YAML frontmatter determine when Claude will use the skill. Be specific about what the skill does and when to use it, DO NOT sound generic, vague or educational. Use the third-person (e.g. "This skill should be used when..." instead of "Use this skill when...").
namedescription文件名: (大写)
文件大小: 少于150行,如果需要更多内容,将其拆分为文件夹中的多个文件(每个少于150行)
应始终简洁明了、直击要点,将其视为快速参考指南。
SKILL.mdreferencesSKILL.md元数据质量: YAML前置元数据中的和(必须少于200个字符)决定了Claude何时使用该Skill。请明确说明Skill的功能和使用场景,避免通用、模糊或教育性的表述。使用第三人称(例如:“当需要...时应使用此Skill”而非“当你需要...时使用此Skill”)。
namedescriptionBundled Resources (optional)
捆绑资源(可选)
Scripts (scripts/
)
scripts/脚本(scripts/
)
scripts/Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
- When to include: When the same code is being rewritten repeatedly or deterministic reliability is needed
- Example: for PDF rotation tasks
scripts/rotate_pdf.py - Benefits: Token efficient, deterministic, may be executed without loading into context
- Note: Scripts may still need to be read by Claude for patching or environment-specific adjustments
IMPORTANT:
- Write tests for scripts.
- Run tests and make sure it works, if tests fail, fix them and run tests again, repeat until tests pass.
- Run scripts manually with some usecases to make sure it works.
- Make sure scripts respect file follow this order:
.env>process.env(global) >$HOME/.claude/skills/${SKILL}/.env(global) >$HOME/.claude/skills/.env(global) >$HOME/.claude/.env(cwd) >./.claude/skills/${SKILL}/.env(cwd) >./.claude/skills/.env(cwd)./.claude/.env
用于需要确定性可靠性或重复编写的任务的可执行代码(Python/Bash等)。
- 何时包含:当相同代码被重复编写或需要确定性可靠性时
- 示例:用于PDF旋转任务
scripts/rotate_pdf.py - 优势:Token效率高、结果确定,无需加载到上下文即可执行
- 注意:脚本可能仍需要被Claude读取以进行补丁或特定环境调整
重要提示:
- 为脚本编写测试用例
- 运行测试确保正常工作,如果测试失败,修复后重新运行,直到测试通过
- 手动运行脚本并测试一些用例以确保正常工作
- 确保脚本遵循以下文件加载顺序:
.env>process.env(全局) >$HOME/.claude/skills/${SKILL}/.env(全局) >$HOME/.claude/skills/.env(全局) >$HOME/.claude/.env(当前目录) >./.claude/skills/${SKILL}/.env(当前目录) >./.claude/skills/.env(当前目录)./.claude/.env
References (references/
)
references/参考资料(references/
)
references/Documentation and reference material intended to be loaded as needed into context to inform Claude's process and thinking.
- When to include: For documentation that Claude should reference while working
- Examples: for financial schemas,
references/finance.mdfor company NDA template,references/mnda.mdfor company policies,references/policies.mdfor API specificationsreferences/api_docs.md - Use cases: Database schemas, best practices, common workflows, cheatsheets, tool instructions, API documentation, domain knowledge, company policies, detailed workflow guides
- Benefits: Keeps SKILL.md lean, loaded only when Claude determines it's needed, makes information discoverable without hogging the context window.
- Best practice: If files are large (>150 lines), split them into multiple files (<150 lines each) in folder, include grep search patterns in
referencesSKILL.md - Avoid duplication: Information should live in either or
SKILL.mdfiles, not both. Preferreferencesfiles for detailed information unless it's truly core to the skill—this keepsreferenceslean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance inSKILL.md; move detailed reference material, schemas, and examples toSKILL.mdfiles.references
IMPORTANT:
- Referenced markdown files should be also less than 150 lines, remember that you can always split them into multiple files (progressive disclosure principle).
- Referenced markdown files are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
- Each skill teaches Claude how to perform a specific development task, not what a tool does.
旨在按需加载到上下文中,为Claude的处理和思考提供信息的文档和参考资料。
- 何时包含:当Claude在工作中需要参考文档时
- 示例:用于财务数据结构,
references/finance.md用于公司NDA模板,references/mnda.md用于公司政策,references/policies.md用于API规范references/api_docs.md - 用例:数据库结构、最佳实践、常见工作流、速查表、工具说明、API文档、领域知识、公司政策、详细工作流指南
- 优势:保持SKILL.md精简,仅在Claude确定需要时加载,使信息可被发现而不占用上下文窗口
- 最佳实践:如果文件过大(>150行),将其拆分为文件夹中的多个文件(每个少于150行),在
references中包含grep搜索模式SKILL.md - 避免重复:信息应仅存在于或参考文件中,而非两者并存。除非是Skill的核心内容,否则优先将详细信息放在参考文件中——这可以保持
SKILL.md精简,同时使信息可被发现而不占用上下文窗口。仅在SKILL.md中保留必要的过程说明和工作流指导;将详细参考资料、数据结构和示例移至参考文件中SKILL.md
重要提示:
- 参考markdown文件也应少于150行,记住你可以将内容拆分为多个文件(遵循渐进式披露原则)
- 参考markdown文件是指导Claude Code使用工具、软件包、插件或API完成任务的实用说明
- 每个Skill都教授Claude如何执行特定的开发任务,而非工具的功能介绍
Assets (assets/
)
assets/资产(assets/
)
assets/Files not intended to be loaded into context, but rather used within the output Claude produces.
- When to include: When the skill needs files that will be used in the final output
- Examples: for brand assets,
assets/logo.pngfor PowerPoint templates,assets/slides.pptxfor HTML/React boilerplate,assets/frontend-template/for typographyassets/font.ttf - Use cases: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
- Benefits: Separates output resources from documentation, enables Claude to use files without loading them into context
不打算加载到上下文中,而是用于Claude生成的输出中的文件。
- 何时包含:当Skill需要在最终输出中使用文件时
- 示例:用于品牌资产,
assets/logo.png用于PowerPoint模板,assets/slides.pptx用于HTML/React样板代码,assets/frontend-template/用于字体assets/font.ttf - 用例:模板、图片、图标、样板代码、字体、可复制或修改的示例文档
- 优势:将输出资源与文档分离,使Claude无需将文件加载到上下文即可使用
Progressive Disclosure Design Principle
渐进式披露设计原则
Skills use a three-level loading system to manage context efficiently:
- Metadata (name + description) - Always in context (less than 200 characters)
- SKILL.md body - When skill triggers (<5k words)
- Bundled resources - As needed by Claude (Unlimited*)
*Unlimited because scripts can be executed without reading into context window.
Skills使用三级加载系统来高效管理上下文:
- 元数据(名称+描述) - 始终在上下文中(少于200个字符)
- SKILL.md主体 - 当Skill被触发时(<5000字)
- 捆绑资源 - 按需由Claude加载(无限制*)
*无限制是因为脚本可以在不读取到上下文窗口的情况下执行。
Skill Creation Process
Skill创建流程
To create a skill, follow the "Skill Creation Process" in order, skipping steps only if there is a clear reason why they are not applicable.
要创建Skill,请按顺序遵循“Skill创建流程”,仅在有明确理由表明步骤不适用时才跳过。
Step 1: Understanding the Skill with Concrete Examples
步骤1:通过具体案例理解Skill
Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
Use tool to gather user feedback and validate understanding.
AskUserQuestionFor example, when building an image-editor skill, relevant questions include:
- "What functionality should the image-editor skill support? Editing, rotating, anything else?"
- "Can you give some examples of how this skill would be used?"
- "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"
- "What would a user say that should trigger this skill?"
To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
Conclude this step when there is a clear sense of the functionality the skill should support.
仅当Skill的使用模式已被清晰理解时才跳过此步骤。即使处理现有Skill,此步骤仍有价值。
要创建有效的Skill,需清晰理解Skill的具体使用案例。这种理解可以来自直接的用户案例,也可以来自经用户反馈验证的生成案例。
使用工具收集用户反馈并验证理解。
AskUserQuestion例如,在构建图像编辑器Skill时,相关问题包括:
- “图像编辑器Skill应支持哪些功能?编辑、旋转,还是其他?”
- “你能给出一些此Skill的使用示例吗?”
- “我可以想象用户会要求‘去除这张图片的红眼’或‘旋转这张图片’。你认为还有其他使用场景吗?”
- “用户说什么话应该触发此Skill?”
为避免使用户感到负担过重,避免在一条消息中提出过多问题。从最重要的问题开始,根据需要跟进以获得更好的效果。
当明确了解Skill应支持的功能时,结束此步骤。
Step 2: Research on The Internet
步骤2:互联网研究
An effective skill is a subset of real-life workflows from professional workflows and case studies, so it's important to research on the internet to understand the current state of the art and best practices.
Activate skill to search for documentation if needed.
/docs-seekerIf you receive a lot of URLs or files, use multiple tools and subagents to explore them in parallel, then report back to main agent.
WebFetchExploreActivate skill to research for:
/research- Best practices & industry standards
- Existing CLI tools (executable via ,
npxorbunx) and their usage patternspipx - Workflows & success case studies
- Common patterns, use cases & examples
- Edge cases, potential pitfalls & avoidance strategies
Write down the reports from the research to be used in the next step.
有效的Skill是现实生活中专业工作流和案例研究的子集,因此在互联网上研究以了解当前的最佳实践和技术水平非常重要。
如果需要,激活技能搜索文档。
/docs-seeker如果收到大量URL或文件,使用多个工具和子代理并行探索,然后向主代理报告。
WebFetchExplore激活技能研究以下内容:
/research- 最佳实践和行业标准
- 现有CLI工具(可通过、
npx或bunx执行)及其使用模式pipx - 工作流和成功案例研究
- 常见模式、用例和示例
- 边缘情况、潜在陷阱和规避策略
写下研究报告,以便在下一步中使用。
Step 3: Planning the Reusable Skill Contents
步骤3:规划可复用的Skill内容
To turn concrete examples into an effective skill, analyze each example by:
- Considering how to execute on the example from scratch
- Prefer existing CLI tools' execution (via ,
npxorbunx) over writing custom codepipx - Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
- Analyze the current skills catalog to avoid duplicating functionality, re-using existing skills where possible.
Example: When building a skill to handle queries like "Help me rotate this PDF," the analysis shows:
pdf-editor- Rotating a PDF requires re-writing the same code each time
- A script would be helpful to store in the skill
scripts/rotate_pdf.py
Example: When designing a skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
frontend-webapp-builder- Writing a frontend webapp requires the same boilerplate HTML/React each time
- An template containing the boilerplate HTML/React project files would be helpful to store in the skill
assets/hello-world/
Example: When building a skill to handle queries like "How many users have logged in today?" the analysis shows:
big-query- Querying BigQuery requires re-discovering the table schemas and relationships each time
- A file documenting the table schemas would be helpful to store in the skill
references/schema.md
To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
- Make sure scripts respect file follow this order:
.env>process.env(global) >$HOME/.claude/skills/${SKILL}/.env(global) >$HOME/.claude/skills/.env(global) >$HOME/.claude/.env(cwd) >./.claude/skills/${SKILL}/.env(cwd) >./.claude/skills/.env(cwd)./.claude/.env - Make sure scripts have tests, run all tests and ensure they pass. DO NOT SKIP THIS STEP.
要将具体案例转化为有效的Skill,请按以下方式分析每个案例:
- 考虑如何从头开始执行该案例
- 优先使用现有CLI工具执行(通过、
npx或bunx)而非编写自定义代码pipx - 确定在重复执行这些工作流时,哪些脚本、参考资料和资产会有帮助
- 分析当前的Skill目录以避免重复功能,尽可能重用现有Skills
示例: 当构建Skill来处理“帮我旋转这个PDF”等查询时,分析表明:
pdf-editor- 旋转PDF需要每次重写相同的代码
- 存储脚本会有帮助
scripts/rotate_pdf.py
示例: 当设计Skill来处理“帮我构建一个待办事项应用”或“帮我构建一个跟踪步数的仪表板”等查询时,分析表明:
frontend-webapp-builder- 构建前端Web应用每次都需要相同的HTML/React样板代码
- 存储包含HTML/React项目样板代码的模板会有帮助
assets/hello-world/
示例: 当构建Skill来处理“今天有多少用户登录?”等查询时,分析表明:
big-query- 查询BigQuery需要每次重新发现表结构和关系
- 存储记录表结构的文件会有帮助
references/schema.md
要确定Skill的内容,请分析每个具体案例,创建要包含的可复用资源列表:脚本、参考资料和资产。
- 确保脚本遵循以下文件加载顺序:
.env>process.env(全局) >$HOME/.claude/skills/${SKILL}/.env(全局) >$HOME/.claude/skills/.env(全局) >$HOME/.claude/.env(当前目录) >./.claude/skills/${SKILL}/.env(当前目录) >./.claude/skills/.env(当前目录)./.claude/.env - 确保脚本有测试用例,运行所有测试并确保通过。请勿跳过此步骤。
Step 4: Initializing the Skill
步骤4:初始化Skill
At this point, it is time to actually create the skill.
Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.
When creating a new skill from scratch, always run the script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.
init_skill.pyUsage:
bash
scripts/init_skill.py <skill-name> --path <output-directory>The script:
- Creates the skill directory at the specified path
- Generates a SKILL.md template with proper frontmatter and TODO placeholders
- Creates example resource directories: ,
scripts/, andreferences/assets/ - Adds example files in each directory that can be customized or deleted
After initialization, customize or remove the generated SKILL.md and example files as needed.
此时,可以实际创建Skill了。
仅当正在开发的Skill已存在且需要迭代或打包时才跳过此步骤。在这种情况下,继续下一步。
从头开始创建新Skill时,请始终运行脚本。该脚本会方便地生成新的模板Skill目录,自动包含Skill所需的所有内容,使Skill创建过程更加高效和可靠。
init_skill.py用法:
bash
scripts/init_skill.py <skill-name> --path <output-directory>该脚本:
- 在指定路径创建Skill目录
- 生成带有正确前置元数据和待办事项占位符的SKILL.md模板
- 创建示例资源目录:、
scripts/和references/assets/ - 在每个目录中添加可自定义或删除的示例文件
初始化后,根据需要自定义或删除生成的SKILL.md和示例文件。
Step 5: Edit the Skill
步骤5:编辑Skill
When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of Claude to use. Focus on including information that would be beneficial and non-obvious to Claude. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Claude instance execute these tasks more effectively.
编辑(新生成或现有)Skill时,请记住该Skill是为另一个Claude实例创建的。重点包含对Claude有益且非显而易见的信息。考虑哪些过程知识、领域特定细节或可复用资产可以帮助另一个Claude实例更有效地执行这些任务。
Start with Reusable Skill Contents
从可复用Skill内容开始
To begin implementation, start with the reusable resources identified above: , , and files. Note that this step may require user input. For example, when implementing a skill, the user may need to provide brand assets or templates to store in , or documentation to store in .
scripts/references/assets/brand-guidelinesassets/references/Also, delete any example files and directories not needed for the skill. The initialization script creates example files in , , and to demonstrate structure, but most skills won't need all of them.
scripts/references/assets/开始实现时,从上面确定的可复用资源开始:、和文件。请注意,此步骤可能需要用户输入。例如,在实现Skill时,用户可能需要提供品牌资产或模板存储在中,或提供文档存储在中。
scripts/references/assets/brand-guidelinesassets/references/此外,删除Skill不需要的任何示例文件和目录。初始化脚本会在、和中创建示例文件以展示结构,但大多数Skill不需要所有这些文件。
scripts/references/assets/Update SKILL.md
更新SKILL.md
Writing Style: Write the entire skill using imperative/infinitive form (verb-first instructions), not second person. Use objective, instructional language (e.g., "To accomplish X, do Y" rather than "You should do X" or "If you need to do X"). This maintains consistency and clarity for AI consumption.
To complete SKILL.md, answer the following questions:
- What is the purpose of the skill, in a few sentences?
- When should the skill be used?
- In practice, how should Claude use the skill? All reusable skill contents developed above should be referenced so that Claude knows how to use them.
写作风格: 使用命令式/不定式形式(以动词开头的指令)编写整个Skill,而非第二人称。使用客观的说明性语言(例如:“要完成X,请执行Y”而非“你应该做X”或“如果你需要做X”)。这保持了AI消费的一致性和清晰度。
要完成SKILL.md,请回答以下问题:
- Skill的目的是什么?用几句话说明。
- 何时应使用该Skill?
- 在实践中,Claude应如何使用该Skill?应引用以上开发的所有可复用Skill内容,以便Claude知道如何使用它们。
Step 5: Packaging a Skill
步骤6:打包Skill
Once the skill is ready, it should be packaged into a distributable zip file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:
bash
scripts/package_skill.py <path/to/skill-folder>Optional output directory specification:
bash
scripts/package_skill.py <path/to/skill-folder> ./distThe packaging script will:
-
Validate the skill automatically, checking:
- YAML frontmatter format and required fields
- Skill naming conventions and directory structure
- Description completeness and quality (MUST be under 200 characters)
- File organization and resource references
-
Package the skill if validation passes, creating a zip file named after the skill (e.g.,) that includes all files and maintains the proper directory structure for distribution.
my-skill.zip
If validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.
Skill准备就绪后,应将其打包为可分发的zip文件与用户共享。打包过程会先自动验证Skill是否符合所有要求:
bash
scripts/package_skill.py <path/to/skill-folder>可选的输出目录指定:
bash
scripts/package_skill.py <path/to/skill-folder> ./dist打包脚本将:
-
验证:自动验证Skill,检查:
- YAML前置元数据格式和必填字段
- Skill命名约定和目录结构
- 描述的完整性和质量(必须少于200个字符)
- 文件组织和资源引用
-
打包:如果验证通过,创建以Skill命名的zip文件(例如:),包含所有文件并保持分发所需的正确目录结构。
my-skill.zip
如果验证失败,脚本将报告错误并退出,不创建包。修复所有验证错误后重新运行打包命令。
Step 6: Iterate
步骤7:迭代
After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.
Iteration workflow:
- Use the skill on real tasks
- Notice struggles or inefficiencies
- Notice token usage and performance
- Identify how SKILL.md or bundled resources should be updated
- Implement changes and test again
测试Skill后,用户可能会要求改进。通常这会在使用Skill后立即发生,此时用户对Skill的表现有清晰的上下文。
迭代工作流:
- 在实际任务中使用Skill
- 注意遇到的困难或低效之处
- 注意token使用情况和性能
- 确定应如何更新SKILL.md或捆绑资源
- 实施更改并再次测试
Validation Criteria
验证标准
Detailed validation criteria for evaluating skills:
- Quick checklist:
references/validation-checklist.md - Metadata quality:
references/metadata-quality-criteria.md - Token efficiency:
references/token-efficiency-criteria.md - Script quality:
references/script-quality-criteria.md - Structure & organization:
references/structure-organization-criteria.md
评估Skills的详细验证标准:
- 快速检查表:
references/validation-checklist.md - 元数据质量:
references/metadata-quality-criteria.md - Token效率:
references/token-efficiency-criteria.md - 脚本质量:
references/script-quality-criteria.md - 结构与组织:
references/structure-organization-criteria.md
Plugin Marketplaces
插件市场
For distributing skills as plugins via marketplaces, see:
- Overview:
references/plugin-marketplace-overview.md - Schema:
references/plugin-marketplace-schema.md - Sources:
references/plugin-marketplace-sources.md - Hosting:
references/plugin-marketplace-hosting.md - Troubleshooting:
references/plugin-marketplace-troubleshooting.md
有关通过市场将Skills作为插件分发的信息,请参阅:
- 概述:
references/plugin-marketplace-overview.md - Schema:
references/plugin-marketplace-schema.md - 来源:
references/plugin-marketplace-sources.md - 托管:
references/plugin-marketplace-hosting.md - 故障排除:
references/plugin-marketplace-troubleshooting.md
References
参考资料
- Agent Skills
- Agent Skills Spec
- Agent Skills Overview
- Best Practices
- Plugin Marketplaces
- Agent Skills
- Agent Skills Spec
- Agent Skills Overview
- Best Practices
- Plugin Marketplaces