Getting Started
Creating a custom skill involves three main steps:File Structure
Each skill is a directory containing these files:Skill Slug Requirements
- Lowercase letters, numbers, and hyphens only
- Must start with a letter
- No spaces or special characters
- Examples:
commit,code-review,api-docs
SKILL.md Format
The SKILL.md file uses YAML frontmatter followed by Markdown content:Frontmatter Fields
name (required)
name (required)
Display name shown in the UI and skill list.
description (required)
description (required)
Brief 1-2 sentence explanation of what the skill does.
globs (optional)
globs (optional)
Array of glob patterns. When files matching these patterns are being worked on, the skill may be automatically suggested.
alwaysAllow (optional)
alwaysAllow (optional)
Array of tool names that are automatically allowed when this skill is active. Useful for skills that require specific tools without prompting.
requiredSources (optional)
requiredSources (optional)
Array of source slugs to auto-enable when this skill is invoked. Sources must exist in the workspace and be authenticated.
Writing Effective Instructions
Structure Your Content
Organize instructions with clear headings and sections:Be Specific and Actionable
Include Examples
Show Claude exactly what you expect:Set Clear Boundaries
Explicitly state what the skill should NOT do:Adding Icons
Every skill should have a visually relevant icon for easy identification.Icon Requirements
- Filename: Must be
icon.svg,icon.png,icon.jpg, oricon.jpeg - Format: SVG preferred (scalable, crisp at all sizes)
- Size: For PNG/JPG, use at least 64x64 pixels
Finding Icons
Heroicons
MIT licensed, clean UI icons
Feather Icons
Simple, consistent icon set
Simple Icons
Brand icons (Git, npm, etc.)
Icon Selection Guide
| Skill Type | Suggested Icons |
|---|---|
| Git/Commit | Git logo, commit symbol |
| Testing | Checkmark, test tube, beaker |
| Deployment | Rocket, cloud, server |
| Code Review | Magnifying glass, eye, checklist |
| Documentation | Book, file text, document |
| Security | Shield, lock, key |
Example Skills
Commit Message Skill
Team Standards Skill
API Documentation Skill
Validating Skills
Use the validation tool to check your skill:What Gets Validated
- Slug format (lowercase, alphanumeric, hyphens only)
- SKILL.md exists and is readable
- YAML frontmatter is valid
- Required fields present (name, description)
- Content is non-empty
- Icon format (if present)
Testing Your Skill
Best Practices Checklist
Keep instructions specific and actionable
Include concrete examples of expected output
Set clear boundaries (what NOT to do)
Use a focused scope (one task per skill)
Add a visually relevant icon
Validate after creation or edits
Test with real scenarios
Update based on feedback
Troubleshooting
Skill not loading
Skill not loading
- Check slug format (lowercase, alphanumeric, hyphens only)
- Verify SKILL.md exists and is readable
- Run
skill_validatefor detailed errors - Check file permissions (should be readable)
Skill not triggering on files
Skill not triggering on files
- Verify glob patterns match your files
- Check if skill is in correct workspace
- Ensure file paths are relative to project root
Icon not showing
Icon not showing
- Use supported formats: svg, png, jpg, jpeg
- File must be named
icon.{ext}(notmy-icon.svg) - Check icon file is not corrupted
- For SVG, ensure valid XML structure
Instructions not followed
Instructions not followed
- Make instructions more specific
- Add concrete examples
- Break complex tasks into steps
- Set explicit boundaries
Next Steps
Import from Claude Code
Learn how to import existing skills from Claude Code SDK