create-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create Skill

创建Skill

Guide for creating effective skills that extend agent capabilities with specialized knowledge, workflows, and tool integrations.
本指南介绍如何遵循最佳实践创建可扩展Agent能力的高效Skill,涵盖专业知识、工作流和工具集成。

About Skills

关于Skill

Skills are modular, self-contained packages that extend agent capabilities by providing specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific domains or tasks.
Skill是模块化、独立的软件包,通过提供专业知识、工作流和工具来扩展Agent的能力。可以将其视为特定领域或任务的“入门指南”。

What Skills Provide

Skill提供的内容

  1. Specialized workflows - Multi-step procedures for specific domains
  2. Tool integrations - Instructions for working with specific file formats or APIs
  3. Domain expertise - Company-specific knowledge, schemas, business logic
  4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks
  1. 专业工作流 - 针对特定领域的多步骤流程
  2. 工具集成 - 处理特定文件格式或API的操作说明
  3. 领域专业知识 - 公司专属知识、架构、业务逻辑
  4. 捆绑资源 - 用于复杂和重复任务的脚本、参考资料及资产

Progressive Disclosure Principle

渐进式披露原则

The 200-line rule is critical. SKILL.md must be under 200 lines. If you need more, split content into
references/
files.
200行规则至关重要。 SKILL.md文件必须少于200行。如果内容过多,请拆分到
references/
目录下的文件中。

Three-Level Loading System

三级加载系统

  1. Metadata (name + description) - Always in context (~100 words)
  2. SKILL.md body - When skill triggers (<200 lines, ideally <500 lines for optimal performance)
  3. Bundled resources - As needed by agent (unlimited)
  1. 元数据(名称+描述) - 始终处于上下文环境中(约100字)
  2. SKILL.md主体 - Skill触发时加载(少于200行,理想情况下不超过500行以获得最佳性能)
  3. 捆绑资源 - 根据Agent需求加载(无数量限制)

Why Progressive Disclosure Matters

渐进式披露的重要性

  • 85% reduction in initial context load
  • Activation times drop from 500ms+ to under 100ms
  • Agent loads only what's needed, when it's needed
  • Skills remain maintainable and focused
  • 初始上下文加载量减少85%
  • 激活时间从500ms以上降至100ms以下
  • Agent仅在需要时加载所需内容
  • Skill保持可维护性和聚焦性

Skill Structure

Skill结构

skill-name/
├── SKILL.md (required, <200 lines)
│   ├── YAML frontmatter metadata (required)
│   │   ├── name: (required)
│   │   └── description: (required)
│   └── Markdown instructions (required)
└── Bundled Resources (optional)
    ├── scripts/          - Executable code
    ├── references/       - Documentation loaded as needed
    └── assets/           - Files used in output
skill-name/
├── SKILL.md (required, <200 lines)
│   ├── YAML frontmatter metadata (required)
│   │   ├── name: (required)
│   │   └── description: (required)
│   └── Markdown instructions (required)
└── Bundled Resources (optional)
    ├── scripts/          - Executable code
    ├── references/       - Documentation loaded as needed
    └── assets/           - Files used in output

Core Principles

核心原则

Concise is Key

简洁为关键

The context window is a shared resource. Your skill shares it with everything else the agent needs. Be concise and challenge each piece of information:
  • Does the agent really need this explanation?
  • Can I assume the agent knows this?
  • Does this paragraph justify its token cost?
上下文窗口是共享资源。你的Skill会与Agent所需的其他所有内容共享这个资源。请保持内容简洁,并逐一验证每条信息:
  • Agent真的需要这个解释吗?
  • 我能否假设Agent已经了解这些内容?
  • 这段内容的令牌成本是否合理?

Set Appropriate Degrees of Freedom

设置合适的自由度

  • High freedom: Text-based instructions for multiple valid approaches
  • Medium freedom: Pseudocode or scripts with parameters
  • Low freedom: Specific scripts with few/no parameters for fragile operations
  • 高自由度:支持多种有效实现方式的文本说明
  • 中等自由度:带参数的伪代码或脚本
  • 低自由度:针对敏感操作的特定脚本(几乎无参数)

Test with All Models

适配所有模型测试

Skills act as additions to models, so effectiveness depends on the underlying model. Test your skill with all models you plan to use it with.
Skill是对模型的扩展,因此其有效性取决于底层模型。请在所有计划使用的模型上测试你的Skill。

References

参考资料

For detailed guidance, see:
  • references/progressive-disclosure.md
    - 200-line rule and references pattern
  • references/skill-structure.md
    - SKILL.md format and frontmatter details
  • references/examples.md
    - Good skill examples
  • references/best-practices.md
    - Comprehensive best practices guide
如需详细指导,请参阅:
  • references/progressive-disclosure.md
    - 200行规则及参考资料模式
  • references/skill-structure.md
    - SKILL.md格式及前置元数据详情
  • references/examples.md
    - 优秀Skill示例
  • references/best-practices.md
    - 完整的最佳实践指南