Agent Skills & Subagents · lesson 1 of 4
Agent Skills
Packaged, reusable capabilities Claude loads on demand. Each skill is a directory with a SKILL.md (instructions + frontmatter) plus optional scripts and resources.
Skill anatomy
my-skill/
SKILL.md ← required: instructions + description frontmatter
scripts/ ← optional helper scripts
templates/ ← optional reference files
...
SKILL.md frontmatter:
---
name: pptx
description: Use whenever a .pptx file is involved — creating, reading, editing slide decks.
---
The description is critical: Claude reads it to decide when to invoke the skill. Treat it like a tool description — be specific about triggers AND non-triggers.
How skills are loaded
- On session start, Claude scans available skills (their names + descriptions).
- During the conversation, when relevance is detected, the skill body is loaded into context.
- Skills are lazy: only the description is in context until invoked. Cheap to have many.
Locations
~/.claude/skills/— user-global.<repo>/.claude/skills/— project-shared (committed).- Bundled in plugins.
Skills vs slash commands vs subagents
| Slash command | Skill | Subagent | |
|---|---|---|---|
| Invoked by | User typing /x | Model (auto-detected) | Model (delegating a task) |
| Context cost when idle | None | Just the description | None |
| Can include files/binaries | No | Yes | N/A (it's an agent) |
| Best for | Quick reusable prompt | Reusable capability (e.g., "make a PowerPoint") | Isolated focused task |
Writing a good skill
- Description is the prompt that gets Claude to call it. Be a teacher.
- Lead with concrete triggers ("Use when the user mentions a .pptx file").
- Include negative triggers ("Do NOT use for PDFs — see pdf skill").
- Keep
SKILL.mdbody short. Push details into referenced files Claude can read on demand. - For language-specific scripts, include them in
scripts/and reference exact relative paths.
Distribution
- Plugins (the
.pluginformat) can bundle multiple skills. - Enterprise can deploy skills via managed config.
CCA-F angle
Distinguish:
- Skill = capability bundle.
- Slash command = parameterized prompt template.
- MCP prompt = server-provided prompt template.
- Subagent = isolated agent.
These often confuse exam-takers. Memorize who invokes (user vs model vs server) and what gets included (just text vs files vs separate context).