skill-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Creator
Skill Creator
Tools for creating and validating Agent Skills.
用于创建和验证Agent Skills的工具。
About Skills
关于Skills
Skills are modular, self-contained packages that extend an Agent's capabilities by providing specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific domains or tasks—they transform an Agent from a general-purpose agent into a specialized agent equipped with procedural knowledge that no model can fully possess.
Skills是模块化、独立的软件包,通过提供专业知识、工作流和工具来扩展Agent的能力。可以将它们视为特定领域或任务的“入门指南”——它们能将通用Agent转变为具备程序知识的专业Agent,而这些知识是任何模型都无法完全拥有的。
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的操作指南
- 领域专业知识 - 公司专属知识、数据结构、业务逻辑
- 捆绑资源 - 用于复杂重复任务的脚本、参考资料和资产
Core Principles
核心原则
Concise is Key
简洁至上
The context window is a public good. Skills share the context window with everything else the Agent needs: system prompt, conversation history, other Skills' metadata, and the actual user request.
Default assumption: The Agent is already very smart. Only add context the Agent doesn't already have. Challenge each piece of information: "Does the Agent really need this explanation?" and "Does this paragraph justify its token cost?"
Prefer concise examples over verbose explanations.
上下文窗口是公共资源。Skills需要与Agent所需的其他所有内容共享上下文窗口:系统提示词、对话历史、其他Skills的元数据以及实际用户请求。
默认假设:Agent已经足够智能。 仅添加Agent不具备的上下文信息。对每一条信息都要提出质疑:“Agent真的需要这个解释吗?”以及“这段内容的token成本是否合理?”
优先使用简洁示例,而非冗长说明。
Set Appropriate Degrees of Freedom
设置合适的自由度
Match the level of specificity to the task's fragility and variability:
High freedom (text-based instructions): Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.
Medium freedom (pseudocode or scripts with parameters): 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.
Think of an Agent as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom).
根据任务的脆弱性和可变性匹配具体程度:
高自由度(基于文本的指令):当存在多种有效方法、决策依赖上下文或需要启发式指导时使用。
中等自由度(带参数的伪代码或脚本):当存在首选模式、允许一定变化或配置会影响行为时使用。
低自由度(特定脚本,参数极少):当操作易出错、一致性至关重要或必须遵循特定步骤序列时使用。
可以把Agent想象成在探索路径:两侧是悬崖的狭窄桥梁需要明确的护栏(低自由度),而开阔的场地则允许多种路线(高自由度)。
Skill Structure
Skill结构
Every skill consists of a required SKILL.md file and optional bundled resources:
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ └── description: (required)
│ └── 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文件和可选的捆绑资源:
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter metadata (required)
│ │ ├── name: (required)
│ │ └── description: (required)
│ └── Markdown instructions (required)
└── Bundled Resources (optional)
├── scripts/ - 可执行代码(Python/Bash等)
├── references/ - 按需加载到上下文的文档
└── assets/ - 输出所用文件(模板、图标、字体等)SKILL.md (required)
SKILL.md(必填)
Every SKILL.md consists of:
- Frontmatter (YAML): Contains and
namefields. These are the only fields that the Agent reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.description - Body (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).
每个SKILL.md包含:
- 前置元数据(YAML格式):包含和
name字段。这两个字段是Agent判断何时使用该Skill的依据,因此清晰、全面地描述Skill的功能和适用场景至关重要。description - 主体内容(Markdown格式):使用该Skill的指令和指南,仅在Skill被触发后加载(若需要)。
Resource Directories
资源目录
| Directory | When to include | Examples |
|---|---|---|
| Skills requiring Python scripts | |
| Detailed documentation for agent reference | |
| Templates, boilerplate, or files for output | |
| 目录 | 适用场景 | 示例 |
|---|---|---|
| 需要Python脚本的Skills | |
| Agent工作时需要参考的详细文档 | |
| 输出所用的模板、样板代码或文件 | |
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 Agent for patching or environment-specific adjustments
用于需要确定性可靠性或重复编写的任务的可执行代码(Python/Bash等)。
- 适用场景:当相同代码被重复编写或需要确定性可靠性时
- 示例:用于PDF旋转任务的
scripts/rotate_pdf.py - 优势:Token效率高、结果确定,无需加载到上下文即可执行
- 注意:Agent可能仍需读取脚本以进行补丁或环境特定调整
References (references/
)
references/参考资料(references/
)
references/Documentation and reference material intended to be loaded as needed into context to inform Agent's process and thinking.
- When to include: For documentation that Agent 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.md - Use cases: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides
- Benefits: Keeps SKILL.md lean, loaded only when Agent determines it's needed
- Best practice: If files are large (>10k words), include grep search patterns in SKILL.md
- Avoid duplication: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.
用于为Agent的流程和思考提供信息的文档和参考资料,按需加载到上下文。
- 适用场景:Agent工作时需要参考的文档
- 示例:用于财务数据结构的、公司NDA模板的
references/finance.md、公司政策的references/mnda.md、API规范的references/policies.mdreferences/api.md - 使用场景:数据库结构、API文档、领域知识、公司政策、详细工作流指南
- 优势:保持SKILL.md简洁,仅在Agent判定需要时加载
- 最佳实践:若文件较大(超过10000字),在SKILL.md中添加grep搜索模式
- 避免重复:信息应仅存在于SKILL.md或参考文件中,不要重复。除非是Skill的核心内容,否则优先将详细信息放在参考文件中——这样既能保持SKILL.md简洁,又能让信息可被发现且不占用上下文窗口。仅在SKILL.md中保留必要的流程指令和工作流指南;将详细参考资料、数据结构和示例移至参考文件。
Assets (assets/
)
assets/资产(assets/
)
assets/Files not intended to be loaded into context, but rather used within the output Agent 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 Agent to use files without loading them into context
无需加载到上下文,而是用于Agent生成输出的文件。
- 适用场景:Skill需要用于最终输出的文件时
- 示例:品牌资产、PowerPoint模板
assets/logo.png、HTML/React样板代码assets/slides.pptx、字体文件assets/frontend-template/assets/font.ttf - 使用场景:模板、图片、图标、样板代码、字体、可复制或修改的示例文档
- 优势:将输出资源与文档分离,Agent无需加载到上下文即可使用文件
What to Not Include in a Skill
Skill中不应包含的内容
A skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:
- README.md
- INSTALLATION_GUIDE.md
- QUICK_REFERENCE.md
- CHANGELOG.md
- etc.
The skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxiliary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.
Skill应仅包含直接支持其功能的必要文件。请勿创建无关文档或辅助文件,包括:
- README.md
- INSTALLATION_GUIDE.md
- QUICK_REFERENCE.md
- CHANGELOG.md
- 等
Skill应仅包含AI Agent完成当前任务所需的信息,不应包含Skill创建过程的辅助上下文、设置和测试流程、面向用户的文档等。创建额外文档只会增加混乱。
Progressive Disclosure Design Principle
渐进式披露设计原则
Skills use a three-level loading system to manage context efficiently:
- Metadata (name + description) - Always in context (~100 words)
- SKILL.md body - When skill triggers (<5k words)
- Bundled resources - As needed by Agent (Unlimited because scripts can be executed without reading into context window)
Skills采用三级加载系统以高效管理上下文:
- 元数据(名称+描述) - 始终存在于上下文中(约100词)
- SKILL.md主体 - Skill被触发时加载(少于5000词)
- 捆绑资源 - Agent按需加载(无限制,因为脚本可在不读取到上下文窗口的情况下执行)
Progressive Disclosure Patterns
渐进式披露模式
Keep SKILL.md body to the essentials and under 500 lines to minimize context bloat. Split content into separate files when approaching this limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.
Key principle: When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.
Pattern 1: High-level guide with references
markdown
undefined将SKILL.md主体控制在必要内容范围内,且不超过500行,以减少上下文冗余。当接近此限制时,将内容拆分到单独文件中。将内容拆分到其他文件时,务必在SKILL.md中引用并明确说明何时读取,以确保Skill的使用者知晓这些文件的存在及使用时机。
核心原则:当Skill支持多种变体、框架或选项时,仅在SKILL.md中保留核心工作流和选择指南。将变体特定的细节(模式、示例、配置)移至单独的参考文件。
模式1:带参考资料的高级指南
markdown
undefinedPDF Processing
PDF处理
Quick start
快速开始
Extract text with pdfplumber:
[code example]
使用pdfplumber提取文本:
[代码示例]
Advanced features
高级功能
- Form filling: See FORMS.md for complete guide
- API reference: See REFERENCE.md for all methods
- Examples: See EXAMPLES.md for common patterns
The Agent loads FORMS.md, REFERENCE.md, or EXAMPLES.md only 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, the Agent 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 the user chooses AWS, the Agent only reads aws.md.
**Pattern 3: Conditional details**
```markdown- 表单填充:完整指南请见FORMS.md
- API参考:所有方法请见REFERENCE.md
- 示例:常见模式请见EXAMPLES.md
Agent仅在需要时加载FORMS.md、REFERENCE.md或EXAMPLES.md。
**模式2:按领域组织**
对于涉及多个领域的Skills,按领域组织内容以避免加载无关上下文:
bigquery-skill/
├── SKILL.md(概述和导航)
└── reference/
├── finance.md(收入、计费指标)
├── sales.md(销售机会、销售漏斗)
├── product.md(API使用、功能)
└── marketing.md(营销活动、归因分析)
当用户询问销售指标时,Agent仅读取sales.md。
类似地,对于支持多种框架或变体的Skills,按变体组织:
cloud-deploy/
├── SKILL.md(工作流+供应商选择)
└── references/
├── aws.md(AWS部署模式)
├── gcp.md(GCP部署模式)
└── azure.md(Azure部署模式)
当用户选择AWS时,Agent仅读取aws.md。
**模式3:条件式细节**
```markdownDOCX Processing
DOCX处理
Creating documents
创建文档
Use docx-js for new documents. See DOCX-JS.md.
使用docx-js创建新文档。请见DOCX-JS.md。
Editing documents
编辑文档
For simple edits, modify the XML directly.
For tracked changes: See REDLINING.md
For OOXML details: See OOXML.md
The Agent reads REDLINING.md or OOXML.md only when the user needs those features.
**Important guidelines:**
- **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.
- **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so the Agent can see the full scope when previewing.对于简单编辑,直接修改XML即可。
如需跟踪更改:请见REDLINING.md
如需OOXML细节:请见OOXML.md
仅当用户需要这些功能时,Agent才会读取REDLINING.md或OOXML.md。
**重要指南**:
- **避免深层嵌套引用** - 所有参考文件应直接链接到SKILL.md,保持引用层级为一级。
- **结构化长参考文件** - 对于超过100行的文件,在顶部添加目录,以便Agent预览时了解完整范围。Skill Creation Process
Skill创建流程
Skill creation involves these steps:
- Understand the skill with concrete examples
- Plan reusable skill contents (scripts, references, assets)
- Initialize the skill
- Edit the skill (implement resources and write SKILL.md)
- Package the skill
- Iterate based on real usage
Follow these steps in order, skipping only if there is a clear reason why they are not applicable.
Skill创建包含以下步骤:
- 通过具体示例理解Skill的需求
- 规划可复用的Skill内容(脚本、参考资料、资产)
- 初始化Skill
- 编辑Skill(实现资源并编写SKILL.md)
- 打包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.
For 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的具体使用场景。这些理解可来自直接的用户示例,或经用户反馈验证的生成示例。
例如,构建图像编辑Skill时,相关问题包括:
- “图像编辑Skill应支持哪些功能?编辑、旋转,还是其他?”
- “能否举例说明该Skill的使用场景?”
- “我能想到用户会要求‘去除图片中的红眼’或‘旋转图片’,还有其他使用场景吗?”
- “用户说什么内容时应该触发这个Skill?”
为避免给用户造成负担,请勿在一条消息中提出过多问题。先从最重要的问题开始,必要时再跟进,以提升效果。
当明确Skill应支持的功能后,即可结束此步骤。
Step 2: Planning the Reusable Skill Contents
步骤2:规划可复用的Skill内容
To turn concrete examples into an effective skill, analyze each example by:
- Considering how to execute on the example from scratch
- Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
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.
要将具体示例转化为有效的Skill,需按以下方式分析每个示例:
- 考虑如何从头实现该示例
- 识别重复执行这些工作流时需要的脚本、参考资料和资产
示例:构建处理“帮我旋转这个PDF”这类请求的Skill时,分析结果如下:
pdf-editor- 旋转PDF需要重复编写相同代码
- 在Skill中存储脚本会很有帮助
scripts/rotate_pdf.py
示例:构建处理“帮我做一个待办事项应用”或“帮我做一个步数跟踪仪表盘”这类请求的Skill时,分析结果如下:
frontend-webapp-builder- 编写前端Web应用需要重复使用相同的HTML/React样板代码
- 在Skill中存储包含HTML/React项目样板代码的模板会很有帮助
assets/hello-world/
示例:构建处理“今天有多少用户登录?”这类请求的Skill时,分析结果如下:
big-query- 查询BigQuery需要重复查找表结构和关系
- 在Skill中存储记录表结构的文件会很有帮助
references/schema.md
通过分析每个具体示例,列出需包含的可复用资源(脚本、参考资料、资产),以此确定Skill的内容。
Step 3: Initialize the Skill
步骤3:初始化Skill
At this point, it is time to actually create the skill.
Skip this step only if the skill being developed already exists. 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
uv run scripts/init.py <skill-name>Optional flags to create resource directories:
bash
uv run scripts/init.py <skill-name> --script --ref --assetThe initialization script creates:
- Skill directory structure
- SKILL.md template with YAML frontmatter
Use flags to create resource directories as needed:
- creates
--scriptscripts/ - creates
--refreferences/ - creates
--assetassets/
此时可以开始实际创建Skill了。
仅当正在开发的Skill已存在时才可跳过此步骤,否则继续执行下一步。
从零创建新Skill时,请务必运行脚本。该脚本会自动生成包含Skill所有必要内容的模板目录,使Skill创建过程更高效、可靠。
init_skill.py使用方法:
bash
uv run scripts/init.py <skill-name>用于创建资源目录的可选参数:
bash
uv run scripts/init.py <skill-name> --script --ref --asset初始化脚本会创建:
- Skill目录结构
- 包含YAML前置元数据的SKILL.md模板
按需使用参数创建资源目录:
- 创建
--script目录scripts/ - 创建
--ref目录references/ - 创建
--asset目录assets/
Step 2: Edit the Skill
步骤4:编辑Skill
When editing the (newly-generated or existing) skill, remember that the skill is being created for another Agent instance to use. Include information that would be beneficial and non-obvious to another Agent. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Agent execute these tasks more effectively.
编辑(新生成或现有)Skill时,请记住该Skill是供其他Agent实例使用的。请添加对其他Agent有帮助且非显而易见的信息,考虑哪些程序知识、领域特定细节或可复用资产能帮助其他Agent更高效地完成任务。
Learn Proven Design Patterns
学习经过验证的设计模式
Consult these helpful guides based on your skill's needs:
- 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 template and example patterns
These files contain established best practices for effective skill design.
根据Skill的需求参考以下实用指南:
- 多步骤流程:请见references/workflows.md了解顺序工作流和条件逻辑
- 特定输出格式或质量标准:请见references/output-patterns.md了解模板和示例模式
这些文件包含有效Skill设计的最佳实践。
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/Added scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected. If there are many similar scripts, only a representative sample needs to be tested to ensure confidence that they all work while balancing time to completion.
Any example files and directories not needed for the skill should be deleted. 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/添加的脚本必须经过实际运行测试,确保无bug且输出符合预期。若有多个类似脚本,只需测试代表性样本即可,在保证信心的同时平衡完成时间。
请删除Skill不需要的示例文件和目录。初始化脚本会在、和目录中创建示例文件以展示结构,但大多数Skill不需要所有示例文件。
scripts/references/assets/Add Scripts
添加脚本
Create Python scripts in directory for tasks requiring deterministic reliability. Scripts should be idempotent and handle errors gracefully.
scripts/bash
undefined在目录中创建Python脚本,用于需要确定性可靠性的任务。脚本应具备幂等性并能优雅处理错误。
scripts/bash
undefinedAdd dependencies if needed
如需添加依赖
uv add <package-name>
uv add <package-name>
Run and test the script
运行并测试脚本
uv run --frozen scripts/<script-name>.py <args>
undefineduv run --frozen scripts/<script-name>.py <args>
undefinedAdd References
添加参考资料
Add documentation files in for domain knowledge, schemas, API specs, or policies.
references/在目录中添加领域知识、数据结构、API规范或政策相关的文档。
references/Add Assets
添加资产
Add templates, boilerplate, or output files in .
assets/在目录中添加模板、样板代码或输出文件。
assets/Update SKILL.md
更新SKILL.md
Write the YAML frontmatter and Markdown body for the skill. See SKILL.md Writing Guidelines below.
编写Skill的YAML前置元数据和Markdown主体内容,请参考下文的SKILL.md编写指南。
Validate the Skill
验证Skill
You can run validation at any time:
bash
uv run scripts/validate.py <skill-directory>To allow TODO placeholders in SKILL.md body (for skills like code-style that need TODO syntax):
bash
uv run scripts/validate.py <skill-directory> --allow-todos您可随时运行验证:
bash
uv run scripts/validate.py <skill-directory>若允许SKILL.md主体中存在TODO占位符(如代码风格类Skill需要TODO语法):
bash
uv run scripts/validate.py <skill-directory> --allow-todosStep 4: Iterate
步骤5:迭代优化
After testing the skill, iterate based on real usage:
- Use the skill on actual tasks
- Notice struggles or inefficiencies
- Identify how SKILL.md or bundled resources should be updated
- Implement changes and test again
测试Skill后,根据实际使用情况迭代优化:
- 在实际任务中使用该Skill
- 记录遇到的问题或低效环节
- 确定SKILL.md或捆绑资源需要如何更新
- 实施更改并再次测试
SKILL.md Writing Guidelines
SKILL.md编写指南
YAML Frontmatter
YAML前置元数据
Write the YAML frontmatter with and :
namedescription- : The skill name
name - : This is the primary triggering mechanism for your skill, and helps the Agent understand when to use the skill.
description- Include both what the Skill does and specific triggers/contexts for when to use it.
- Include all "when to use" information here—not in the body. The body is only loaded after triggering, so "When to Use This Skill" sections in the body are not helpful to the Agent.
- Example: "Tool for creating and managing Agent Skills. Use when users want to create a new skill or manage existing skills. Supports initialization, validation, and iterative development workflows."
- Example description for a skill: "Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when the Agent needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks"
docx
Do not include any other fields in YAML frontmatter.
编写包含和的YAML前置元数据:
namedescription- :Skill的名称
name - :这是Skill的主要触发机制,帮助Agent理解何时使用该Skill。
description- 需同时包含Skill的功能和具体触发场景/上下文。
- 所有“何时使用”的信息都应放在此处,而非主体内容中。主体内容仅在触发后加载,因此主体中的“何时使用本Skill”部分对Agent没有帮助。
- 示例:“用于创建和管理Agent Skills的工具。当用户想要创建新技能或管理现有技能时使用,支持初始化、验证和迭代开发工作流。”
- Skill的示例描述:“全面的文档创建、编辑和分析工具,支持跟踪更改、批注、格式保留和文本提取。当Agent需要处理专业文档(.docx文件)时使用,适用场景包括:(1) 创建新文档,(2) 修改或编辑内容,(3) 处理跟踪更改,(4) 添加批注,或其他任何文档相关任务”
docx
请勿在YAML前置元数据中添加其他字段。
Markdown Body
Markdown主体
Write instructions for using the skill and its bundled resources. Use imperative/infinitive form.
编写使用该Skill及其捆绑资源的指令,使用祈使语气/不定式形式。
Git Ignore
Git忽略配置
When creating a skill with Python scripts:
bash
cp .gitignore <skill-name>/.gitignoreThis excludes , , and from version control.
__pycache__/*.pyc.venv/创建包含Python脚本的Skill时:
bash
cp .gitignore <skill-name>/.gitignore此操作会将、和排除在版本控制之外。
__pycache__/*.pyc.venv/uv Commands
uv命令
bash
uv init --bare # Initialize project
uv add <package-name> # Add dependency
uv remove <package-name> # Remove dependency
uv run --frozen scripts/<name>.py <args> # Run script
uv run scripts/<script-name>.py <args> # Run skill scriptsAll skill-creator scripts use uv. If uv is not installed, ask the user to install it first.
bash
uv init --bare # 初始化项目
uv add <package-name> # 添加依赖
uv remove <package-name> # 移除依赖
uv run --frozen scripts/<name>.py <args> # 运行脚本
uv run scripts/<script-name>.py <args> # 运行Skill脚本所有Skill Creator脚本都使用uv。若未安装uv,请先让用户安装。