Creates and refines Claude agent skills following best practices. Use when creating new skills, improving existing ones, or learning about skill structure and conventions.
This skill helps you create high-quality Claude agent skills that follow established best practices and conventions.
CRITICAL: All skill files MUST use Unix line endings (LF, \n) only. Never use Windows line endings (CRLF, \r\n).
Create a skill when:
Don't create a skill for:
Important: Skills stored in ~/.claude/skills/ may be symlinked from other locations (e.g., files/claude-skills in version-controlled repos). When using tools like find to discover skills:
find -L to follow symbolic linksfind won't follow symlinks by defaultskill-name/
โโโ SKILL.md (required: main instructions)
โโโ REFERENCE.md (optional: domain knowledge)
โโโ EXAMPLES.md (optional: input/output examples)
โโโ scripts/ (optional: utility scripts)
โโโ validator.py
Every SKILL.md requires YAML frontmatter plus markdown body:
---
name: skill-name
description: What this skill does and when to use it (max 1024 chars)
---
# Skill Name
[Instructions for Claude in markdown]
name (required):
processing-pdfs, analyzing-spreadsheetshelper, utils, reserved words containing "anthropic" or "claude"description (required):
"The context window is a public good." Only include information Claude doesn't already know. Challenge every element: does it justify its token cost?
High-level guide with references:
For detailed procedures, see FORMS.md.
For API specifications, see REFERENCE.md.
For examples, see EXAMPLES.md.
Domain-specific organization:
reference/finance.md
reference/sales.md
reference/legal.md
Conditional details:
For advanced error handling, see [advanced-errors.md](advanced-errors.md).
Choose one term and use it consistently:
Match specificity to task requirements:
High freedom (flexible approaches):
Medium freedom (preferred patterns):
Low freedom (precise execution):
Structure multi-step operations with explicit checklists:
## Review Process
Copy this checklist and mark items as you complete them:
- [ ] Run validator on input
- [ ] Fix any validation errors
- [ ] Generate output
- [ ] Validate output format
- [ ] Confirm all requirements met
1. Run validator script
2. Review errors
3. Fix issues
4. Repeat until validation passes
Provide pre-made scripts for:
Clearly distinguish:
"Handle error conditions rather than punting to Claude."
try:
result = process_data(input)
except ValidationError as e:
# Provide meaningful alternative
result = handle_validation_error(e)
except Exception as e:
# Log and provide fallback
log_error(e)
result = safe_fallback()
Justify all configuration values:
# Good: explains the why
MAX_RETRIES = 3 # Balance between reliability and performance
# Bad: unexplained "voodoo constant"
MAX_RETRIES = 3
For complex operations, create intermediate verifiable files:
# Generate changes first
changes = analyze_input(data)
save_json(changes, "changes.json")
# User can review changes.json before applying
if validate_changes("changes.json"):
apply_changes(changes)
Adjust strictness based on requirements:
Mandatory (for APIs):
## Output Format (Required)
```json
{
"field": "value",
"items": []
}
**Flexible** (for analysis):
```markdown
## Output Format (Suggested)
Present findings in these sections:
- Summary
- Key insights
- Recommendations
Include input/output pairs demonstrating:
## Example
Input:
[concrete example input]
Output:
[expected output showing style and detail]
Don't use date-based conditions:
<!-- Bad -->
As of 2024, use method A. Before 2024, use method B.
<!-- Good -->
Use method A (current approach).
<details>
<summary>Legacy patterns</summary>
Method B was used in older versions...
</details>
โ Offering excessive options: "Use pypdf, pdfplumber, PyMuPDF, or..." โ Provide default with escape hatch: "Use pypdf. For special cases requiring X, consider Y."
โ Windows-style paths: scripts\validator.py
โ
Unix-style paths: scripts/validator.py (works everywhere)
โ Abstract examples: "For a document like X, do Y" โ Concrete examples: Actual input/output pairs
โ Vague descriptions: "Helps with documents" โ Specific descriptions: "Extracts text and tables from PDFs, fills forms"
โ Inconsistent terminology: field/box/element mixed โ Consistent terminology: Use "field" throughout
Use one Claude instance to design and refine the skill:
Test with a separate Claude instance:
Monitor for:
Return to design instance:
Build test scenarios:
Test skills across all Claude models:
Effectiveness varies by model capability. Ensure skills work acceptably across all three.
Before considering a skill complete:
Claude.ai: Upload via Settings > Features as zip files
Claude API: Upload through Skills API (/v1/skills)
code-execution-2025-08-25, skills-2025-10-02, files-api-2025-04-14Claude Code: Filesystem-based
Agent SDK: .claude/skills/ configuration directories
Skills use progressive disclosure with three tiers:
Only relevant content occupies context window at any time.