What Are Skills?
Skills are reusable knowledge bundles that provide:- Procedures and workflows that can be invoked on-demand
- Domain knowledge preloaded into agents
- Slash commands for quick access
- Progressive disclosure to avoid context bloat
- Dynamic arguments via string substitutions
Skills live in
.claude/skills/<name>/SKILL.md and use YAML frontmatter for configuration.Why Skills Matter
Skills enable knowledge reuse and context optimization:- Reduce repetition: Define procedures once, invoke anywhere
- Progressive disclosure: Load knowledge only when needed
- Agent specialization: Preload skills into agents for focused expertise
- Team sharing: Commit skills to git for team-wide access
- Composability: Combine skills with commands and agents
Two Skill Patterns
Claude Code uses skills in two distinct ways:Standalone Skills
Invoked on-demand via
/skill-name or Skill(skill="name") tool.Used for: Reusable workflows that are called when needed.Example: /weather-svg-creator creates an SVG cardAgent Skills
Preloaded at agent startup via the
skills: field in agent frontmatter.Used for: Domain knowledge baked into a specific agent.Example: weather-fetcher preloaded into weather-agentPattern Comparison
| Aspect | Standalone Skills | Agent Skills |
|---|---|---|
| Loading | On-demand (lazy) | Preloaded at startup |
| Invocation | /skill-name or Skill(skill) | Automatic — content in context |
| Use Case | Workflows invoked by commands/Claude | Background knowledge for agents |
| Visibility | Visible in / menu (unless user-invocable: false) | Hidden from menu |
| Example | weather-svg-creator | weather-fetcher |
Frontmatter Fields
Display name and
/slash-command identifier. Defaults to directory name if omitted.What the skill does. Shown in autocomplete and used by Claude for auto-discovery.
Hint shown during autocomplete.Examples:
[issue-number], [filename]Set
true to prevent Claude from automatically invoking this skill.Set
false to hide from the / menu. Skill becomes background knowledge only, intended for agent preloading.Tools allowed without permission prompts when this skill is active.Example:
Read, Grep, GlobModel to use when this skill runs.Accepted values:
haiku, sonnet, opusSet to
fork to run the skill in an isolated subagent context.Subagent type when
context: fork is set.Lifecycle hooks scoped to this skill.
String Substitutions
Skills support dynamic values:| Variable | Description | Example |
|---|---|---|
$ARGUMENTS | All arguments passed to the skill | /fix-issue urgent → "urgent" |
$ARGUMENTS[N] | Specific argument by index | $0, $1, $2 |
$N | Shorthand for $ARGUMENTS[N] | Same as above |
${CLAUDE_SESSION_ID} | Current session identifier | Unique session ID |
!`command` | Shell command output injected | !`git status --short` |
Real Examples
How to Use Skills
- Standalone Skills
- Agent Skills (Preloaded)
Skills in the Reference Repository
From.claude/skills/ in the best practice repository:
weather-svg-creator
Type: Standalone skillCreates SVG weather card and writes output files. Invoked by the
/weather-orchestrator command after the agent fetches data.Pattern: Skill for independent output creationweather-fetcher
Type: Agent skillPreloaded into
weather-agent. Provides instructions for fetching temperature from Open-Meteo API.Pattern: Agent skill for domain procedurespresentation skills
Type: Agent skillsThree skills preloaded into
presentation-curator agent:vibe-to-agentic-frameworkpresentation-structurepresentation-styling
Skills Discovery
Claude Code discovers skills in three ways:1. Static Discovery (Fast)
At startup, Claude Code scans:.claude/skills/~/.claude/skills/- Plugin skills directories
/skills command and autocomplete immediately.
2. Dynamic Discovery (On-Demand)
When you read/edit files in a subdirectory, Claude discovers skills in that path:Skills Discovery Report
Deep dive into how skills are discovered in large monorepo projects
Best Practices
Use user-invocable: false for agent skills
Use user-invocable: false for agent skills
Skills meant for agent preloading should be hidden from the slash menu:
Keep skills focused
Keep skills focused
Each skill should cover one specific domain or procedure:Good:
deploy-checklist, api-auth-flow, database-migrationBad: everything-about-backendDocument parameters clearly
Document parameters clearly
When skills take arguments, document them:
Use subdirectories for organization
Use subdirectories for organization
/deploy:staging, /testing:unitCombine skills with agents for specialization
Combine skills with agents for specialization
The presentation-curator agent shows the pattern:
Scope and Priority
When multiple skills share the same name:Orchestration Pattern
Skills fit into the Command → Agent → Skill architecture: Example from repository:- Command:
/weather-orchestratorasks user for C/F - Agent:
weather-agentfetches temperature using preloadedweather-fetcherskill - Skill:
weather-svg-creatorcreates SVG card with data from agent
Orchestration Workflow
See the complete pattern with diagrams and code
Cross-Links
Commands
Invoke skills from commands
Subagents
Preload skills into agents
Settings
Configure skill permissions
Skills Best Practice
Complete reference and examples
