Skill Creator⚠️ Performance Tip: This Skill includes a complete evaluation system (Grader/Comparator/Analyzer), suitable for use when creating important Skills. For simple Skills, the evaluation step can be skipped.
This Skill provides complete workflow guidance for creating high-quality Skills.
About Skills
Skills are modular, self-contained packages that extend Claude's capabilities by providing domain-specific knowledge, workflows, and tools. You can think of them as "onboarding guides" for a specific domain or task—they transform Claude from a general-purpose agent into a specialized agent equipped with procedural knowledge.
The Value Skills Provide
- Specialized workflows - Multi-step domain-specific processes
- Tool integration - Instructions for handling specific file formats or APIs
- Domain expertise - Company-specific knowledge, patterns, business logic
- Bundled resources - Scripts, reference documents, and resources for complex and repetitive tasks
Core Principles
Conciseness Is King
The context window is a shared resource. Skills share the context window with everything else Claude needs: the system prompt, conversation history, metadata for other Skills, and the actual user request.
Default assumption: Claude is already very smart. Only add context that Claude does not already have. Question every piece of information: "Does Claude really need this explanation?" and "Is the token cost of this passage reasonable?"
Use concise examples instead of lengthy explanations.
Set the Appropriate Degree of Freedom
Set the specific level of guidance based on the fragility and variability of the task:
| Degree of Freedom | Type | Use Case |
|---|---|---|
| High degree of freedom | Text-based instructions | Multiple approaches are valid, decisions depend on context |
| Medium degree of freedom | Pseudocode or scripts with parameters | A preferred pattern exists, some variation is acceptable |
| Low degree of freedom | Specific scripts, few parameters | Operations are fragile and error-prone, consistency is critical, a specific order must be followed |
Think of Claude as exploring a path: a narrow cliff bridge needs specific guardrails (low degree of freedom), while an open field allows multiple routes (high degree of freedom).
Skill Structure
Each Skill consists of one required SKILL.md file and optional bundled resources:
skill-name/
├── SKILL.md (必需)
│ ├── YAML frontmatter 元数据 (必需)
│ │ ├── name: (必需)
│ │ └── description: (必需)
│ └── Markdown 正文 (必需)
└── 打包资源 (可选)
├── scripts/ - 可执行代码 (Python/Bash 等)
├── references/ - 按需加载到上下文的文档
└── assets/ - 输出中使用的文件
SKILL.md Format
Each SKILL.md consists of the following parts:
- Frontmatter (YAML): Contains the
nameanddescriptionfields. This is the only basis for Claude to determine when to use the Skill, so it is very important to clearly describe what the Skill does and the scenarios that trigger it. - Body (Markdown): Instructions and guidance for using the Skill. Only loaded after the Skill is activated.
Bundled Resources
Scripts (scripts/)
Executable code for tasks that require deterministic reliability or are repeatedly rewritten.
- When to Include: When the same code is repeatedly rewritten or deterministic reliability is required
- Example: For PDF rotation tasks,
scripts/rotate_pdf.py - Advantages: Token-efficient, deterministic, executable without loading into context
References (references/)
Documents and reference materials used for on-demand loading into context to guide Claude's process and thinking.
- When to include: When there are documents Claude should reference
- Examples: The financial model's
references/finance.md, the API documentation'sreferences/api_docs.md - Best practices: If the file is large (>10k words), include grep search patterns in SKILL.md
Assets (assets/)
Not intended to be loaded into context, but files used in Claude-generated output.
- When to include: When the Skill needs files for final output
- Examples: Brand assets'
assets/logo.png, templates'assets/frontend-template/
What to Not Include in a Skill
A skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:
- README.md
- INSTALLATION_GUIDE.md
- QUICK_REFERENCE.md
- CHANGELOG.md
- etc.
The skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxilary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.
Progressive Disclosure Design Principle
Skills use a three-level loading system to manage context efficiently:
- Metadata (name + description) - Always in context (~100 words)
- SKILL.md body - When skill triggers (<5k words)
- Bundled resources - As needed by Claude (Unlimited because scripts can be executed without reading into context window)
Progressive Disclosure Patterns
Keep SKILL.md body to the essentials and under 500 lines to minimize context bloat. Split content into separate files when approaching this limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.
Key principle: When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.
Pattern 1: High-level guide with references
# PDF Processing
## Quick start
Extract text with pdfplumber:
[code example]
## Advanced features
- **Form filling**: See [FORMS.md](FORMS.md) for complete guide
- **API reference**: See [REFERENCE.md](REFERENCE.md) for all methods
- **Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns
Claude loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.
Pattern 2: Domain-specific organization
For Skills with multiple domains, organize content by domain to avoid loading irrelevant context:
bigquery-skill/
├── SKILL.md (overview and navigation)
└── reference/
├── finance.md (revenue, billing metrics)
├── sales.md (opportunities, pipeline)
├── product.md (API usage, features)
└── marketing.md (campaigns, attribution)
When a user asks about sales metrics, Claude only reads sales.md.
Similarly, for skills supporting multiple frameworks or variants, organize by variant:
cloud-deploy/
├── SKILL.md (workflow + provider selection)
└── references/
├── aws.md (AWS deployment patterns)
├── gcp.md (GCP deployment patterns)
└── azure.md (Azure deployment patterns)
When the user chooses AWS, Claude only reads aws.md.
Pattern 3: Conditional details
Show basic content, link to advanced content:
# DOCX Processing
## Creating documents
Use docx-js for new documents. See [DOCX-JS.md](DOCX-JS.md).
## Editing documents
For simple edits, modify the XML directly.
**For tracked changes**: See [REDLINING.md](REDLINING.md)
**For OOXML details**: See [OOXML.md](OOXML.md)
Claude reads REDLINING.md or OOXML.md only when the user needs those features.
Important guidelines:
- Avoid deeply nested references - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.
- Structure longer reference files - For files longer than 100 lines, include a table of contents at the top so Claude can see the full scope when previewing.
Skill Creation Process
Skill creation involves these steps:
- Understand the skill with concrete examples
- Plan reusable skill contents (scripts, references, assets)
- Initialize the skill (run init_skill.py)
- Edit the skill (implement resources and write SKILL.md)
- Package the skill (run package_skill.py)
- Iterative improvement - Optimize the Skill based on real usage feedback
Follow these steps in order, skipping only if there is a clear reason why they are not applicable.
Step 5: Evaluation and Quality Assurance
After creating a Skill, a rigorous quality evaluation must be conducted. Use a three-agent evaluation system:
5.1 Grader
Responsibilities: Strictly evaluate the Skill output quality
Evaluation dimensions:
- Accuracy (1-5): Does the output accurately answer the question?
- Completeness (1-5): Does it cover all necessary steps?
- Executability (1-5): Are the instructions clear and executable?
- Edge case handling (1-5): Are errors and exceptions handled properly?
Pass criteria:
- Average score ≥ 4.0/5 → Pass
- Any dimension < 3 → Fail
- Other cases → Re-evaluate after iteration
5.2 Comparator (blind comparator)
Responsibilities: Compare Skill vs non-Skill output without knowing the source
Comparison dimensions:
- Task completion (40%): Which one solves the problem better?
- Code quality (25%): Which one is more standard and maintainable?
- Clarity (20%): Which one explains more clearly?
- Edge case handling (15%): Which one considers more edge cases?
Pass criteria:
- Skill output is clearly better ≥ 60% → Evaluation passes
- Other cases → Adjust after problem diagnosis
5.3 Analyzer
Responsibilities: Aggregate evaluation data, analyze causes, and propose improvement suggestions
Analysis content:
- Overall statistics (pass rate, average score)
- Dimension analysis (highest/lowest/average scores)
- Success patterns (replicable features)
- Failure reasons (root problems)
- Improvement suggestions (sorted by P0/P1/P2 priority)
Pass criteria:
- P0 suggestions < 1 → Can release
- P0 suggestions ≥ 1 → Must fix
- P1 suggestions < 3 → Can release
- P1 suggestions ≥ 3 → Release after iteration
Evaluation flow chart
新 Skill → 收集测试用例 → Grader 评估
↓
{通过?}
├─ 是 → Comparator 盲测
└─ 否 → 返回改进 → 重新收集用例
↓
{A 更好?}
├─ 是 → Analyzer 分析
└─ 否 → 问题诊断 → 调整 Skill
↓
{改进建议 < 3?}
├─ 是 → 发布
└─ 否 → 迭代改进
Quick evaluation guide
Simple Skill (< 3KB):
- Prepare 5 test cases
- Grader evaluation (1 round)
- Comparator blind test (1 round)
- If passed, publish
Complex Skill (> 10KB or multi-function):
- Prepare 20 test cases (10 happy path + 10 edge cases)
- Grader evaluation (3 rounds, optimize each round)
- Comparator blind test (2 rounds)
- Analyzer full analysis
- Iterate based on suggestions
- Final release review
Detailed evaluation document: Refer to AGENTS.md to get the complete Agent definition, evaluation templates, and best practices.
Step 6: Iterative improvement
Continuously optimize based on evaluation feedback:
-
Collect real feedback
- User usage data (usage count, success rate)
- Evaluation results (Grader/Comparator/Analyzer)
- Error reports and edge cases
-
Prioritization
- P0: Bugs affecting core functionality
- P1: Important experience issues
- P2: Optimization suggestions
-
Small-step iteration
- Focus on 1-2 issues per iteration
- Avoid large changes all at once
- Re-evaluate after each modification
-
Release cadence
- Simple fixes: release anytime
- Feature adjustments: release weekly
- Major changes: release monthly
Step 1: Understanding the Skill with Concrete Examples
Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
For example, when building an image-editor skill, relevant questions include:
- "What functionality should the image-editor skill support? Editing, rotating, anything else?"
- "Can you give some examples of how this skill would be used?"
- "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"
- "What would a user say that should trigger this skill?"
To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
Conclude this step when there is a clear sense of the functionality the skill should support.
Step 2: Planning the Reusable Skill Contents
To turn concrete examples into an effective skill, analyze each example by:
- Considering how to execute on the example from scratch
- Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
Example: When building a pdf-editor skill to handle queries like "Help me rotate this PDF," the analysis shows:
- Rotating a PDF requires re-writing the same code each time
- A
scripts/rotate_pdf.pyscript would be helpful to store in the skill
Example: When designing a frontend-webapp-builder skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
- Writing a frontend webapp requires the same boilerplate HTML/React each time
- An
assets/hello-world/template containing the boilerplate HTML/React project files would be helpful to store in the skill
Example: When building a big-query skill to handle queries like "How many users have logged in today?" the analysis shows:
- Querying BigQuery requires re-discovering the table schemas and relationships each time
- A
references/schema.mdfile documenting the table schemas would be helpful to store in the skill
To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
Step 3: Initializing the Skill
At this point, it is time to actually create the skill.
Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.
When creating a new skill from scratch, always run the init_skill.py script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.
Usage:
scripts/init_skill.py <skill-name> --path <output-directory>
The script:
- Creates the skill directory at the specified path
- Generates a SKILL.md template with proper frontmatter and TODO placeholders
- Creates example resource directories:
scripts/,references/, andassets/ - Adds example files in each directory that can be customized or deleted
After initialization, customize or remove the generated SKILL.md and example files as needed.
Step 4: Edit the Skill
When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of Claude to use. Include information that would be beneficial and non-obvious to Claude. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Claude instance execute these tasks more effectively.
Learn Proven Design Patterns
Consult these helpful guides based on your skill's needs:
- Multi-step processes: See references/workflows.md for sequential workflows and conditional logic
- Specific output formats or quality standards: See references/output-patterns.md for template and example patterns
These files contain established best practices for effective skill design.
Start with Reusable Skill Contents
To begin implementation, start with the reusable resources identified above: scripts/, references/, and assets/ files. Note that this step may require user input. For example, when implementing a brand-guidelines skill, the user may need to provide brand assets or templates to store in assets/, or documentation to store in references/.
Added scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected. If there are many similar scripts, only a representative sample needs to be tested to ensure confidence that they all work while balancing time to completion.
Any example files and directories not needed for the skill should be deleted. The initialization script creates example files in scripts/, references/, and assets/ to demonstrate structure, but most skills won't need all of them.
Update SKILL.md
Writing Guidelines: Always use imperative/infinitive form.
Frontmatter
Write the YAML frontmatter with name and description:
name: The skill namedescription: This is the primary triggering mechanism for your skill, and helps Claude understand when to use the skill.- Include both what the Skill does and specific triggers/contexts for when to use it.
- Include all "when to use" information here - Not in the body. The body is only loaded after triggering, so "When to Use This Skill" sections in the body are not helpful to Claude.
- Example description for a
docxskill: "Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks"
Do not include any other fields in YAML frontmatter.
Body
Write instructions for using the skill and its bundled resources.
Step 5: Packaging a Skill
Once development of the skill is complete, it must be packaged into a distributable .skill file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:
scripts/package_skill.py <path/to/skill-folder>
Optional output directory specification:
scripts/package_skill.py <path/to/skill-folder> ./dist
The packaging script will:
-
Validate the skill automatically, checking:
- YAML frontmatter format and required fields
- Skill naming conventions and directory structure
- Description completeness and quality
- File organization and resource references
-
Package the skill if validation passes, creating a .skill file named after the skill (e.g.,
my-skill.skill) that includes all files and maintains the proper directory structure for distribution. The .skill file is a zip file with a .skill extension.
If validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.
Step 6: Iterate
After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.
Iteration workflow:
- Use the skill on real tasks
- Notice struggles or inefficiencies
- Identify how SKILL.md or bundled resources should be updated
- Implement changes and test again