skill-creation-guide

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Creation Guide

技能创建指南

Scope

适用范围

Use this skill when:
  • Creating new Agent Skills
  • Understanding SKILL.md format and conventions
  • Learning best practices for skill authoring
在以下场景使用本技能:
  • 创建新的Agent Skills
  • 理解SKILL.md格式与约定
  • 学习技能编写的最佳实践

Skill Structure

技能结构

skill-name/
├── SKILL.md          # Required: Instructions and metadata
├── scripts/          # Optional: Helper scripts
├── templates/        # Optional: Document templates
└── resources/        # Optional: Reference files
skill-name/
├── SKILL.md          # Required: Instructions and metadata
├── scripts/          # Optional: Helper scripts
├── templates/        # Optional: Document templates
└── resources/        # Optional: Reference files

SKILL.md Format

SKILL.md格式

Required Frontmatter

必填前置元数据

yaml
---
name: my-skill-name
description: A clear description of what this skill does and when to use it.
---
yaml
---
name: my-skill-name
description: A clear description of what this skill does and when to use it.
---

Body Structure

正文结构

markdown
undefined
markdown
undefined

Skill Name

Skill Name

Detailed description of the skill's purpose.
Detailed description of the skill's purpose.

When to Use This Skill

When to Use This Skill

  • Use case 1
  • Use case 2
  • Use case 1
  • Use case 2

Instructions

Instructions

[Detailed instructions for the agent]
[Detailed instructions for the agent]

Examples

Examples

[Real-world examples]
undefined
[Real-world examples]
undefined

Best Practices

最佳实践

  1. Keep descriptions exhaustive: The frontmatter description helps agents decide when to trigger the skill.
  2. Focus on execution: The body should contain clear, actionable steps.
  3. Use progressive disclosure: Put detailed references in
    references/
    folder.
  4. Include scripts for automation: Use helper scripts for deterministic operations.
  5. Keep SKILL.md under 500 lines: For optimal performance.
  6. Test across platforms: Verify skills work with Claude Code, Codex, etc.
  1. 描述详尽:前置元数据中的描述帮助Agent判断何时触发该技能。
  2. 聚焦执行:正文需包含清晰、可执行的步骤。
  3. 渐进式披露:将详细参考内容放在
    references/
    文件夹中。
  4. 包含自动化脚本:使用辅助脚本处理确定性操作。
  5. SKILL.md控制在500行以内:以保证最优性能。
  6. 跨平台测试:验证技能可在Claude Code、Codex等平台正常工作。

Token Efficiency

令牌效率

Skills employ progressive disclosure architecture:
  1. Metadata loading (~100 tokens): Agent scans available skills
  2. Full instructions (<5k tokens): Load when skill is activated
  3. Bundled resources: Only load as needed
技能采用渐进式披露架构:
  1. 元数据加载(约100令牌):Agent扫描可用技能
  2. 完整说明(少于5k令牌):技能激活时加载
  3. 捆绑资源:仅在需要时加载

Platform-Specific Paths

平台特定路径

PlatformProject PathGlobal Path
Claude Code
.claude/skills/
~/.claude/skills/
Codex
.codex/skills/
~/.codex/skills/
Cursor
.cursor/skills/
~/.cursor/skills/
Gemini CLI
.gemini/skills/
~/.gemini/skills/
GitHub Copilot
.github/skills/
~/.copilot/skills/
平台项目路径全局路径
Claude Code
.claude/skills/
~/.claude/skills/
Codex
.codex/skills/
~/.codex/skills/
Cursor
.cursor/skills/
~/.cursor/skills/
Gemini CLI
.gemini/skills/
~/.gemini/skills/
GitHub Copilot
.github/skills/
~/.copilot/skills/

Quality Checklist

质量检查清单

  • Clear, actionable instructions
  • Includes real-world examples
  • Written for AI agents, not end users
  • Documents prerequisites and dependencies
  • Includes error handling guidance
  • Tested on target platform(s)
  • 清晰、可执行的说明
  • 包含真实场景示例
  • 针对AI Agent编写,而非终端用户
  • 记录前置条件与依赖项
  • 包含错误处理指导
  • 已在目标平台测试

Full Resource List

完整资源列表

For more detailed skill creation resources, complete link lists, or the latest information, use WebFetch to retrieve the full README.md:
https://raw.githubusercontent.com/gmh5225/awesome-skills/refs/heads/main/README.md
The README.md contains the complete categorized resource list with all links.
如需更详细的技能创建资源、完整链接列表或最新信息,请使用WebFetch获取完整的README.md:
https://raw.githubusercontent.com/gmh5225/awesome-skills/refs/heads/main/README.md
该README.md包含完整的分类资源列表及所有链接。