create-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate Skill
创建Skill
This skill helps you scaffold new agent skills that conform to the Agent Skills specification and the dotnet/skills repository conventions.
该Skill可帮助你搭建符合Agent Skills规范和dotnet/skills仓库约定的新Agent Skill。
When to Use
适用场景
- Creating a new skill from scratch
- Generating a SKILL.md file with proper frontmatter
- Setting up the skill directory structure with optional folders
- Ensuring compliance with agentskills.io specification
- 从零开始创建新Skill
- 生成带有正确前置元数据的SKILL.md文件
- 搭建包含可选文件夹的Skill目录结构
- 确保符合agentskills.io规范
When Not to Use
不适用场景
- Modifying existing skills (edit directly instead)
- Creating custom agents (use the agents/ directory pattern)
- 修改现有Skill(直接编辑即可)
- 创建自定义Agent(使用agents/目录模式)
Inputs
输入参数
| Input | Required | Description |
|---|---|---|
| Skill name | Yes | Lowercase, alphanumeric, hyphens only (e.g., |
| Description | Yes | What the skill does and when agents should use it (1-1024 chars) |
| Purpose | Yes | One paragraph describing the outcome |
| Workflow steps | Recommended | Numbered steps the agent should follow |
| 输入参数 | 是否必填 | 描述 |
|---|---|---|
| Skill名称 | 是 | 仅包含小写字母、数字和连字符(例如: |
| 描述 | 是 | 说明该Skill的功能及Agent应何时使用它(1-1024字符) |
| 用途 | 是 | 一段描述Skill预期成果的文字 |
| 工作流程步骤 | 推荐 | Agent应遵循的编号步骤 |
Workflow
工作流程
Step 1: Validate the skill name
步骤1:验证Skill名称
Ensure the name:
- Contains only lowercase letters, numbers, and hyphens
- Does not start or end with a hyphen
- Does not contain consecutive hyphens
- Is between 1-64 characters
确保名称:
- 仅包含小写字母、数字和连字符
- 不以连字符开头或结尾
- 不包含连续的连字符
- 长度在1-64字符之间
Step 2: Create the skill directory
步骤2:创建Skill目录
skills/<skill-name>/
└── SKILL.mdskills/<skill-name>/
└── SKILL.mdStep 3: Generate SKILL.md with frontmatter
步骤3:生成带前置元数据的SKILL.md
Create the file with required YAML frontmatter:
yaml
---
name: <skill-name>
description: <description of what the skill does and when to use it>
---创建包含必填YAML前置元数据的文件:
yaml
---
name: <skill-name>
description: <description of what the skill does and when to use it>
---Step 4: Add body content sections
步骤4:添加正文内容章节
Include these recommended sections:
- Purpose: One paragraph describing the outcome
- When to Use: Bullet list of appropriate scenarios
- When Not to Use: Boundaries and exclusions
- Inputs: Table of required and optional inputs
- Workflow: Numbered steps with checkpoints
- Validation: How to confirm the skill worked correctly
- Common Pitfalls: Known traps and how to avoid them
建议包含以下章节:
- 用途:一段描述Skill预期成果的文字
- 适用场景:合适场景的项目符号列表
- 不适用场景:边界和排除情况
- 输入参数:必填和可选输入的表格
- 工作流程:带有检查点的编号步骤
- 验证:如何确认Skill已正常工作
- 常见陷阱:已知问题及解决方法
Step 5: Add optional directories (if needed)
步骤5:添加可选目录(如需要)
skills/<skill-name>/
├── SKILL.md
├── scripts/ # Executable code agents can run
├── references/ # Additional documentation loaded on demand
└── assets/ # Templates, images, data filesskills/<skill-name>/
├── SKILL.md
├── scripts/ # Agent可运行的可执行代码
├── references/ # 按需加载的附加文档
└── assets/ # 模板、图片、数据文件Step 6: Validate the skill
步骤6:验证Skill
- Confirm frontmatter fields are valid
- Ensure SKILL.md is under 500 lines
- Check that file references use relative paths
- Verify instructions are actionable and specific
- 确认前置元数据字段有效
- 确保SKILL.md不超过500行
- 检查文件引用使用相对路径
- 验证说明具体且可执行
SKILL.md Template
SKILL.md模板
Use this template when creating a new skill:
markdown
---
name: <skill-name>
description: <1-1024 char description of what the skill does and when to use it>
---创建新Skill时可使用以下模板:
markdown
---
name: <skill-name>
description: <1-1024字符的Skill功能及适用场景描述>
---<Skill Title>
<Skill标题>
<One paragraph describing the skill's purpose and outcome.>
<一段描述Skill用途及预期成果的文字>
When to Use
适用场景
- <Scenario 1>
- <Scenario 2>
- <场景1>
- <场景2>
When Not to Use
不适用场景
- <Exclusion 1>
- <Exclusion 2>
- <排除场景1>
- <排除场景2>
Inputs
输入参数
| Input | Required | Description |
|---|---|---|
| <input-name> | Yes/No | <description> |
| 输入参数 | 是否必填 | 描述 |
|---|---|---|
| <输入参数名称> | 是/否 | <描述> |
Workflow
工作流程
Step 1: <Action>
步骤1: <操作>
<Instructions for this step>
<本步骤说明>
Step 2: <Action>
步骤2: <操作>
<Instructions for this step>
<本步骤说明>
Validation
验证
- <Verification step 1>
- <Verification step 2>
- <验证步骤1>
- <验证步骤2>
Common Pitfalls
常见陷阱
| Pitfall | Solution |
|---|---|
| <Problem> | <How to avoid or fix> |
undefined| 问题 | 解决方案 |
|---|---|
| <问题描述> | <避免或修复方法> |
undefinedValidation Checklist
验证检查清单
After creating a skill, verify:
- Skill name matches directory name exactly
- Skill name is lowercase with hyphens only
- Description is non-empty and under 1024 characters
- SKILL.md body is under 500 lines
- Instructions are specific and actionable
- Workflow has numbered steps with clear checkpoints
- Validation section exists with observable success criteria
- No secrets, tokens, or internal URLs included
创建Skill后,请验证以下内容:
- Skill名称与目录名称完全匹配
- Skill名称仅包含小写字母和连字符
- 描述非空且长度不超过1024字符
- SKILL.md正文不超过500行
- 说明具体且可执行
- 工作流程包含带明确检查点的编号步骤
- 存在验证章节,且包含可观察的成功标准
- 未包含密钥、令牌或内部URL
Common Pitfalls
常见陷阱
| Pitfall | Solution |
|---|---|
| Name contains uppercase letters | Use only lowercase: |
| Description is vague | Include what it does AND when to use it |
| Instructions are ambiguous | Use numbered steps with concrete actions |
| Missing validation steps | Add checkpoints that verify success |
| SKILL.md too long | Move detailed content to |
| Hardcoded environment assumptions | Document requirements in |
| 问题 | 解决方案 |
|---|---|
| 名称包含大写字母 | 仅使用小写字母: |
| 描述模糊 | 需同时说明功能及适用场景 |
| 说明不明确 | 使用带具体操作的编号步骤 |
| 缺少验证步骤 | 添加可验证成功的检查点 |
| SKILL.md过长 | 将详细内容移至 |
| 硬编码环境假设 | 在 |
References
参考资料
- Agent Skills Specification
- Repository README
- Contributing Guidelines
- Agent Skills Specification
- 仓库README
- 贡献指南