create-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create 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

输入参数

InputRequiredDescription
Skill nameYesLowercase, alphanumeric, hyphens only (e.g.,
code-review
,
ci-triage
)
DescriptionYesWhat the skill does and when agents should use it (1-1024 chars)
PurposeYesOne paragraph describing the outcome
Workflow stepsRecommendedNumbered steps the agent should follow
输入参数是否必填描述
Skill名称仅包含小写字母、数字和连字符(例如:
code-review
,
ci-triage
描述说明该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.md
skills/<skill-name>/
└── SKILL.md

Step 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:
  1. Purpose: One paragraph describing the outcome
  2. When to Use: Bullet list of appropriate scenarios
  3. When Not to Use: Boundaries and exclusions
  4. Inputs: Table of required and optional inputs
  5. Workflow: Numbered steps with checkpoints
  6. Validation: How to confirm the skill worked correctly
  7. Common Pitfalls: Known traps and how to avoid them
建议包含以下章节:
  1. 用途:一段描述Skill预期成果的文字
  2. 适用场景:合适场景的项目符号列表
  3. 不适用场景:边界和排除情况
  4. 输入参数:必填和可选输入的表格
  5. 工作流程:带有检查点的编号步骤
  6. 验证:如何确认Skill已正常工作
  7. 常见陷阱:已知问题及解决方法

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 files
skills/<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

输入参数

InputRequiredDescription
<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

常见陷阱

PitfallSolution
<Problem><How to avoid or fix>
undefined
问题解决方案
<问题描述><避免或修复方法>
undefined

Validation 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

常见陷阱

PitfallSolution
Name contains uppercase lettersUse only lowercase:
code-review
not
Code-Review
Description is vagueInclude what it does AND when to use it
Instructions are ambiguousUse numbered steps with concrete actions
Missing validation stepsAdd checkpoints that verify success
SKILL.md too longMove detailed content to
references/
files
Hardcoded environment assumptionsDocument requirements in
compatibility
field
问题解决方案
名称包含大写字母仅使用小写字母:
code-review
而非
Code-Review
描述模糊需同时说明功能及适用场景
说明不明确使用带具体操作的编号步骤
缺少验证步骤添加可验证成功的检查点
SKILL.md过长将详细内容移至
references/
文件夹中的文件
硬编码环境假设
compatibility
字段中记录要求

References

参考资料