Getting Started with Claude Code Skills
Getting Started with Claude Code Skills
Claude Code skills are reusable prompts and workflows that extend Claudeβs capabilities for specific tasks. This guide will teach you everything you need to know to get started.
What Are Skills?
Skills are markdown files with a specific structure that Claude Code can read and execute. They live in your ~/.claude/skills/ directory.
~/.claude/
βββ skills/
β βββ my-skill/
β β βββ SKILL.md # Main skill file
β β βββ references/ # Optional supporting files
β βββ another-skill/
β βββ SKILL.md
Skill Architecture
Hereβs how skills work in the Claude Code ecosystem:
flowchart TD
A[User Request] --> B{Skill Match?}
B -->|Yes| C[Load SKILL.md]
B -->|No| D[Direct Response]
C --> E[Parse Frontmatter]
E --> F[Execute Skill Logic]
F --> G[Return Result]
D --> G
Creating Your First Skill
Letβs create a simple skill that helps format code reviews.
Step 1: Create the Directory
mkdir -p ~/.claude/skills/code-reviewer
Step 2: Create SKILL.md
---
name: code-reviewer
description: Reviews code for best practices and suggests improvements
triggers:
- review this code
- code review
- check my code
---
# Code Reviewer Skill
When reviewing code, I will:
1. Check for security vulnerabilities
2. Identify performance issues
3. Suggest readability improvements
4. Verify error handling
## Review Format
For each issue found, I'll provide:
- **Location**: File and line number
- **Severity**: Low/Medium/High
- **Issue**: Description of the problem
- **Fix**: Suggested solution
Step 3: Test Your Skill
Open Claude Code and try:
/code-reviewer
Please review this function:
function processUser(data) {
const query = "SELECT * FROM users WHERE id = " + data.id;
return database.execute(query);
}
The skill will identify the SQL injection vulnerability and suggest using parameterized queries instead.
Best Practices
Keep Skills Focused
Each skill should do one thing well. Instead of a monolithic βdo-everythingβ skill, create focused skills:
| β Donβt | β Do |
|---|---|
all-in-one-helper | code-reviewer |
test-generator | |
doc-writer |
Use Progressive Disclosure
Load complex resources only when needed:
## Quick Reference
[Basic usage info here - always loaded]
## Advanced Usage
For advanced patterns, see: `references/advanced.md`
Include Examples
Always provide example invocations:
## Examples
**Example 1: Basic review**
> /code-reviewer check my Python function
**Example 2: Specific focus**
> /code-reviewer focus on security for this API endpoint
Installing Skills from SkillzWave
Browse our marketplace to find skills created by the community. To install:
- Find a skill you like
- Click βInstallβ
- Follow the installation instructions
- The skill will be available in your Claude Code sessions
Next Steps
- Explore our Skills Marketplace with 41,000+ skills
- Read about Advanced Skill Patterns
- Submit your own skill to share with the community
Happy skill building!
π Discover AI Agent Skills
Browse our marketplace of 41,000+ Claude Code skills, agents, and tools. Find the perfect skill for your workflow or submit your own.