example-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseExample 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的功能
- Demonstrates proper YAML frontmatter format
- Shows content structure requirements
- Provides examples of bundled resources
- Illustrates best practices for skill documentation
- 演示标准YAML前置元数据格式
- 展示内容结构要求
- 提供捆绑资源的示例
- 说明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:
- Review this example skill structure
- Use the template from
steve/templates/AGENT_SKILL.template.md - Fill in domain-specific content
- Add bundled resources if needed
场景: 创建用于代码审查的新Skill
方法:
- 参考本示例Skill的结构
- 使用中的模板
steve/templates/AGENT_SKILL.template.md - 填充领域特定内容
- 如有需要,添加捆绑资源
Reference Files
参考文件
This skill includes reference files in :
references/- : Detailed structure guidelines
structure-guide.md - : Additional examples
examples.md
本Skill在目录下包含参考文件:
references/- : 详细的结构指南
structure-guide.md - : 更多示例
examples.md