make-skill-template

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Make 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          # Required

Step 2: Generate SKILL.md with Frontmatter

步骤2:生成带前置元数据的SKILL.md文件

Every skill requires YAML frontmatter with
name
and
description
:
yaml
---
name: <skill-name>
description: '<What it does>. Use when <specific triggers, scenarios, keywords users might say>.'
---
每个skill都需要包含
name
description
的YAML前置元数据:
yaml
---
name: <skill-name>
description: '<What it does>. Use when <specific triggers, scenarios, keywords users might say>.'
---

Frontmatter Field Requirements

前置元数据字段要求

FieldRequiredConstraints
name
Yes1-64 chars, lowercase letters/numbers/hyphens only, must match folder name
description
Yes1-1024 chars, must describe WHAT it does AND WHEN to use it
license
NoLicense name or reference to bundled LICENSE.txt
compatibility
No1-500 chars, environment requirements if needed
metadata
NoKey-value pairs for additional properties
allowed-tools
NoSpace-delimited list of pre-approved tools (experimental)
字段是否必填约束条件
name
1-64字符,仅小写字母/数字/连字符,必须与文件夹名称匹配
description
1-1024字符,必须描述该skill的功能使用场景
license
许可证名称或捆绑的LICENSE.txt文件引用
compatibility
1-500字符,如有需要可填写环境要求
metadata
用于附加属性的键值对
allowed-tools
预批准工具的空格分隔列表(实验性)

Description Best Practices

描述最佳实践

CRITICAL: The
description
is the PRIMARY mechanism for automatic skill discovery. Include:
  1. WHAT the skill does (capabilities)
  2. WHEN to use it (triggers, scenarios, file types)
  3. 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'
重要提示
description
是自动发现skill的主要机制。需包含:
  1. 功能:该skill能实现什么
  2. 使用场景:何时使用(触发条件、场景、用户可能使用的关键词)
  3. 关键词:用户在提示词中可能提到的词汇
优秀示例:
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:
SectionPurpose
# Title
Brief overview
## When to Use This Skill
Reinforces description triggers
## Prerequisites
Required tools, dependencies
## Step-by-Step Workflows
Numbered steps for tasks
## Troubleshooting
Common issues and solutions
## References
Links to bundled docs
前置元数据之后,添加Markdown说明。推荐的章节:
章节用途
# 标题
简要概述
## 何时使用此Skill
强化描述中的触发条件
## 前置条件
所需工具、依赖项
## 分步工作流
任务的编号步骤
## 故障排除
常见问题及解决方案
## 参考资料
捆绑文档的链接

Step 4: Add Optional Directories (If Needed)

步骤4:添加可选目录(如有需要)

FolderPurposeWhen to Use
scripts/
Executable code (Python, Bash, JS)Automation that performs operations
references/
Documentation agent readsAPI references, schemas, guides
assets/
Static files used AS-ISImages, fonts, templates
templates/
Starter code agent modifiesScaffolds to extend
文件夹用途使用场景
scripts/
可执行代码(Python、Bash、JS)执行操作的自动化脚本
references/
供agent读取的文档API参考、 schema、指南
assets/
直接使用的静态文件图片、字体、模板
templates/
供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 scaffold
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 scaffold

Quick Start: Duplicate This Template

快速开始:复制此模板

  1. Copy the
    make-skill-template/
    folder
  2. Rename to your skill name (lowercase, hyphens)
  3. Update
    SKILL.md
    :
    • Change
      name:
      to match folder name
    • Write a keyword-rich
      description:
    • Replace body content with your instructions
  4. Add bundled resources as needed
  5. Validate with
    npm run skill:validate
  1. 复制
    make-skill-template/
    文件夹
  2. 重命名为你的skill名称(小写、连字符分隔)
  3. 更新
    SKILL.md
    • name:
      改为与文件夹名称匹配
    • 编写富含关键词的
      description:
    • 替换正文内容为你的说明
  4. 根据需要添加捆绑资源
  5. 使用
    npm run skill:validate
    验证

Validation Checklist

验证检查清单

  • Folder name is lowercase with hyphens
  • name
    field matches folder name exactly
  • description
    is 10-1024 characters
  • description
    explains WHAT and WHEN
  • description
    is wrapped in single quotes
  • Body content is under 500 lines
  • Bundled assets are under 5MB each
  • 文件夹名称为小写、连字符分隔
  • name
    字段与文件夹名称完全匹配
  • description
    长度为10-1024字符
  • description
    说明了功能和使用场景
  • description
    用单引号包裹
  • 正文内容少于500行
  • 捆绑资源单个不超过5MB

Troubleshooting

故障排除

IssueSolution
Skill not discoveredImprove description with more keywords and triggers
Validation fails on nameEnsure lowercase, no consecutive hyphens, matches folder
Description too shortAdd capabilities, triggers, and keywords
Assets not foundUse relative paths from skill root
问题解决方案
Skill未被发现优化描述,添加更多关键词和触发条件
名称验证失败确保名称为小写,无连续连字符,与文件夹名称匹配
描述过短添加功能、触发条件和关键词
资源文件未找到使用相对于skill根目录的路径

References

参考资料