Prerequisites
- Claude Code version 1.0 or later
- Basic familiarity with Claude Code
What are Agent Skills?
Agent Skills package expertise into discoverable capabilities. Each Skill consists of aSKILL.md
file with instructions that Claude reads when relevant, plus optional supporting files like scripts and templates.
How Skills are invoked: Skills are model-invoked—Claude autonomously decides when to use them based on your request and the Skill’s description. This is different from slash commands, which are user-invoked (you explicitly type /command
to trigger them).
Benefits:
- Extend Claude’s capabilities for your specific workflows
- Share expertise across your team via git
- Reduce repetitive prompting
- Compose multiple Skills for complex tasks
For a deep dive into the architecture and real-world applications of Agent Skills, read our engineering blog: Equipping agents for the real world with Agent Skills.
Create a Skill
Skills are stored as directories containing aSKILL.md
file.
Personal Skills
Personal Skills are available across all your projects. Store them in~/.claude/skills/
:
- Your individual workflows and preferences
- Experimental Skills you’re developing
- Personal productivity tools
Project Skills
Project Skills are shared with your team. Store them in.claude/skills/
within your project:
- Team workflows and conventions
- Project-specific expertise
- Shared utilities and scripts
Plugin Skills
Skills can also come from Claude Code plugins. Plugins may bundle Skills that are automatically available when the plugin is installed. These Skills work the same way as personal and project Skills.Write SKILL.md
Create aSKILL.md
file with YAML frontmatter and Markdown content:
description
field is critical for Claude to discover when to use your Skill. It should include both what the Skill does and when Claude should use it.
See the best practices guide for complete authoring guidance.
Add supporting files
Create additional files alongside SKILL.md:Restrict tool access with allowed-tools
Use theallowed-tools
frontmatter field to limit which tools Claude can use when a Skill is active:
- Read-only Skills that shouldn’t modify files
- Skills with limited scope (e.g., only data analysis, no file writing)
- Security-sensitive workflows where you want to restrict capabilities
allowed-tools
is not specified, Claude will ask for permission to use tools as normal, following the standard permission model.
allowed-tools
is only supported for Skills in Claude Code.View available Skills
Skills are automatically discovered by Claude from three sources:- Personal Skills:
~/.claude/skills/
- Project Skills:
.claude/skills/
- Plugin Skills: bundled with installed plugins
Test a Skill
After creating a Skill, test it by asking questions that match your description. Example: If your description mentions “PDF files”:Debug a Skill
If Claude doesn’t use your Skill, check these common issues:Make description specific
Too vague:Verify file path
Personal Skills:~/.claude/skills/skill-name/SKILL.md
Project Skills: .claude/skills/skill-name/SKILL.md
Check the file exists:
Check YAML syntax
Invalid YAML prevents the Skill from loading. Verify the frontmatter:- Opening
---
on line 1 - Closing
---
before Markdown content - Valid YAML syntax (no tabs, correct indentation)
View errors
Run Claude Code with debug mode to see Skill loading errors:Share Skills with your team
Recommended approach: Distribute Skills through plugins. To share Skills via plugin:- Create a plugin with Skills in the
skills/
directory - Add the plugin to a marketplace
- Team members install the plugin
Step 1: Add Skill to your project
Create a project Skill:Step 2: Commit to git
Step 3: Team members get Skills automatically
When team members pull the latest changes, Skills are immediately available:Update a Skill
Edit SKILL.md directly:Remove a Skill
Delete the Skill directory:Best practices
Keep Skills focused
One Skill should address one capability: Focused:- “PDF form filling”
- “Excel data analysis”
- “Git commit messages”
- “Document processing” (split into separate Skills)
- “Data tools” (split by data type or operation)
Write clear descriptions
Help Claude discover when to use Skills by including specific triggers in your description: Clear:Test with your team
Have teammates use Skills and provide feedback:- Does the Skill activate when expected?
- Are the instructions clear?
- Are there missing examples or edge cases?
Document Skill versions
You can document Skill versions in your SKILL.md content to track changes over time. Add a version history section:Troubleshooting
Claude doesn’t use my Skill
Symptom: You ask a relevant question but Claude doesn’t use your Skill. Check: Is the description specific enough? Vague descriptions make discovery difficult. Include both what the Skill does and when to use it, with key terms users would mention. Too generic:Skill has errors
Symptom: The Skill loads but doesn’t work correctly. Check: Are dependencies available? Claude will automatically install required dependencies (or ask for permission to install them) when it needs them. Check: Do scripts have execute permissions?scripts/helper.py
Wrong: scripts\helper.py
(Windows style)
Multiple Skills conflict
Symptom: Claude uses the wrong Skill or seems confused between similar Skills. Be specific in descriptions: Help Claude choose the right Skill by using distinct trigger terms in your descriptions. Instead of:Examples
Simple Skill (single file)
Skill with tool permissions
Multi-file Skill
List required packages in the description. Packages must be installed in your environment before Claude can use them.