How Claude Skills work
Skills are Anthropic's answer to "how do I give Claude a new capability without bloating every prompt with instructions for it?". Read this once and the rest of the system makes sense.
On this page
- 1. What a skill actually is
- 2. Why skills exist (vs. system prompts)
- 3. Progressive disclosure
- 4. Frontmatter reference
- 5. How triggers work
- 6. allowed-tools and trust
- 7. Composing multiple skills
- 8. Skills vs. slash commands vs. MCP vs. memory
- 9. Skill lifecycle in a session
- 10. Best-practice patterns
1. What a skill actually is
A skill is a folder containing one required file: SKILL.md (YAML frontmatter + markdown body), plus optional bundled assets — scripts, templates, reference docs, schemas.
There's no compilation step, no runtime, no framework. A skill is a piece of documentation Claude reads, plus files it can open or execute while the skill is active.
pdf/
├── SKILL.md
├── scripts/
│ ├── extract_text.py
│ ├── fill_form.py
│ └── merge.py
└── reference/
├── form_fields.md
└── pypdf_cheatsheet.md
2. Why skills exist (vs. system prompts)
You could teach Claude how to fill PDF forms by jamming five pages of pypdf docs into the system prompt. That has three problems:
- Bloat: every prompt pays the token cost, even ones unrelated to PDFs.
- Distraction: a giant system prompt makes Claude worse at unrelated tasks.
- Lock-in: the capability is welded to one prompt — not portable.
Skills solve all three. They're portable, lazy (only loaded when relevant), and composable.
3. Progressive disclosure
Claude doesn't see your skill's full body unless it decides to use it.
| Stage | What Claude sees | When |
|---|---|---|
| Discovery | Only frontmatter — name + description | Always, for every installed skill |
| Activation | Full SKILL.md body | When the user's prompt matches the description |
| Drill-down | Bundled files (scripts, reference, templates) | When the skill's body references them |
This is why you can install 50 skills without context bloat — Claude only spends tokens on descriptions until one triggers.
4. Frontmatter reference
--- name: string # required, kebab-case, matches folder name description: string # required, ~1 sentence, drives triggering allowed-tools: list # optional, default: inherit session tools - Read - Write - Bash model: string # optional, override model for this skill version: string # optional, semver author: string # optional license: string # optional, SPDX id ---
name— must match the folder name. Lowercase kebab-case.description— written for the model. Lead with when, then what. Concrete trigger phrases help.allowed-tools— cap the tools the skill can use. Useful for safety.model— pin a model. Rare. Mostly for cost-sensitive workflows.
5. How triggers work
There's no regex, no keyword list. When you send a message, Claude reads the descriptions of every installed skill and picks the ones that look relevant.
This is why the description matters so much. Bad descriptions never trigger. Good ones trigger reliably without false positives.
A bad description
description: Helps with files.
A good description
description: Extract text and form-field values from PDF documents, fill
interactive PDF forms from JSON or CSV data, merge or split PDFs, and generate
new PDFs from markdown. Triggers on phrases like "fill this form", "extract
from PDF", "merge PDFs", or when a .pdf file is attached.
6. allowed-tools and trust
Skills can scope down which tools they're allowed to call. A "summarize this doc" skill has no business calling Bash.
If allowed-tools is omitted, the skill inherits session tools. If listed, those are the maximum — the skill can never exceed them even if the session is more permissive.
For high-trust skills, pair allowed-tools with explicit per-script permission rules in settings.json. See Hooks for blocking dangerous operations.
7. Composing multiple skills
Skills layer. A single prompt can activate several:
- "Generate a financial-projection deck from this Excel file" → activates
xlsx,data-viz,pptx, andweb-design. - "Push the auth page design into Figma" → activates
figma-useandfigma-generate-design. - "Review my branch for security issues" → activates
security-review, plusgithub-pr-opsif there's an open PR.
Skills don't talk to each other — they each contribute instructions, and Claude orchestrates.
8. Skills vs. slash commands vs. MCP vs. memory
| Feature | Skills | Slash commands | MCP servers | Memory |
|---|---|---|---|---|
| What is it? | A folder of instructions Claude loads on demand | A user-typed shortcut to a prompt template | A long-running process exposing tools / resources | Persistent facts across sessions |
| Triggered by | Natural language matching the description | The user typing /name |
Claude calling one of its tools | Recalled when relevant |
| Lives where? | ~/.claude/skills/ |
~/.claude/commands/ |
External process, registered in mcp.json |
~/.claude/memory/ |
| Best for | Capabilities (write Excel, run review) | Workflows (standup template) | Integrations (Postgres, Slack, Linear) | User/project facts and preferences |
These layer. A skill can call MCP tools. A slash command can suggest a skill. See Commands and MCP for deeper dives.
9. Skill lifecycle in a session
- Session start: loader scans skills directories, parses frontmatter, registers (name, description) pairs.
- User sends a prompt: Claude sees prompt + all registered pairs.
- Selection: Claude decides relevant skills and loads their full SKILL.md bodies.
- Execution: skill body becomes part of working memory. It may call tools, read bundled files, or write outputs.
- Hand-off: irrelevant skills "fade". New skills can activate later in the same session.
10. Best-practice patterns
- One job per skill. Split "do-everything-with-pdf" into fill / merge / extract.
- Front-load the description. Trigger phrases in the first sentence.
- Lazy-load heavy reference. Don't dump 10K tokens of API docs into SKILL.md.
- Prefer scripts to inline code for anything deterministic.
- Test the trigger. Ask Claude variations of expected prompts; confirm it activates.
- Version when you ship. Pin and bump on breaking changes.