Agent Skills
Packaged knowledge and workflows loaded only when relevant — progressive disclosure for AI agents.
What Skills Are
Skills are folders containing instructions, scripts, and resources that teach an agent how to perform a specialized task consistently. Introduced in October 2025, they extend agent capabilities beyond general reasoning. Claude can invoke skills automatically based on the description matching the conversation, or you can trigger them via slash commands.
Progressive Disclosure
The core mechanism behind skills. At session start, only the YAML frontmatter (name + description, ~100-200 tokens per skill) loads into the agent's context. The full SKILL.md body and any auxiliary scripts only load when the skill is selected for use. This keeps the working context clean and avoids the context pollution problem that affects MCP.
| Stage | What Loads | Token Cost |
|---|---|---|
| Session start | Only YAML frontmatter for every skill | ~100-200 per skill |
| Skill selection | Agent matches user intent against name + description fields | Zero additional |
| Skill activation | Full SKILL.md body + script references | Variable, only when used |
Skill File Structure
.claude/
skills/
git-pushing/
SKILL.md ← YAML + workflow instructions
scripts/
smart_commit.sh ← Auxiliary script the skill invokes---
name: git-pushing
description: Stage, commit, and push git changes with conventional commit messages. Activates when user says "push changes", "commit and push", "push to github", or similar git workflow requests.
---
# Git Push Workflow
## When to Use
Automatically activate when the user:
- Explicitly asks to push changes
- Mentions saving work to remote
- Completes a feature and wants to share it
## Workflow
**ALWAYS use the script** — do NOT use manual git commands:
```bash
bash skills/git-pushing/scripts/smart_commit.sh
```
The script handles staging, conventional commit message, Claude footer, and push -u.Skill selection is driven entirely by the YAML frontmatter. The body content does NOT influence whether Claude picks the skill. Adding trigger phrases inside ## When to Use is redundant — they only matter if duplicated in the description field.
Installing Skills from Marketplaces
Skills can be installed via the plugin marketplace system. Anthropic publishes official skill collections (anthropics/skills) including brand-guidelines, document creation, and example skills. Third-party marketplaces extend this with community skills.
# Add the official Anthropic skills marketplace
/plugin add marketplace anthropic/skills
# List installed skills
/plugins
# In a fresh Claude session
> which skills do you have?Skills with Auxiliary Scripts
Skills are not limited to static Markdown. They can include executable scripts in any language — Python, Bash, Node — that the agent runs as deterministic tools. This enables hybrid workflows: the skill provides procedural knowledge, scripts provide deterministic execution, and the agent orchestrates both.
- ▸Skill instructs agent to ALWAYS run a specific script
- ▸Script handles deterministic logic (git commands, file operations, API calls)
- ▸Script can itself call claude -p to get AI-generated content (commit message, summary)
- ▸Result: structured workflow with selective AI augmentation
Skill Resilience
Skills are not rigid bindings. If a referenced script path is wrong but the file still exists somewhere, the agent will search and find it. If a script execution fails, the agent falls back to its default reasoning to complete the task. Skills inject context and instructions — they do not replace the agent's general capability.
Skills vs MCP vs Subagents
| Primitive | Purpose | Context Cost |
|---|---|---|
| Skill | Procedural knowledge + scripts, loaded on demand | Low — frontmatter only until selected |
| MCP server | External tool/API access via standardized protocol | High — all tool definitions load upfront |
| Subagent | Specialized AI personality with isolated context | Zero in main context — runs in side chain |
Skills can run inside isolated subagent context by setting context: fork in the YAML. The agent field selects which subagent type handles execution (Explore, Plan). This combines skill packaging with subagent context isolation.