Modern Code Consulting

Claude Code

Claude Code Skills: How SKILL.md Works and Where

Claude Code skills explained: where SKILL.md files live, the frontmatter that matters, skills vs slash commands vs CLAUDE.md, and mistakes we avoid in builds.

By
Published

Last verified

Claude Code skills are folders with a SKILL.md file that teach Claude Code one repeatable job: how to write a kickoff doc from a proposal, or how to review a lead list. Claude loads the skill when a request matches its description, or you run it yourself with a slash command. We use them for most of the recurring work in our builds, and this post covers how they are laid out, how we write them, and where we have been burned.

What a Claude Code skill is

A skill is a directory. The only required piece is SKILL.md: YAML frontmatter between two --- lines (it has to be the first line of the file), then plain Markdown instructions. Next to it you can put reference files and scripts. A typical layout looks like this:

my-skill/
  SKILL.md        # overview and steps
  reference.md    # loaded only when needed
  examples.md
  scripts/
    helper.py     # executed, not read into context

The part that matters for cost is when things load. Claude sees each skill's name and description up front, and the body only comes in when the skill is used. A CLAUDE.md file is different: it is always in context. If a section of your CLAUDE.md has turned into a procedure ("when releasing, do these nine steps"), it belongs in a skill.

Where Claude Code skills live

A personal skill goes in ~/.claude/skills/<skill-name>/SKILL.md and follows you across projects. A project skill goes in .claude/skills/<skill-name>/SKILL.md inside the repo, so everyone who clones it gets the same behavior. Plugins can ship skills too, invoked as /plugin-name:skill-name, and managed settings can supply enterprise skills.

We put anything tied to a client build in the project folder and commit it. If the skill encodes how we work in general (our code review checklist, our handoff format) it lives in the personal folder. When two skills share a name, enterprise beats personal and personal beats project, so avoid reusing a name across levels unless you mean to override.

The frontmatter that does the work

Every field is optional, but description is the one to get right, because Claude uses it to decide whether to load the skill. These are the fields we touch most often:

FieldWhat we use it for
descriptionWhat the skill does and when to use it. Write the trigger, not a slogan.
disable-model-invocationSet to true so only a human can start it. For sending, deploying, spending.
allowed-toolsPre-approve the narrow commands the skill needs, like a single git read.
context: forkRun the skill in a subagent that does not see your conversation history.
pathsLimit automatic activation to files matching a glob.

A minimal working skill, adapted from the pattern in Anthropic's docs:

---
name: summarize-changes
description: Summarizes uncommitted changes and flags anything risky. Use when the user asks what changed.
allowed-tools: Bash(git diff *)
---

## Current changes
!`git diff HEAD`

Summarize the changes above in two or three bullets, then list any risks.

The ! followed by a backticked command runs the command and injects its output before Claude reads the skill. That is how a skill gets live data without Claude spending a turn fetching it.

Skills vs slash commands vs CLAUDE.md

Custom commands have been merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy, and old command files keep working. So the question is less "skill or command" and more "does this job need supporting files or extra frontmatter". If yes, use a skill directory.

Use thisWhen
CLAUDE.mdShort rules that apply to every task in the repo: conventions, commands, landmines.
SkillA procedure you repeat, long enough that you do not want it in context all the time.
Skill with context: forkA job that should run in its own subagent so it does not clutter the main session.

Skills we run in real builds

The clearest examples are on our verified lead list automation page. A Claude Code skill makes the fit calls on each row of a lead list, and Python scripts do everything that needs to be exact: dedupe, email lookups, verification. The split matters. The model is good at judgment (is this person a buyer?) and bad at arithmetic and API bookkeeping, so we give each job to the right tool.

The same pattern shows up in our Stripe deposit to kickoff run, where a skill writes the kickoff document from the accepted proposal after the webhook and CRM steps have already happened. If you want to see the pattern across more builds, the automations hub lists them all.

Mistakes we would avoid

Vague descriptions. "Helps with emails" matches everything and nothing. A description that names the trigger ("Use when the user asks for a reply summary") gets loaded when it should and left alone when it should not. The description plus when_to_use is truncated at 1,536 characters in the listing, so put the trigger first.

Letting a skill with side effects run automatically. Anything that sends a message, moves a deal or spends credits gets disable-model-invocation: true. We would rather type a slash command than find out Claude decided the skill matched.

One giant SKILL.md. The docs recommend staying under 500 lines. Past that, split reference material into its own files and point to them from the main file. Also keep in mind that a loaded skill stays in context for the rest of the session, so long skills have a real cost in a long session.

Skipping the scripts. If a step is deterministic, such as hashing a value, formatting a date or merging two files, write it as a script in the skill folder instead of describing it in prose. Scripts are executed, not read into context, and they do not drift between runs.

Volatile facts, as of November 5, 2026

Skills are one of the faster-moving parts of Claude Code. Per Anthropic's skills docs today: after auto-compaction, Claude Code re-attaches the most recent invocation of each skill, keeping the first 5,000 tokens of each within a combined 25,000-token budget. Nested skill prefixes in monorepos need v2.1.309 or later. The /skill-doctor command needs v2.1.252 or later. Edits under the skills folders apply without a restart, but a new top-level skills directory needs /reload-skills. Re-check the Claude Code skills documentation before you depend on any of these numbers.

What we would do

Start with one skill for the one task you repeat weekly, not a library. Write the description around the trigger, set disable-model-invocation if the task has any side effect, and move the exact steps into a script. Run it a few times, watch where Claude improvises, and tighten those lines. Add a second skill only after the first one runs without you correcting it.

If the skill is part of a larger workflow that touches your CRM, email tool or payment processor, that is where our Claude Code work usually starts: the skill handles judgment, scripts and workflow tools handle the rest, and a human approves the steps that cost money or reach a customer.

Frequently asked questions

What are Claude Code skills?
Claude Code skills are folders containing a SKILL.md file of instructions, plus optional reference files and scripts, that Claude loads when a request matches the skill description or when you type /skill-name. The body of a skill only enters context when it is used, which is the main difference from CLAUDE.md.
Where do Claude Code skills go?
Personal skills go in ~/.claude/skills/<skill-name>/SKILL.md and apply to all your projects. Project skills go in .claude/skills/<skill-name>/SKILL.md inside the repo so the team shares them. Plugins and managed enterprise settings can also supply skills. Check the Claude Code skills docs for the current list of locations.
What is the difference between a skill and a slash command?
Custom slash commands have been merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy, and existing command files keep working. A skill adds a directory for supporting files and extra frontmatter options.
Can I stop Claude from running a skill on its own?
Yes. Set disable-model-invocation: true in the frontmatter and the skill only runs when you type its slash command. That is the setting we use for anything with side effects, such as sending, deploying or spending credits.
How long should a SKILL.md be?
The docs recommend keeping SKILL.md under 500 lines and moving detail into separate reference files that load only when needed. Keep the description short too, because the description plus when_to_use text is truncated in the skill listing.

Want this built for your business?

Book a free 15-minute call. Tell us what's eating your team's hours and we'll tell you what we'd automate first, how we'd build it and what it would cost.

Book a free automation audit