skill-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese技能创建器
Skill Builder
本技能提供创建高效技能的指导。
This Skill provides guidance for creating effective Skills.
关于技能
About Skills
技能是模块化、自包含的软件包,通过提供专业知识、工作流程和工具来扩展 Claude 的能力。可以将它们视为特定领域或任务的"入职指南"——它们将 Claude 从通用代理转变为配备了程序性知识的专业代理,而这些知识是任何模型都无法完全具备的。
Skills are modular, self-contained software packages that extend Claude's capabilities by providing expertise, 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 on its own.
技能提供什么
What Skills Provide
- 专业工作流程 - 特定领域的多步骤流程
- 工具集成 - 处理特定文件格式或 API 的说明
- 领域专业知识 - 公司特定知识、模式、业务逻辑
- 捆绑资源 - 用于复杂和重复任务的脚本、参考资料和资产
- Specialized Workflows - Domain-specific multi-step processes
- Tool Integrations - Instructions for handling specific file formats or APIs
- Domain Expertise - Company-specific knowledge, patterns, business logic
- Bundled Resources - Scripts, references, and assets for complex and repetitive tasks
核心原则
Core Principles
简洁是关键
Brevity is Key
上下文窗口是公共资源。技能与 Claude 需要的所有其他内容共享上下文窗口:系统提示、对话历史、其他技能的元数据以及实际的用户请求。
默认假设:Claude 已经非常智能。 只添加 Claude 尚未具备的上下文。质疑每条信息:"Claude 真的需要这个解释吗?"以及"这段文字值得它的 token 成本吗?"
优先使用简洁的示例而不是冗长的解释。
The context window is a shared resource. Skills share the context window with everything else Claude needs: system prompts, conversation history, metadata from other Skills, and the actual user request.
Default Assumption: Claude is already highly intelligent. Only add context that Claude doesn't already have. Question every piece of information: "Does Claude really need this explanation?" and "Is this text worth its token cost?"
Prioritize concise examples over lengthy explanations.
设置适当的自由度
Set Appropriate Degrees of Freedom
根据任务的脆弱性和可变性匹配具体程度:
高自由度(基于文本的指令):当多种方法都有效、决策取决于上下文或启发式方法指导方法时使用。
中等自由度(伪代码或带参数的脚本):当存在首选模式、可接受一些变化或配置影响行为时使用。
低自由度(特定脚本,少量参数):当操作脆弱且容易出错、一致性至关重要或必须遵循特定顺序时使用。
将 Claude 想象成在探索一条路径:有悬崖的狭窄桥梁需要特定的护栏(低自由度),而开阔的田野允许多条路线(高自由度)。
Match specificity to the fragility and variability of the task:
High Freedom (Text-based instructions) : Use when multiple approaches work, decisions depend on context, or heuristics guide the method.
Medium Freedom (Pseudocode or parameterized scripts) : Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.
Low Freedom (Specific scripts, few parameters) : Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.
Imagine Claude navigating a path: a narrow bridge with cliffs requires specific guardrails (low freedom), while an open field allows multiple routes (high freedom).
技能的结构
Skill Structure
每个技能由一个必需的 SKILL.md 文件和可选的捆绑资源组成:
skill-name/
├── SKILL.md(必需)
│ ├── YAML 前置元数据(必需)
│ │ ├── name:(必需)
│ │ └── description:(必需)
│ └── Markdown 说明(必需)
└── 捆绑资源(可选)
├── scripts/ - 可执行代码(Python/Bash 等)
├── references/ - 根据需要加载到上下文中的文档
└── assets/ - 用于输出的文件(模板、图标、字体等)Each Skill consists of a required SKILL.md file and optional bundled resources:
skill-name/
├── SKILL.md (Required)
│ ├── YAML Frontmatter (Required)
│ │ ├── name: (Required)
│ │ └── description: (Required)
│ └── Markdown Instructions (Required)
└── Bundled Resources (Optional)
├── scripts/ - Executable code (Python/Bash, etc.)
├── references/ - Documents loaded into context as needed
└── assets/ - Files used in Claude's outputSKILL.md(必需)
SKILL.md (Required)
每个 SKILL.md 包含:
- 前置元数据(YAML):包含 和
name字段。这是 Claude 用来确定何时使用该技能的唯一字段,因此清晰全面地描述技能是什么以及何时应该使用它非常重要。description - 正文(Markdown):使用技能的说明和指导。仅在技能触发后加载(如果触发的话)。
Each SKILL.md contains:
- Frontmatter (YAML) : Includes and
namefields. This is the only field Claude uses to determine when to use the Skill, so it's critical to clearly and comprehensively describe what the Skill does and when it should be used.description - Body (Markdown) : Instructions and guidance for using the Skill. Only loaded after the Skill is triggered (if at all).
捆绑资源(可选)
Bundled Resources (Optional)
脚本(scripts/
)
scripts/Scripts (scripts/
)
scripts/用于需要确定性可靠性或重复编写的任务的可执行代码(Python/Bash 等)。
- 何时包含:当相同的代码被重复编写或需要确定性可靠性时
- 示例:用于 PDF 旋转任务的
scripts/rotate_pdf.py - 优点:token 效率高、确定性强、可以在不加载到上下文的情况下执行
- 注意:脚本可能仍需要由 Claude 读取以进行修补或环境特定的调整
Executable code (Python/Bash, etc.) for tasks that require deterministic reliability or are repeatedly written.
- When to Include : When the same code is written repeatedly or deterministic reliability is needed
- Example : for PDF rotation tasks
scripts/rotate_pdf.py - Benefits : Token-efficient, deterministic, can be executed without loading into context
- Note : Scripts may still need to be read by Claude for patching or environment-specific adjustments
参考资料(references/
)
references/References (references/
)
references/用于根据需要加载到上下文中以指导 Claude 过程和思考的文档和参考材料。
- 何时包含:用于 Claude 在工作时应参考的文档
- 示例:用于财务模式的 、用于公司保密协议模板的
references/finance.md、用于公司政策的references/mnda.md、用于 API 规范的references/policies.mdreferences/api_docs.md - 用例:数据库模式、API 文档、领域知识、公司政策、详细工作流程指南
- 优点:保持 SKILL.md 精简,仅在 Claude 确定需要时加载
- 最佳实践:如果文件较大(>10k 字),在 SKILL.md 中包含 grep 搜索模式
- 避免重复:信息应仅存在于 SKILL.md 或参考文件中,而不是两者都有。除非信息确实是技能的核心,否则优先将详细信息放在参考文件中——这样可以保持 SKILL.md 精简,同时使信息可发现而不占用上下文窗口。仅在 SKILL.md 中保留基本的程序性指令和工作流程指导;将详细的参考材料、模式和示例移至参考文件。
Documents and reference materials loaded into context as needed to guide Claude's process and thinking.
- When to Include : For documents Claude should reference while working
- Examples : for financial patterns,
references/finance.mdfor company NDA templates,references/mnda.mdfor company policies,references/policies.mdfor API specificationsreferences/api_docs.md - Use Cases : Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides
- Benefits : Keeps SKILL.md lean, loaded only when Claude determines it's needed
- Best Practice : If files are large (>10k words), include grep search patterns in SKILL.md
- Avoid Duplication : Information should exist only in SKILL.md or reference files, not both. Unless information is truly core to the Skill, prioritize placing detailed information in reference files—this keeps SKILL.md lean while making information discoverable without occupying the context window. Only keep basic procedural instructions and workflow guidance in SKILL.md; move detailed reference materials, patterns, and examples to reference files.
资产(assets/
)
assets/Assets (assets/
)
assets/不打算加载到上下文中,而是在 Claude 产生的输出中使用的文件。
- 何时包含:当技能需要将在最终输出中使用的文件时
- 示例:用于品牌资产的 、用于 PowerPoint 模板的
assets/logo.png、用于 HTML/React 样板的assets/slides.pptx、用于排版的assets/frontend-template/assets/font.ttf - 用例:模板、图像、图标、样板代码、字体、被复制或修改的示例文档
- 优点:将输出资源与文档分开,使 Claude 能够使用文件而不将其加载到上下文中
Files not intended to be loaded into context, but used in the output generated by Claude.
- When to Include : When the Skill requires files to 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 to be copied or modified
- Benefits : Separates output resources from documentation, allowing Claude to use files without loading them into context
技能中不应包含的内容
What Not to Include in Skills
技能应仅包含直接支持其功能的必要文件。不要创建多余的文档或辅助文件,包括:
- README.md
- INSTALLATION_GUIDE.md
- QUICK_REFERENCE.md
- CHANGELOG.md
- 等等
技能应仅包含 AI 代理完成手头工作所需的信息。它不应包含关于创建过程的辅助上下文、设置和测试程序、面向用户的文档等。创建额外的文档文件只会增加混乱和困惑。
Skills should only contain necessary files that directly support their functionality. Do not create redundant documentation or auxiliary files, including:
- README.md
- INSTALLATION_GUIDE.md
- QUICK_REFERENCE.md
- CHANGELOG.md
- And so on
Skills should only contain the information an AI agent needs to get the job done. It should not include auxiliary context about the creation process, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files only adds clutter and confusion.
渐进式披露设计原则
Progressive Disclosure Design Principles
技能使用三级加载系统来有效管理上下文:
- 元数据(名称 + 描述) - 始终在上下文中(约 100 字)
- SKILL.md 正文 - 当技能触发时(<5k 字)
- 捆绑资源 - 根据 Claude 需要(无限制,因为脚本可以在不读取到上下文窗口的情况下执行)
Skills use a three-level loading system to manage context effectively:
- Metadata (Name + Description) - Always in context (~100 words)
- SKILL.md Body - When the Skill is triggered (<5k words)
- Bundled Resources - As needed by Claude (unlimited, since scripts can be executed without being read into the context window)
渐进式披露模式
Progressive Disclosure Patterns
保持 SKILL.md 正文精简,不超过 500 行,以最小化上下文膨胀。当接近此限制时,将内容拆分到单独的文件中。将内容拆分到其他文件时,从 SKILL.md 中引用它们并清楚描述何时读取它们非常重要,以确保技能的读者知道它们的存在以及何时使用它们。
关键原则: 当技能支持多种变体、框架或选项时,仅在 SKILL.md 中保留核心工作流程和选择指导。将特定于变体的详细信息(模式、示例、配置)移至单独的参考文件。
模式 1:带参考资料的高级指南
markdown
undefinedKeep the SKILL.md body lean, under 500 lines, to minimize context bloat. When approaching this limit, split content into separate files. When splitting content into other files, it's important to reference them from SKILL.md and clearly describe when to read them, to ensure readers of the Skill know they exist and when to use them.
Key Principle: When a Skill supports multiple variants, frameworks, or options, only keep core workflows and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configurations) to separate reference files.
Pattern 1: High-Level Guide with References
markdown
undefinedPDF 处理
PDF Processing
快速入门
Quick Start
使用 pdfplumber 提取文本:
[代码示例]
Use pdfplumber to extract text:
[Code Example]
高级功能
Advanced Features
- 表单填写:完整指南请参见 FORMS.md
- API 参考:所有方法请参见 REFERENCE.md
- 示例:常见模式请参见 EXAMPLES.md
Claude 仅在需要时加载 FORMS.md、REFERENCE.md 或 EXAMPLES.md。
**模式 2:领域特定组织**
对于具有多个领域的技能,按领域组织内容以避免加载不相关的上下文:
bigquery-skill/
├── SKILL.md(概述和导航)
└── reference/
├── finance.md(收入、账单指标)
├── sales.md(机会、管道)
├── product.md(API 使用、功能)
└── marketing.md(活动、归因)
当用户询问销售指标时,Claude 只读取 sales.md。
类似地,对于支持多种框架或变体的技能,按变体组织:
cloud-deploy/
├── SKILL.md(工作流程 + 提供商选择)
└── references/
├── aws.md(AWS 部署模式)
├── gcp.md(GCP 部署模式)
└── azure.md(Azure 部署模式)
当用户选择 AWS 时,Claude 只读取 aws.md。
**模式 3:条件详情**
显示基本内容,链接到高级内容:
```markdown- Form Filling: See FORMS.md for complete guide
- API Reference: See REFERENCE.md for all methods
- Examples: See EXAMPLES.md for common patterns
Claude only loads FORMS.md, REFERENCE.md, or EXAMPLES.md when needed.
**Pattern 2: Domain-Specific Organization**
For Skills with multiple domains, organize content by domain to avoid loading irrelevant context:
bigquery-skill/
├── SKILL.md (Overview and Navigation)
└── reference/
├── finance.md (Revenue, billing metrics)
├── sales.md (Opportunities, pipeline)
├── product.md (API usage, features)
└── marketing.md (Campaigns, attribution)
When a user asks about sales metrics, Claude only reads sales.md.
Similarly, for Skills supporting multiple frameworks or variants, organize by variant:
cloud-deploy/
├── SKILL.md (Workflow + Provider Selection)
└── references/
├── aws.md (AWS deployment patterns)
├── gcp.md (GCP deployment patterns)
└── azure.md (Azure deployment patterns)
When a user selects AWS, Claude only reads aws.md.
**Pattern 3: Conditional Details**
Show basic content, link to advanced content:
```markdownDOCX 处理
DOCX Processing
创建文档
Create Documents
使用 docx-js 创建新文档。请参见 DOCX-JS.md。
Use docx-js to create new documents. See DOCX-JS.md.
编辑文档
Edit Documents
对于简单编辑,直接修改 XML。
对于修订追踪:请参见 REDLINING.md
对于 OOXML 详情:请参见 OOXML.md
Claude 仅在用户需要这些功能时读取 REDLINING.md 或 OOXML.md。
**重要指南:**
- **避免深层嵌套引用** - 保持引用从 SKILL.md 起一层深度。所有参考文件应直接从 SKILL.md 链接。
- **结构化较长的参考文件** - 对于超过 100 行的文件,在顶部包含目录,以便 Claude 在预览时可以看到完整范围。For simple edits, modify XML directly.
For Revision Tracking: See REDLINING.md
For OOXML Details: See OOXML.md
Claude only reads REDLINING.md or OOXML.md when users need these features.
**Important Guidelines:**
- **Avoid Deeply Nested References** - Keep references one level deep from SKILL.md. All reference files should be linked directly from SKILL.md.
- **Structure Longer Reference Files** - For files over 100 lines, include a table of contents at the top so Claude can see the full scope when previewing.技能创建流程
Skill Creation Process
技能创建涉及以下步骤:
- 通过具体示例理解技能
- 规划可重用的技能内容(脚本、参考资料、资产)
- 初始化技能(运行 init_skill.py)
- 编辑技能(实现资源并编写 SKILL.md)
- 打包技能(运行 package_skill.py)
- 根据实际使用进行迭代
按顺序执行这些步骤,仅在有明确理由说明它们不适用时才跳过。
Skill creation involves the following steps:
- Understand the Skill through concrete examples
- Plan reusable Skill content (scripts, references, assets)
- Initialize the Skill (run init_skill.py)
- Edit the Skill (implement resources and write SKILL.md)
- Package the Skill (run package_skill.py)
- Iterate based on actual use
Execute these steps in order, skipping only when there's a clear reason they don't apply.
步骤 1:通过具体示例理解技能
Step 1: Understand the Skill through Concrete Examples
仅当技能的使用模式已经清楚理解时才跳过此步骤。即使在处理现有技能时,此步骤仍然有价值。
要创建有效的技能,需要清楚理解技能将如何使用的具体示例。这种理解可以来自直接的用户示例或经过用户反馈验证的生成示例。
例如,在构建图像编辑器技能时,相关问题包括:
- "图像编辑器技能应该支持哪些功能?编辑、旋转,还有其他吗?"
- "您能给一些如何使用此技能的示例吗?"
- "我可以想象用户会要求诸如'去除此图像中的红眼'或'旋转此图像'之类的事情。您还能想到此技能的其他使用方式吗?"
- "用户说什么应该触发此技能?"
为避免让用户不堪重负,避免在单条消息中问太多问题。从最重要的问题开始,根据需要跟进以获得更好的效果。
当对技能应支持的功能有清晰的认识时,结束此步骤。
Skip this step only when the usage patterns of the Skill are already clearly understood. This step is still valuable even when working on an existing Skill.
To create an effective Skill, you need a clear understanding of concrete examples of how the Skill will be used. This understanding can come from direct user examples or generated examples validated by user feedback.
For example, when building an image editor Skill, relevant questions include:
- "What features should the image editor Skill support? Editing, rotation, or others?"
- "Can you give some examples of how this Skill would be used?"
- "I can imagine users asking things like 'Remove red-eye from this image' or 'Rotate this image'. Can you think of other ways this Skill might be used?"
- "What should users say to 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 results.
End this step when you have a clear understanding of the features the Skill should support.
步骤 2:规划可重用的技能内容
Step 2: Plan Reusable Skill Content
要将具体示例转化为有效的技能,通过以下方式分析每个示例:
- 考虑如何从头开始执行示例
- 确定在重复执行这些工作流程时哪些脚本、参考资料和资产会有帮助
示例:在构建 技能来处理诸如"帮我旋转这个 PDF"之类的查询时,分析表明:
pdf-editor- 旋转 PDF 需要每次重写相同的代码
- 将 脚本存储在技能中会很有帮助
scripts/rotate_pdf.py
示例:在设计 技能来处理诸如"为我构建一个待办事项应用"或"为我构建一个跟踪我步数的仪表板"之类的查询时,分析表明:
frontend-webapp-builder- 编写前端 Web 应用每次都需要相同的样板 HTML/React
- 将包含样板 HTML/React 项目文件的 模板存储在技能中会很有帮助
assets/hello-world/
示例:在构建 技能来处理诸如"今天有多少用户登录?"之类的查询时,分析表明:
big-query- 查询 BigQuery 需要每次重新发现表模式和关系
- 记录表模式的 文件存储在技能中会很有帮助
references/schema.md
要确定技能的内容,分析每个具体示例以创建要包含的可重用资源列表:脚本、参考资料和资产。
To turn concrete examples into an effective Skill, analyze each example by:
- Considering how to execute the example from scratch
- Identifying which scripts, references, and assets would help when repeating these workflows
Example: When building a Skill to handle queries like "Help me rotate this PDF", analysis shows:
pdf-editor- Rotating a PDF requires rewriting the same code every time
- Storing a script in the Skill would be helpful
scripts/rotate_pdf.py
Example: When designing a Skill to handle queries like "Build a todo app for me" or "Build a dashboard to track my steps", analysis shows:
frontend-webapp-builder- Writing frontend web apps requires the same boilerplate HTML/React every time
- Storing an template with boilerplate HTML/React project files in the Skill would be helpful
assets/hello-world/
Example: When building a Skill to handle queries like "How many users logged in today?", analysis shows:
big-query- Querying BigQuery requires rediscovering table schemas and relationships every time
- Storing a file documenting table schemas in the Skill would be helpful
references/schema.md
To determine the Skill's content, analyze each concrete example to create a list of reusable resources to include: scripts, references, and assets.
步骤 3:初始化技能
Step 3: Initialize the Skill
此时,是时候实际创建技能了。
仅当正在开发的技能已存在且需要迭代或打包时才跳过此步骤。在这种情况下,继续下一步。
从头创建新技能时,始终运行 脚本。该脚本方便地生成一个新的模板技能目录,自动包含技能所需的一切,使技能创建过程更加高效和可靠。
init_skill.py用法:
bash
scripts/init_skill.py <技能名称> --path <输出目录>该脚本:
- 在指定路径创建技能目录
- 生成带有正确前置元数据和 TODO 占位符的 SKILL.md 模板
- 创建示例资源目录:、
scripts/和references/assets/ - 在每个目录中添加可以自定义或删除的示例文件
初始化后,根据需要自定义或删除生成的 SKILL.md 和示例文件。
At this point, it's time to actually create the Skill.
Skip this step only when the Skill being developed already exists and needs to be iterated on or packaged. In that case, proceed to the next step.
When creating a new Skill from scratch, always run the script. This script conveniently generates a new template Skill directory, automatically including everything needed for the Skill, making the Skill creation process more efficient and reliable.
init_skill.pyUsage:
bash
scripts/init_skill.py <skill-name> --path <output-directory>The script:
- Creates a Skill directory at the specified path
- Generates a SKILL.md template with correct 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 delete the generated SKILL.md and example files as needed.
步骤 4:编辑技能
Step 4: Edit the Skill
编辑(新生成或现有的)技能时,请记住该技能是为另一个 Claude 实例使用而创建的。包含对 Claude 有益且不明显的信息。考虑哪些程序性知识、特定领域的详细信息或可重用资产将帮助另一个 Claude 实例更有效地执行这些任务。
When editing a newly generated or existing Skill, remember that the Skill is created for use by another instance of Claude. Include information that is beneficial and non-obvious to Claude. Consider what procedural knowledge, domain-specific details, or reusable assets will help another instance of Claude perform these tasks more effectively.
学习经过验证的设计模式
Learn Proven Design Patterns
根据您技能的需要参考这些有用的指南:
- 多步骤流程:请参见 references/workflows.md 了解顺序工作流程和条件逻辑
- 特定输出格式或质量标准:请参见 references/output-patterns.md 了解模板和示例模式
这些文件包含有效技能设计的既定最佳实践。
Refer to these useful guides as needed for your Skill:
- Multi-step Processes: See references/workflows.md for sequential workflows and conditional logic
- Specific Output Formats or Quality Standards: See references/output-patterns.md for templates and example patterns
These files contain established best practices for effective Skill design.
从可重用技能内容开始
Start with Reusable Skill Content
要开始实现,从上面确定的可重用资源开始:、 和 文件。请注意,此步骤可能需要用户输入。例如,在实现 技能时,用户可能需要提供品牌资产或模板存储在 中,或文档存储在 中。
scripts/references/assets/brand-guidelinesassets/references/添加的脚本必须通过实际运行来测试,以确保没有错误并且输出符合预期。如果有许多类似的脚本,只需测试具有代表性的样本,以确保它们都能正常工作,同时平衡完成时间。
任何技能不需要的示例文件和目录都应删除。初始化脚本在 、 和 中创建示例文件以演示结构,但大多数技能不需要所有这些。
scripts/references/assets/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, users may need to provide brand assets or templates to store in , or documents to store in .
scripts/references/assets/brand-guidelinesassets/references/Added scripts must be tested by actually running them to ensure there are no errors and the output meets expectations. If there are many similar scripts, only test a representative sample to ensure they all work correctly, while balancing completion time.
Any example files and directories not needed by the Skill should be deleted. The initialization script creates example files in , , and to demonstrate the structure, but most Skills won't need all of them.
scripts/references/assets/更新 SKILL.md
Update SKILL.md
写作指南: 始终使用祈使句/不定式形式。
Writing Guidelines: Always use imperative/infinitive form.
前置元数据
Frontmatter
编写带有 和 的 YAML 前置元数据:
namedescription- :技能名称
name - :这是技能的主要触发机制,帮助 Claude 理解何时使用该技能。
description- 包括技能做什么以及使用它的特定触发器/上下文。
- 在此处包含所有"何时使用"信息——而不是在正文中。正文仅在触发后加载,因此正文中的"何时使用此技能"部分对 Claude 没有帮助。
- 技能的示例描述:"全面的文档创建、编辑和分析,支持修订追踪、批注、格式保留和文本提取。当 Claude 需要处理专业文档(.docx 文件)时使用,用于:(1) 创建新文档,(2) 修改或编辑内容,(3) 处理修订追踪,(4) 添加批注,或任何其他文档任务"
docx
不要在 YAML 前置元数据中包含任何其他字段。
Write YAML frontmatter with and :
namedescription- : Skill name
name - : This is the Skill's primary trigger mechanism, helping Claude understand when to use the Skill.
description- Include what the Skill does and specific triggers/contexts for using it.
- Include all "when to use" information here—not in the body. The body is only loaded after triggering, so a "when to use this Skill" section in the body won't help Claude.
- Example description for a Skill: "Comprehensive document creation, editing, and analysis with support for revision tracking, comments, format preservation, and text extraction. Use when Claude needs to handle professional documents (.docx files) for: (1) creating new documents, (2) modifying or editing content, (3) handling revision tracking, (4) adding comments, or any other document tasks"
docx
Do not include any other fields in the YAML frontmatter.
正文
Body
编写使用技能及其捆绑资源的说明。
Write instructions for using the Skill and its bundled resources.
步骤 5:打包技能
Step 5: Package the Skill
技能开发完成后,必须将其打包成可分发的 .skill 文件与用户共享。打包过程会自动先验证技能以确保其满足所有要求:
bash
scripts/package_skill.py <技能文件夹路径>可选的输出目录指定:
bash
scripts/package_skill.py <技能文件夹路径> ./dist打包脚本将:
-
验证技能自动检查:
- YAML 前置元数据格式和必需字段
- 技能命名约定和目录结构
- 描述完整性和质量
- 文件组织和资源引用
-
打包技能(如果验证通过),创建以技能命名的 .skill 文件(例如),其中包含所有文件并保持正确的目录结构以供分发。.skill 文件是扩展名为 .skill 的 zip 文件。
my-skill.skill
如果验证失败,脚本将报告错误并退出而不创建包。修复任何验证错误并再次运行打包命令。
Once Skill development is complete, it must be packaged into a distributable .skill file to share with users. The packaging process automatically validates the Skill first to ensure it meets all requirements:
bash
scripts/package_skill.py <skill-folder-path>Optional output directory specification:
bash
scripts/package_skill.py <skill-folder-path> ./distThe packaging script will:
-
Validate the Skill automatically by checking:
- YAML frontmatter format and required fields
- Skill naming conventions and directory structure
- Description completeness and quality
- File organization and resource references
-
Package the Skill (if validation passes), creating a .skill file named after the Skill (e.g.,) that contains all files and maintains the correct directory structure for distribution. The .skill file is a zip file with a .skill extension.
my-skill.skill
If validation fails, the script will report errors and exit without creating the package. Fix any validation errors and run the packaging command again.
步骤 6:迭代
Step 6: Iterate
测试技能后,用户可能会要求改进。这通常发生在使用技能后不久,对技能的表现有新鲜的上下文。
迭代工作流程:
- 在实际任务中使用技能
- 注意困难或低效之处
- 确定应如何更新 SKILL.md 或捆绑资源
- 实施更改并再次测试
After testing the Skill, users may request improvements. This usually happens shortly after using the Skill, when the context of its performance is fresh.
Iteration Workflow:
- Use the Skill in actual tasks
- Note difficulties or inefficiencies
- Determine how SKILL.md or bundled resources should be updated
- Implement changes and test again