Skills — recipes your assistant loads on demand
A folder of markdown that teaches your CLI a procedure. Auto-triggered by description, model-loaded as needed.
A skill is a folder of markdown (and optional helper scripts) that teaches your coding CLI a procedure — how to do something. The assistant reads the skill's description on every turn; when your request matches, it pulls the full instructions into context and follows them. Skills are the answer to "I keep explaining the same workflow over and over."
The mental model
- A skill lives in a folder:
SKILL.md+ optional scripts. - The frontmatter has a
description:— one sentence the model reads on every turn. - When your request matches that sentence, the assistant loads the body and follows the procedure.
- Skills compose: one can call another. Many ship with helper scripts the assistant runs.
Anatomy of a SKILL.md
---
name: git-prune
description: Prune merged git worktrees and branches, clean
remote tracking refs, and pull latest main.
---
# Git Prune
When the user asks to clean up worktrees or branches:
1. Run `git worktree list` and identify merged branches.
2. For each merged worktree: `git worktree remove <path>`.
3. `git fetch --prune` to drop deleted remote refs.
4. `git checkout main && git pull --ff-only`.
Never delete unmerged work without confirming.
Skills people actually keep
git-prune
triggers when you say "clean up merged worktrees"Prunes merged git worktrees and branches, cleans remote tracking refs, pulls latest main.
ci-fix
triggers when you paste a failing GitHub Actions URLFetches the logs, finds the root cause, applies the fix, pushes.
deliver
triggers when you type /deliver <topic>Routes the topic to one of three shipping patterns and runs the full PR loop.
issue-to-pr
triggers when you say "implement issue #123"Reads the issue, plans a branch, writes the code, opens the PR.
postgres-patterns
triggers when you write a SQL migration or tune a queryLoads schema/index/security best practices into context exactly when SQL appears.
How skills relate to the other primitives
| Primitive | Shape | How it triggers |
|---|---|---|
| Slash command | Single action you fire by name | You type /name |
| Agent | A persona / sub-assistant | You switch to it, or the main agent delegates |
| Skill | A procedure / recipe / playbook | Auto — when your request matches the description |
| MCP server | A set of tools from the outside world | The model calls a tool when it needs the data/action |
When to write your own
- You've explained the same procedure 3+ times.
- The right steps depend on a context you keep forgetting to mention (e.g. "we use SQLAlchemy, not Django ORM").
- The task has a checklist of preconditions or guardrails you want enforced every time.
- You want a workflow available across every session, every repo, with no copy-paste.
CLAUDE.md or a memory file. Skills earn their slot in the description shelf
by being load-bearing across many sessions.
Where do skills live?
~/.claude/skills/<name>/SKILL.md and follow
you across projects. Project-scoped skills live in .claude/skills/
inside the repo, so the whole team gets them. Plugin skills come bundled with a Claude Code plugin
(you'll see them prefixed, like design:design-system).
Doesn't loading a bunch of skills bloat the context?
Do skills exist outside Claude Code?
Can a skill run code?
scripts/ directory next to
SKILL.md). The assistant invokes them with normal tool approval — same
Allow/Deny prompt as any other command.