458 lines
11 KiB
Markdown
458 lines
11 KiB
Markdown
---
|
||
name: claude-skills
|
||
description: Claude Skills Documentation - Learn how to create, use, and manage skills for Claude. Includes skill structure, YAML frontmatter, examples, and best practices for extending Claude's capabilities across Claude Code, Claude.ai, and the Claude API.
|
||
---
|
||
|
||
# Claude Skills Documentation Skill
|
||
|
||
Comprehensive guide to Claude Skills - folders of instructions, scripts, and resources that Claude loads dynamically to improve performance on specialized tasks.
|
||
|
||
## When to Use This Skill
|
||
|
||
This skill should be triggered when:
|
||
- Learning how to create Claude Skills
|
||
- Understanding skill structure and format
|
||
- Looking for skill examples and templates
|
||
- Integrating skills with Claude Code, Claude.ai, or Claude API
|
||
- Writing YAML frontmatter for skills
|
||
- Organizing skill directories and files
|
||
- Finding best practices for skill development
|
||
- Exploring example skills from Anthropic
|
||
|
||
## What Are Skills?
|
||
|
||
**Skills are folders of instructions, scripts, and resources that Claude loads dynamically to improve performance on specialized tasks.**
|
||
|
||
Skills teach Claude how to complete specific tasks in a repeatable way, whether that's:
|
||
- Creating documents with your company's brand guidelines
|
||
- Analyzing data using your organization's specific workflows
|
||
- Automating personal tasks
|
||
- Working with specific file formats or APIs
|
||
- Applying domain-specific knowledge
|
||
|
||
## Quick Reference
|
||
|
||
### Basic Skill Structure
|
||
|
||
Every skill requires:
|
||
1. **A folder** containing the skill files
|
||
2. **A `SKILL.md` file** with YAML frontmatter and instructions
|
||
|
||
### Minimal SKILL.md Template
|
||
|
||
```markdown
|
||
---
|
||
name: my-skill-name
|
||
description: A clear description of what this skill does and when to use it
|
||
---
|
||
|
||
# My Skill Name
|
||
|
||
[Add your instructions here that Claude will follow when this skill is active]
|
||
|
||
## Examples
|
||
- Example usage 1
|
||
- Example usage 2
|
||
|
||
## Guidelines
|
||
- Guideline 1
|
||
- Guideline 2
|
||
```
|
||
|
||
### Required YAML Fields
|
||
|
||
- **`name`** - Unique identifier (lowercase, hyphens for spaces)
|
||
- Example: `brand-guidelines`, `pdf-analyzer`, `slack-gif-creator`
|
||
|
||
- **`description`** - Complete description of what the skill does and when to use it
|
||
- Should clearly explain the skill's purpose
|
||
- Helps Claude decide when to activate the skill
|
||
|
||
### Optional Skill Components
|
||
|
||
**Additional Files:**
|
||
- `references/` - Supporting documentation
|
||
- `scripts/` - Helper scripts or automation
|
||
- `assets/` - Templates, images, or other resources
|
||
|
||
## Skill Categories & Examples
|
||
|
||
### Creative & Design
|
||
- **algorithmic-art** - Generative art using p5.js
|
||
- **canvas-design** - Visual art in PNG/PDF formats
|
||
- **slack-gif-creator** - Animated GIFs for Slack
|
||
|
||
### Development & Technical
|
||
- **artifacts-builder** - Build HTML artifacts with React + Tailwind
|
||
- **mcp-server** - Create MCP servers for API integration
|
||
- **webapp-testing** - Test web apps with Playwright
|
||
|
||
### Enterprise & Communication
|
||
- **brand-guidelines** - Apply company branding
|
||
- **internal-comms** - Write status reports and newsletters
|
||
- **theme-factory** - Professional artifact themes
|
||
|
||
### Document Skills (Advanced)
|
||
- **docx** - Word documents with tracked changes
|
||
- **pdf** - PDF manipulation and extraction
|
||
- **pptx** - PowerPoint presentations
|
||
- **xlsx** - Excel spreadsheets with formulas
|
||
|
||
### Meta Skills
|
||
- **skill-creator** - Guide for creating effective skills
|
||
- **template-skill** - Basic template for new skills
|
||
|
||
## Using Skills
|
||
|
||
### In Claude Code
|
||
|
||
**Add the Anthropic Skills marketplace:**
|
||
```bash
|
||
/plugin marketplace add anthropics/skills
|
||
```
|
||
|
||
**Install skills:**
|
||
```bash
|
||
# Interactive installation
|
||
# 1. Select "Browse and install plugins"
|
||
# 2. Select "anthropic-agent-skills"
|
||
# 3. Select "document-skills" or "example-skills"
|
||
# 4. Select "Install now"
|
||
|
||
# Direct installation
|
||
/plugin install document-skills@anthropic-agent-skills
|
||
/plugin install example-skills@anthropic-agent-skills
|
||
```
|
||
|
||
**Use a skill:**
|
||
```
|
||
"Use the PDF skill to extract form fields from path/to/file.pdf"
|
||
```
|
||
|
||
### In Claude.ai
|
||
|
||
1. Go to Claude.ai (paid plan required)
|
||
2. Example skills are pre-available
|
||
3. Upload custom skills via the skills interface
|
||
|
||
See: [Using skills in Claude](https://support.claude.com/en/articles/12512180-using-skills-in-claude)
|
||
|
||
### Via Claude API
|
||
|
||
Use pre-built skills or upload custom skills programmatically.
|
||
|
||
See: [Skills API Quickstart](https://docs.claude.com/en/api/skills-guide#creating-a-skill)
|
||
|
||
## Creating Effective Skills
|
||
|
||
### Best Practices
|
||
|
||
**1. Clear Description**
|
||
- Explain what the skill does
|
||
- Specify when to use it
|
||
- Include key capabilities
|
||
|
||
**2. Structured Instructions**
|
||
- Use clear headings and sections
|
||
- Provide specific examples
|
||
- Include edge cases and error handling
|
||
|
||
**3. Comprehensive Guidelines**
|
||
- List do's and don'ts
|
||
- Explain constraints and limitations
|
||
- Provide fallback strategies
|
||
|
||
**4. Practical Examples**
|
||
- Show real-world usage
|
||
- Include input/output examples
|
||
- Cover common scenarios
|
||
|
||
### Skill Structure Pattern
|
||
|
||
```markdown
|
||
---
|
||
name: skill-name
|
||
description: What it does and when to use it
|
||
---
|
||
|
||
# Skill Name
|
||
|
||
## Purpose
|
||
[Clear explanation of the skill's purpose]
|
||
|
||
## When to Use This Skill
|
||
- Use case 1
|
||
- Use case 2
|
||
- Use case 3
|
||
|
||
## Instructions
|
||
[Detailed step-by-step instructions]
|
||
|
||
## Examples
|
||
### Example 1: [Scenario]
|
||
[Code or instructions]
|
||
|
||
### Example 2: [Another Scenario]
|
||
[Code or instructions]
|
||
|
||
## Guidelines
|
||
- Guideline 1
|
||
- Guideline 2
|
||
- Guideline 3
|
||
|
||
## Constraints
|
||
- Limitation 1
|
||
- Limitation 2
|
||
|
||
## Error Handling
|
||
[How to handle common errors]
|
||
|
||
## Resources
|
||
[Links to documentation, references, etc.]
|
||
```
|
||
|
||
## Advanced Features
|
||
|
||
### Multi-File Skills
|
||
|
||
Skills can include multiple supporting files:
|
||
|
||
```
|
||
my-skill/
|
||
|