make-skill-template
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMake Skill Template
Skill创建模板
A meta-skill for creating new Agent Skills. Use this skill when you need to scaffold a new skill folder, generate a SKILL.md file, or help users understand the Agent Skills specification.
这是一款用于创建新Agent Skills的元skill。当你需要搭建新的skill文件夹、生成SKILL.md文件,或帮助用户理解Agent Skills规范时,可使用此skill。
When to Use This Skill
何时使用此Skill
- User asks to "create a skill", "make a new skill", or "scaffold a skill"
- User wants to add a specialized capability to their GitHub Copilot setup
- User needs help structuring a skill with bundled resources
- User wants to duplicate this template as a starting point
- 用户要求“创建skill”、“制作新skill”或“搭建skill框架”时
- 用户希望为其GitHub Copilot配置添加专业能力时
- 用户需要帮助构建包含捆绑资源的skill时
- 用户希望复制此模板作为起点时
Prerequisites
前置条件
- Understanding of what the skill should accomplish
- A clear, keyword-rich description of capabilities and triggers
- Knowledge of any bundled resources needed (scripts, references, assets, templates)
- 明确该skill需要实现的功能
- 对能力和触发条件的清晰、富含关键词的描述
- 了解所需的捆绑资源(脚本、参考资料、资源文件、模板)
Creating a New Skill
创建新Skill
Step 1: Create the Skill Directory
步骤1:创建Skill目录
Create a new folder with a lowercase, hyphenated name:
skills/<skill-name>/
└── SKILL.md # Required创建一个小写、连字符分隔的名称的新文件夹:
skills/<skill-name>/
└── SKILL.md # RequiredStep 2: Generate SKILL.md with Frontmatter
步骤2:生成带前置元数据的SKILL.md文件
Every skill requires YAML frontmatter with and :
namedescriptionyaml
---
name: <skill-name>
description: '<What it does>. Use when <specific triggers, scenarios, keywords users might say>.'
---每个skill都需要包含和的YAML前置元数据:
namedescriptionyaml
---
name: <skill-name>
description: '<What it does>. Use when <specific triggers, scenarios, keywords users might say>.'
---Frontmatter Field Requirements
前置元数据字段要求
| Field | Required | Constraints |
|---|---|---|
| Yes | 1-64 chars, lowercase letters/numbers/hyphens only, must match folder name |
| Yes | 1-1024 chars, must describe WHAT it does AND WHEN to use it |
| No | License name or reference to bundled LICENSE.txt |
| No | 1-500 chars, environment requirements if needed |
| No | Key-value pairs for additional properties |
| No | Space-delimited list of pre-approved tools (experimental) |
| 字段 | 是否必填 | 约束条件 |
|---|---|---|
| 是 | 1-64字符,仅小写字母/数字/连字符,必须与文件夹名称匹配 |
| 是 | 1-1024字符,必须描述该skill的功能和使用场景 |
| 否 | 许可证名称或捆绑的LICENSE.txt文件引用 |
| 否 | 1-500字符,如有需要可填写环境要求 |
| 否 | 用于附加属性的键值对 |
| 否 | 预批准工具的空格分隔列表(实验性) |
Description Best Practices
描述最佳实践
CRITICAL: The is the PRIMARY mechanism for automatic skill discovery. Include:
description- WHAT the skill does (capabilities)
- WHEN to use it (triggers, scenarios, file types)
- Keywords users might mention in prompts
Good example:
yaml
description: 'Toolkit for testing local web applications using Playwright. Use when asked to verify frontend functionality, debug UI behavior, capture browser screenshots, or view browser console logs. Supports Chrome, Firefox, and WebKit.'Poor example:
yaml
description: 'Web testing helpers'重要提示:是自动发现skill的主要机制。需包含:
description- 功能:该skill能实现什么
- 使用场景:何时使用(触发条件、场景、用户可能使用的关键词)
- 关键词:用户在提示词中可能提到的词汇
优秀示例:
yaml
description: 'Toolkit for testing local web applications using Playwright. Use when asked to verify frontend functionality, debug UI behavior, capture browser screenshots, or view browser console logs. Supports Chrome, Firefox, and WebKit.'不佳示例:
yaml
description: 'Web testing helpers'Step 3: Write the Skill Body
步骤3:编写Skill正文
After the frontmatter, add markdown instructions. Recommended sections:
| Section | Purpose |
|---|---|
| Brief overview |
| Reinforces description triggers |
| Required tools, dependencies |
| Numbered steps for tasks |
| Common issues and solutions |
| Links to bundled docs |
前置元数据之后,添加Markdown说明。推荐的章节:
| 章节 | 用途 |
|---|---|
| 简要概述 |
| 强化描述中的触发条件 |
| 所需工具、依赖项 |
| 任务的编号步骤 |
| 常见问题及解决方案 |
| 捆绑文档的链接 |
Step 4: Add Optional Directories (If Needed)
步骤4:添加可选目录(如有需要)
| Folder | Purpose | When to Use |
|---|---|---|
| Executable code (Python, Bash, JS) | Automation that performs operations |
| Documentation agent reads | API references, schemas, guides |
| Static files used AS-IS | Images, fonts, templates |
| Starter code agent modifies | Scaffolds to extend |
| 文件夹 | 用途 | 使用场景 |
|---|---|---|
| 可执行代码(Python、Bash、JS) | 执行操作的自动化脚本 |
| 供agent读取的文档 | API参考、 schema、指南 |
| 直接使用的静态文件 | 图片、字体、模板 |
| 供agent修改的起始代码 | 可扩展的代码框架 |
Example: Complete Skill Structure
示例:完整的Skill结构
my-awesome-skill/
├── SKILL.md # Required instructions
├── LICENSE.txt # Optional license file
├── scripts/
│ └── helper.py # Executable automation
├── references/
│ ├── api-reference.md # Detailed docs
│ └── examples.md # Usage examples
├── assets/
│ └── diagram.png # Static resources
└── templates/
└── starter.ts # Code scaffoldmy-awesome-skill/
├── SKILL.md # Required instructions
├── LICENSE.txt # Optional license file
├── scripts/
│ └── helper.py # Executable automation
├── references/
│ ├── api-reference.md # Detailed docs
│ └── examples.md # Usage examples
├── assets/
│ └── diagram.png # Static resources
└── templates/
└── starter.ts # Code scaffoldQuick Start: Duplicate This Template
快速开始:复制此模板
- Copy the folder
make-skill-template/ - Rename to your skill name (lowercase, hyphens)
- Update :
SKILL.md- Change to match folder name
name: - Write a keyword-rich
description: - Replace body content with your instructions
- Change
- Add bundled resources as needed
- Validate with
npm run skill:validate
- 复制文件夹
make-skill-template/ - 重命名为你的skill名称(小写、连字符分隔)
- 更新:
SKILL.md- 将改为与文件夹名称匹配
name: - 编写富含关键词的
description: - 替换正文内容为你的说明
- 将
- 根据需要添加捆绑资源
- 使用验证
npm run skill:validate
Validation Checklist
验证检查清单
- Folder name is lowercase with hyphens
- field matches folder name exactly
name - is 10-1024 characters
description - explains WHAT and WHEN
description - is wrapped in single quotes
description - Body content is under 500 lines
- Bundled assets are under 5MB each
- 文件夹名称为小写、连字符分隔
- 字段与文件夹名称完全匹配
name - 长度为10-1024字符
description - 说明了功能和使用场景
description - 用单引号包裹
description - 正文内容少于500行
- 捆绑资源单个不超过5MB
Troubleshooting
故障排除
| Issue | Solution |
|---|---|
| Skill not discovered | Improve description with more keywords and triggers |
| Validation fails on name | Ensure lowercase, no consecutive hyphens, matches folder |
| Description too short | Add capabilities, triggers, and keywords |
| Assets not found | Use relative paths from skill root |
| 问题 | 解决方案 |
|---|---|
| Skill未被发现 | 优化描述,添加更多关键词和触发条件 |
| 名称验证失败 | 确保名称为小写,无连续连字符,与文件夹名称匹配 |
| 描述过短 | 添加功能、触发条件和关键词 |
| 资源文件未找到 | 使用相对于skill根目录的路径 |
References
参考资料
- Agent Skills official spec: https://agentskills.io/specification
- Agent Skills官方规范:https://agentskills.io/specification