skill-master
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Master
Skill 创作总览
This skill is the entry point for creating and maintaining Agent Skills.
Language requirement: all skills MUST be authored in English.
本Skill是创建和维护Agent Skills的入口。
语言要求: 所有Skill必须使用英文创作。
Quick Navigation
快速导航
- New to skills? Read:
references/specification.md - SKILL.md templates? See:
assets/skill-templates.md - Advanced features (context, agents, hooks)? Read:
references/advanced-features.md - Creating from docs? Read:
references/docs-ingestion.md - Validation & packaging? See
scripts/
- 刚接触Skill?请阅读:
references/specification.md - SKILL.md模板?请查看:
assets/skill-templates.md - 高级功能(上下文、Agent、钩子)?请阅读:
references/advanced-features.md - 通过文档创建Skill?请阅读:
references/docs-ingestion.md - 验证与打包?请查看目录
scripts/
When to Use
适用场景
- Creating a new skill from scratch
- Updating an existing skill
- Creating a skill by ingesting external documentation
- Validating or packaging a skill for distribution
- 从零开始创建新Skill
- 更新现有Skill
- 通过摄取外部文档创建Skill
- 验证或打包Skill用于分发
Skill Structure (Required)
Skill结构(必填)
my-skill/
├── SKILL.md # Required: instructions + metadata
├── README.md # Optional: human-readable description
├── metadata.json # Optional: extended metadata for publishing
├── references/ # Optional: documentation, guides, API references
├── examples/ # Optional: sample outputs, usage examples
├── scripts/ # Optional: executable code
└── assets/ # Optional: templates, images, data filesmy-skill/
├── SKILL.md # 必填:说明文档 + 元数据
├── README.md # 可选:面向人类的可读性描述
├── metadata.json # 可选:用于发布的扩展元数据
├── references/ # 可选:文档、指南、API参考
├── examples/ # 可选:示例输出、使用案例
├── scripts/ # 可选:可执行代码
└── assets/ # 可选:模板、图片、数据文件Folder Purposes (CRITICAL)
文件夹用途(至关重要)
| Folder | Purpose | Examples |
|---|---|---|
| Documentation for agents to read | Guides, API docs, concept explanations, troubleshooting |
| Sample outputs showing expected format | Output examples, usage demonstrations |
| Static resources to copy/use | Document templates, config templates, images, schemas |
| Executable code to run | Python scripts, shell scripts, validators |
| 文件夹 | 用途 | 示例 |
|---|---|---|
| 供Agent阅读的文档 | 指南、API文档、概念解释、故障排查 |
| 展示预期格式的示例输出 | 输出示例、使用演示 |
| 可复制/使用的静态资源 | 文档模板、配置模板、图片、模式 |
| 可执行代码 | Python脚本、Shell脚本、验证器 |
When to Use Each
各文件夹适用场景
Use for:
references/- Detailed documentation about concepts
- API references and usage guides
- Troubleshooting and FAQ
- Anything the agent needs to read and understand
Use for:
examples/- Sample outputs showing expected format
- Usage demonstrations
- Before/after comparisons
- Anything showing what the result should look like
Use for:
assets/- Document templates (markdown files to copy as starting point)
- Configuration file templates
- Schema files, lookup tables
- Images and diagrams
- Anything the agent needs to copy or reference verbatim
IMPORTANT: Templates belong in , examples in , documentation in .
assets/examples/references/使用的场景:
references/- 关于概念的详细文档
- API参考和使用指南
- 故障排查与常见问题
- 任何Agent需要阅读并理解的内容
使用的场景:
examples/- 展示预期格式的示例输出
- 使用演示
- 前后对比
- 任何展示结果应呈现样式的内容
使用的场景:
assets/- 文档模板(可复制作为起点的Markdown文件)
- 配置文件模板
- 模式文件、查找表
- 图片与图表
- 任何Agent需要直接复制或引用的内容
重要提示:模板应放在,示例放在,文档放在。
assets/examples/references/Frontmatter Schema
Frontmatter 结构
Every MUST start with YAML frontmatter:
SKILL.mdyaml
---
name: skill-name
description: "What it does. Keywords: term1, term2."
metadata:
author: your-name
version: "1.0.0"
---Field order: → → → → → other fields
namedescriptionlicensecompatibilitymetadata每个必须以YAML frontmatter开头:
SKILL.mdyaml
---
name: skill-name
description: "What it does. Keywords: term1, term2."
metadata:
author: your-name
version: "1.0.0"
---字段顺序: → → → → → 其他字段
namedescriptionlicensecompatibilitymetadataRequired Fields
必填字段
| Field | Constraints |
|---|---|
| name | 1-64 chars, lowercase |
| description | 1-1024 chars (target: 80-150), describes what skill does + when to use it, include keywords |
| 字段 | 约束条件 |
|---|---|
| name | 1-64字符,仅包含小写 |
| description | 1-1024字符(目标:80-150字符),描述Skill功能及适用场景,包含关键词 |
Optional Fields (Top Level)
顶层可选字段
| Field | Purpose |
|---|---|
| license | License name or reference to bundled LICENSE file |
| compatibility | Environment requirements (max 500 chars) |
| metadata | Object for arbitrary key-value pairs (see below) |
| 字段 | 用途 |
|---|---|
| license | 许可证名称或指向捆绑LICENSE文件的引用 |
| compatibility | 环境要求(最多500字符) |
| metadata | 用于存储任意键值对的对象(见下文) |
metadata Object (Common Fields)
metadata对象(常见字段)
| Field | Purpose |
|---|---|
| author | Author name or organization |
| version | Skill version (semver format, e.g., "1.0.0") |
| argument-hint | Hint for autocomplete, e.g., |
IMPORTANT: in is the skill version. If you reference external product docs, track that version separately (e.g., in README.md or metadata.json).
versionmetadata| 字段 | 用途 |
|---|---|
| author | 作者姓名或组织 |
| version | Skill版本(语义化版本格式,例如:"1.0.0") |
| argument-hint | 自动补全提示,例如: |
重要提示:中的是Skill版本。如果引用外部产品文档,请单独跟踪该版本(例如在README.md或metadata.json中)。
metadataversionOptional Fields (Claude Code / Advanced)
可选字段(Claude Code / 高级功能)
| Field | Purpose |
|---|---|
| disable-model-invocation | |
| user-invocable | |
| allowed-tools | Space-delimited tools agent can use without asking, e.g., |
| model | Specific model to use when skill is active |
| context | Set to |
| agent | Subagent type when |
| hooks | Hooks scoped to skill's lifecycle (see agent documentation) |
| 字段 | 用途 |
|---|---|
| disable-model-invocation | |
| user-invocable | |
| allowed-tools | Agent无需询问即可使用的工具(空格分隔),例如: |
| model | Skill激活时使用的特定模型 |
| context | 设置为 |
| agent | 当 |
| hooks | 作用于Skill生命周期的钩子(见Agent文档) |
Invocation Control Matrix
调用控制矩阵
| Frontmatter | User can invoke | Agent can invoke | Notes |
|---|---|---|---|
| (default) | ✅ Yes | ✅ Yes | Description in context, loads when used |
| ✅ Yes | ❌ No | For manual workflows with side effects |
| ❌ No | ✅ Yes | Background knowledge, not a command |
| Frontmatter配置 | 用户可调用 | Agent可调用 | 说明 |
|---|---|---|---|
| (默认) | ✅ 是 | ✅ 是 | 上下文包含描述,使用时加载 |
| ✅ 是 | ❌ 否 | 适用于有副作用的手动工作流 |
| ❌ 否 | ✅ 是 | 背景知识,非命令 |
Variable Substitutions
变量替换
Available placeholders in skill content:
| Variable | Description |
|---|---|
| All arguments passed when invoking the skill |
| Current session ID for logging or session-specific files |
If is not in content, arguments are appended as .
$ARGUMENTSARGUMENTS: <value>Example:
yaml
---
name: fix-issue
description: Fix a GitHub issue
disable-model-invocation: true
---
Fix GitHub issue $ARGUMENTS following our coding standards.Skill内容中可用的占位符:
| 变量 | 描述 |
|---|---|
| 调用Skill时传递的所有参数 |
| 当前会话ID,用于日志或会话特定文件 |
如果内容中未包含,参数将以的形式追加。
$ARGUMENTSARGUMENTS: <value>示例:
yaml
---
name: fix-issue
description: Fix a GitHub issue
disable-model-invocation: true
---
Fix GitHub issue $ARGUMENTS following our coding standards.Dynamic Context Injection
动态上下文注入
Use command`` syntax to run shell commands before skill content is sent to the agent:
!markdown
undefined使用command``语法可在Skill内容发送给Agent前执行Shell命令:
!markdown
undefinedPull request context
Pull request context
- PR diff: !
gh pr diff - Changed files: !
gh pr diff --name-only
- PR diff: !
gh pr diff - Changed files: !
gh pr diff --name-only
Your task
Your task
Review this pull request...
The command output replaces the placeholder, so the agent receives actual data.Review this pull request...
命令输出将替换占位符,因此Agent会收到实际数据。metadata.json (Optional)
metadata.json(可选)
For publishing or extended metadata, create :
metadata.jsonjson
{
"version": "1.0.0",
"organization": "Your Org",
"date": "January 2026",
"abstract": "Brief description of what this skill provides...",
"references": ["https://docs.example.com", "https://github.com/org/repo"]
}Fields:
- — Skill version (semver)
version - — Author or organization
organization - — Publication date
date - — Extended description (can be longer than frontmatter)
abstract - — List of source documentation URLs
references
如需发布或扩展元数据,创建:
metadata.jsonjson
{
"version": "1.0.0",
"organization": "Your Org",
"date": "January 2026",
"abstract": "Brief description of what this skill provides...",
"references": ["https://docs.example.com", "https://github.com/org/repo"]
}字段:
- — Skill版本(语义化版本)
version - — 作者或组织
organization - — 发布日期
date - — 扩展描述(可长于frontmatter中的描述)
abstract - — 源文档URL列表
references
Name Validation Examples
名称验证示例
yaml
undefinedyaml
undefinedValid
有效
name: pdf-processing
name: data-analysis
name: code-review
name: pdf-processing
name: data-analysis
name: code-review
Invalid
无效
name: PDF-Processing # uppercase not allowed
name: -pdf # cannot start with hyphen
name: pdf--processing # consecutive hyphens not allowed
undefinedname: PDF-Processing # 不允许大写
name: -pdf # 不能以连字符开头
name: pdf--processing # 不允许连续连字符
undefinedDescription Rules
描述规则
Purpose: Tell the LLM what the skill does and when to activate it. Minimize tokens — just enough for activation decision.
Formula:
[Product] [core function]. Covers [2-3 key topics]. Keywords: [terms].Constraints:
- Target: 80-150 chars
- Max: 300 chars
- No marketing ("powerful", "comprehensive", "modern")
- No filler ("this skill", "use this for", "helps with")
- No redundant context (skip "for apps", "for developers")
Good examples:
yaml
description: "Turso SQLite database. Covers encryption, sync, agent patterns. Keywords: Turso, libSQL, SQLite."
description: "Base UI unstyled React components. Covers forms, menus, overlays. Keywords: @base-ui/react, render props."
description: "Inworld TTS API. Covers voice cloning, audio markups, timestamps. Keywords: Inworld, TTS, visemes."Poor examples:
yaml
undefined目的: 告知大语言模型(LLM)该Skill的功能及激活时机。尽量减少token数——仅需足够用于激活决策的内容。
公式:
[产品] [核心功能]。涵盖[2-3个关键主题]。关键词:[术语]。约束条件:
- 目标长度:80-150字符
- 最大长度:300字符
- 无营销用语(如"强大的"、"全面的"、"现代化的")
- 无冗余填充(如"本Skill"、"使用本Skill"、"有助于")
- 无多余上下文(省略"适用于应用"、"面向开发者"等)
优秀示例:
yaml
description: "Turso SQLite database. Covers encryption, sync, agent patterns. Keywords: Turso, libSQL, SQLite."
description: "Base UI unstyled React components. Covers forms, menus, overlays. Keywords: @base-ui/react, render props."
description: "Inworld TTS API. Covers voice cloning, audio markups, timestamps. Keywords: Inworld, TTS, visemes."不佳示例:
yaml
undefinedToo vague
过于模糊
description: "Helps with PDFs."
description: "Helps with PDFs."
Too verbose
过于冗长
description: "Turso embedded SQLite database for modern apps and AI agents. Covers encryption, authorization, sync, partial sync, and agent database patterns."
description: "Turso embedded SQLite database for modern apps and AI agents. Covers encryption, authorization, sync, partial sync, and agent database patterns."
Marketing
营销用语
description: "A powerful solution for all your database needs."
**Keywords:** product name, package name, 3-5 terms max.description: "A powerful solution for all your database needs."
**关键词:** 产品名称、包名称,最多3-5个术语。How Skills Work (Progressive Disclosure)
Skill工作原理(渐进式披露)
- Discovery: Agent loads only +
nameof each skill (~50-100 tokens)description - Activation: When task matches, agent reads full into context
SKILL.md - Execution: Agent follows instructions, loads referenced files as needed
Key rule: Keep under 500 lines. Move details to .
SKILL.mdreferences/- 发现阶段:Agent仅加载每个Skill的+
name(约50-100个token)description - 激活阶段:当任务匹配时,Agent将完整的加载到上下文中
SKILL.md - 执行阶段:Agent遵循说明,按需加载引用文件
核心规则: 保持不超过500行。将细节内容移至目录。
SKILL.mdreferences/Creating a New Skill
创建新Skill
Step 1: Scaffold
步骤1:搭建脚手架
bash
python scripts/init_skill.py <skill-name>bash
python scripts/init_skill.py <skill-name>Or specify custom directory:
或指定自定义目录:
python scripts/init_skill.py <skill-name> --skills-dir skills
Or manually create:
<skills-folder>/<skill-name>/
├── SKILL.md
├── references/ # For documentation, guides
└── assets/ # For templates, static files
undefinedpython scripts/init_skill.py <skill-name> --skills-dir skills
或手动创建:
<skills-folder>/<skill-name>/
├── SKILL.md
├── references/ # 用于存放文档、指南
└── assets/ # 用于存放模板、静态文件
undefinedStep 2: Write Frontmatter
步骤2:编写Frontmatter
yaml
---
name: <skill-name>
description: "[Purpose] + [Triggers/Keywords]"
---yaml
---
name: <skill-name>
description: "[用途] + [触发条件/关键词]"
---Step 3: Write Body
步骤3:编写正文
Recommended sections:
- When to use (triggers, situations)
- Quick navigation (router to references and assets)
- Steps / Recipes / Checklists
- Critical prohibitions
- Links
推荐章节:
- 适用场景(触发条件、应用情境)
- 快速导航(指向参考文档和资源的链接)
- 步骤/流程/检查清单
- 关键禁忌
- 链接
Step 4: Add References (documentation)
步骤4:添加参考文档(文档)
For each major topic, create with:
references/<topic>.md- Actionable takeaways (5-15 bullets)
- Gotchas / prohibitions
- Practical examples
针对每个主要主题,创建,包含:
references/<topic>.md- 可操作要点(5-15个项目符号)
- 注意事项/禁忌
- 实用示例
Step 5: Add Assets (if needed)
步骤5:添加资源(如有需要)
For templates or static resources, create :
assets/<resource>- Document templates
- Configuration templates
- Schema files
如需模板或静态资源,创建:
assets/<resource>- 文档模板
- 配置模板
- 模式文件
Step 6: Validate
步骤6:验证
bash
python scripts/quick_validate_skill.py <skill-path>bash
python scripts/quick_validate_skill.py <skill-path>Creating a Skill from Documentation
从文档创建Skill
When building a skill from external docs, use the autonomous ingestion workflow:
当基于外部文档构建Skill时,使用自主摄取工作流:
Phase 1: Scaffold
阶段1:搭建脚手架
- Create skill folder with skeleton
SKILL.md - Create for progress tracking
plan.md - Create directory
references/
- 创建包含框架的Skill文件夹
SKILL.md - 创建用于进度跟踪
plan.md - 创建目录
references/
Phase 2: Build Queue
阶段2:构建任务队列
For each doc link:
- Fetch the page
- Extract internal doc links (avoid nav duplicates)
- Prioritize: concepts → API → operations → troubleshooting
针对每个文档链接:
- 获取页面内容
- 提取内部文档链接(避免导航重复)
- 优先级排序:概念 → API → 操作 → 故障排查
Phase 3: Ingest Loop
阶段3:摄取循环
For each page:
- Fetch one page
- Create with actionable summary
references/<topic>.md - Update checkbox
plan.md - Update if it adds a useful recipe/rule
SKILL.md
Do not ask user after each page — continue autonomously.
针对每个页面:
- 获取单个页面
- 创建,包含可操作摘要
references/<topic>.md - 更新中的复选框
plan.md - 如果添加了有用的流程/规则,更新
SKILL.md
请勿在每个页面后询问用户 —— 自主继续执行。
Phase 4: Finalize
阶段4:最终完善
- Review for completeness
SKILL.md - Ensure practical recipes, not docs mirror
- may be deleted manually after ingestion
plan.md
- 检查的完整性
SKILL.md - 确保包含实用流程,而非文档镜像
- 完成摄取后可手动删除
plan.md
Critical Prohibitions
关键禁忌
- Do NOT copy large verbatim chunks from vendor docs (summarize in own words)
- Do NOT write skills in languages other than English
- Do NOT include project-specific secrets, paths, or assumptions
- Do NOT keep over 500 lines
SKILL.md - Do NOT skip validation (must match folder name)
name - Do NOT use poor descriptions that lack trigger keywords
- Do NOT omit product version when creating skills from documentation
- 请勿从供应商文档中复制大段原文(用自己的话总结)
- 请勿使用英文以外的语言创作Skill
- 请勿包含项目特定的密钥、路径或假设
- 请勿让超过500行
SKILL.md - 请勿跳过验证(必须与文件夹名称匹配)
name - 请勿使用缺乏触发关键词的描述
- 从文档创建Skill时,请勿遗漏产品版本
Version Tracking
版本跟踪
When creating or updating a skill from external documentation:
-
Addfield in frontmatter for product version:
versionyaml--- name: my-skill description: "..." version: "1.2.3" --- -
Optionally addif known:
release_dateyaml--- name: my-skill description: "..." version: "1.2.3" release_date: "2025-01-21" --- -
Createwith:
README.md- Skill overview (1-2 sentences)
- Usage section (when to use)
- Links section (standardized format)
README.md Links section format:
markdown
undefined当基于外部文档创建或更新Skill时:
-
在frontmatter中添加字段以记录产品版本:
versionyaml--- name: my-skill description: "..." version: "1.2.3" --- -
如有需要,添加字段:
release_dateyaml--- name: my-skill description: "..." version: "1.2.3" release_date: "2025-01-21" --- -
创建,包含:
README.md- Skill概述(1-2句话)
- 使用部分(适用场景)
- 链接部分(标准化格式)
README.md链接部分格式:
markdown
undefinedLinks
Links
Include only applicable links. Order: Documentation → Changelog/Releases → GitHub → Package registry.
Example frontmatter:
```yaml
---
name: turso
description: "Turso embedded SQLite database..."
version: "0.4.0"
release_date: "2025-01-05"
---This helps track when the skill was last updated and against which product version.
仅包含适用的链接。顺序:文档 → 变更日志/发布记录 → GitHub → 包注册表。
示例frontmatter:
```yaml
---
name: turso
description: "Turso embedded SQLite database..."
version: "0.4.0"
release_date: "2025-01-05"
---这有助于跟踪Skill最后更新时间及对应的产品版本。
Validation Checklist
验证检查清单
- matches folder name
name - is 1-64 chars, lowercase, no
name-- - is 1-1024 chars, includes keywords
description - under 500 lines
SKILL.md - Documentation in , templates in
references/assets/ - All text in English
- 与文件夹名称匹配
name - 长度为1-64字符,小写,无连续
name-- - 长度为1-1024字符,包含关键词
description - 不超过500行
SKILL.md - 文档存于,模板存于
references/assets/ - 所有文本使用英文
Scripts
脚本
| Script | Purpose |
|---|---|
| Scaffold new Agent Skill (agentskills.io) |
| Scaffold Copilot-specific assets (instructions, agents) |
| Validate skill structure |
| Package skill into distributable zip |
| 脚本 | 用途 |
|---|---|
| 搭建新Agent Skill脚手架(agentskills.io) |
| 搭建Copilot特定资源(说明、Agent) |
| 验证Skill结构 |
| 将Skill打包为可分发的Zip文件 |
Links
链接
- Specification:
references/specification.md - Advanced Features:
references/advanced-features.md - SKILL.md Templates:
assets/skill-templates.md - Docs Ingestion:
references/docs-ingestion.md - Official spec: https://agentskills.io/specification
- Claude Code skills: https://code.claude.com/docs/en/skills
- 规范:
references/specification.md - 高级功能:
references/advanced-features.md - SKILL.md模板:
assets/skill-templates.md - 文档摄取:
references/docs-ingestion.md - 官方规范:https://agentskills.io/specification
- Claude Code技能:https://code.claude.com/docs/en/skills