example-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Example Skill

示例Skill

A demonstration skill showing the proper structure and format for Claude Code skills.
本演示Skill展示了Claude Code Skill的标准结构与格式。

When to Use This Skill

适用场景

  • Creating new skills and need a reference
  • Understanding skill structure and best practices
  • Learning how to bundle resources with skills
  • 创建新Skill时需要参考模板
  • 理解Skill的结构与最佳实践
  • 学习如何为Skill捆绑资源

What This Skill Does

本Skill的功能

  1. Demonstrates proper YAML frontmatter format
  2. Shows content structure requirements
  3. Provides examples of bundled resources
  4. Illustrates best practices for skill documentation
  1. 演示标准YAML前置元数据格式
  2. 展示内容结构要求
  3. 提供捆绑资源的示例
  4. 说明Skill文档编写的最佳实践

Core Principles

核心原则

Principle 1: Clear Purpose

原则1:明确目标

Skills should have a clear, well-defined purpose. The "When to Use" section should make it obvious when to apply the skill.
Skill应具备清晰、明确的定位。“适用场景”部分需清晰说明何时应使用该Skill。

Principle 2: Progressive Disclosure

原则2:渐进式信息披露

Structure content from high-level overview to detailed implementation. Start with "When to Use" and "What This Skill Does" before diving into workflows.
内容结构应从高层概述逐步过渡到详细实现。在深入工作流之前,先介绍“适用场景”和“本Skill的功能”。

Principle 3: Actionable Workflows

原则3:可执行工作流

Provide step-by-step workflows that can be followed directly. Include examples and anti-patterns.
提供可直接遵循的分步工作流,包含示例与反模式。

Workflow

工作流

Step 1: Identify Need

步骤1:确认需求

Determine if this skill is appropriate for the current task.
判断本Skill是否适用于当前任务。

Step 2: Review Documentation

步骤2:查阅文档

Read the skill documentation to understand capabilities and limitations.
阅读Skill文档以了解其能力与局限性。

Step 3: Apply Skill

步骤3:应用Skill

Follow the workflow steps to apply the skill.
遵循工作流步骤应用本Skill。

Step 4: Validate Results

步骤4:验证结果

Check that the skill achieved the intended outcome.
检查Skill是否达成预期效果。

Best Practices

最佳实践

  • Keep skills focused on a single domain or capability
  • Include clear examples and use cases
  • Document anti-patterns to avoid common mistakes
  • Bundle resources when they add value
  • 保持Skill专注于单一领域或能力
  • 包含清晰的示例与用例
  • 记录反模式以避免常见错误
  • 在能增加价值时捆绑资源

Anti-Patterns

反模式

  • Creating overly broad skills that try to do everything
  • Skipping the "When to Use" section
  • Missing examples or use cases
  • Not documenting bundled resources
  • 创建过于宽泛、试图涵盖所有功能的Skill
  • 跳过“适用场景”部分
  • 缺少示例或用例
  • 未记录捆绑的资源

Examples

示例

Example 1: Basic Usage

示例1:基础用法

Scenario: Creating a new skill for code review
Approach:
  1. Review this example skill structure
  2. Use the template from
    steve/templates/AGENT_SKILL.template.md
  3. Fill in domain-specific content
  4. Add bundled resources if needed
场景: 创建用于代码审查的新Skill
方法:
  1. 参考本示例Skill的结构
  2. 使用
    steve/templates/AGENT_SKILL.template.md
    中的模板
  3. 填充领域特定内容
  4. 如有需要,添加捆绑资源

Reference Files

参考文件

This skill includes reference files in
references/
:
  • structure-guide.md
    : Detailed structure guidelines
  • examples.md
    : Additional examples
本Skill在
references/
目录下包含参考文件:
  • structure-guide.md
    : 详细的结构指南
  • examples.md
    : 更多示例