How Claude Code finds and reads skills

Where Claude Code looks for SKILL.md files, the frontmatter it reads, and how the indexed skills do on the rules built from its docs.

Where Claude Code looks for skills

From the Claude Code docs: Extend Claude with skills, as of 2026-11-26. See what changed in these docs.

FolderLoads in
~/.claude/skills/<skill-name>/SKILL.md

Personal: all your projects on this machine

.claude/skills/<skill-name>/SKILL.md

Project: sessions in this repository

<subdir>/.claude/skills/<skill-name>/SKILL.md

Nested: sessions that work on files in that folder

<plugin>/skills/<skill-name>/SKILL.md

Plugin: wherever the plugin is enabled

Monorepos. Claude Code reads .claude/skills/ in the folder where you start it and in every parent up to the repository root. Skills in folders below load the first time Claude reads or edits a file there.

What Claude Code reads, and when

Skills load in three steps, so a skill costs little until it runs. From the Claude Code docs: Extend Claude with skills, as of 2026-11-26; token counts are medians across the index.

1 · listing

name and description

Claude Code keeps these in context for every installed skill, so it can tell which one fits the task.

~68 tokens per skill

2 · SKILL.md body

the instructions

Loaded only when the skill is picked, or called by name.

~1,651 tokens

3 · bundled files

references/, scripts/, assets/

Read only when the body points to them, so a skill can carry long references at little cost.

55% of skills have them

Frontmatter fields Claude Code reads

FieldWhat it does
name

The command name. Defaults to the folder name.

description

Recommended. Claude uses it to decide when to apply the skill.

when_to_use

Trigger phrases appended to the description.

disable-model-invocation

Set to true and Claude never loads the skill on its own.

user-invocable

Set to false to hide it from the / menu, so only Claude can load it.

allowed-tools

Tools Claude can use without asking while the skill runs.

paths

Glob patterns for the files that activate the skill.

context

Set to fork to run the skill in a subagent.

model

Model for the rest of the turn.

hooks

Hooks registered when the skill is invoked.

10 of the 20 fields in the frontmatter reference. All of them are optional.

  • Call it by name. Type /skill-name at the prompt.
  • Keep it manual. Set disable-model-invocation: true and the skill runs only when you type its name.
  • Description length. The description and when_to_use together are cut at 1,536 characters in the skill listing.

Lines from the Claude Code docs the validator checks against

13 lines, quoted word for word and re-checked every week.

"Claude Code reads the frontmatter only when the opening --- is the file's first line. Otherwise it treats the whole file, --- markers included, as skill content."
Claude Code: frontmatter reference
"If the frontmatter YAML is malformed, Claude Code loads the skill body with empty metadata, so /skill-name still works but Claude can't match against your description."
Claude Code: skill not triggering
"Every skill needs a SKILL.md file with two parts: YAML frontmatter between --- markers that tells Claude when to use the skill, and markdown content with the instructions Claude follows when the skill runs."
Claude Code: create your first skill
"Claude Code re-attaches the most recent invocation of each skill after the summary, keeping the first 5,000 tokens of each."
Claude Code: skill content lifecycle
"The !<command> syntax runs shell commands before the skill content is sent to Claude. The command output replaces the placeholder, so Claude receives actual data, not the command itself."
Claude Code: inject dynamic context
"A skill can grant itself broad tool access, so review the allowed-tools of skills checked into a repository before you run Claude Code there."
Claude Code: pre-approve tools for a skill
"If you include any field the spec doesn't allow, packaging or upload fails with a hard error instead of ignoring the field"
Claude Code: using skill frontmatter outside Claude Code
"Put the key use case first: the combined description and when_to_use text is truncated at 1,536 characters in the skill listing to reduce context usage."
Claude Code: frontmatter reference
"Skills support string substitution for dynamic values in the skill content:"
Claude Code: available string substitutions
"Use this for workflows with side effects or that you want to control timing, like /commit, /deploy, or /send-slack-message. You don't want Claude deciding to deploy because your code looks ready."
Claude Code: control who invokes a skill
"bypassPermissions mode disables permission prompts and safety checks so tool calls execute immediately … Isolated containers and VMs only"
Claude Code: permission modes
"Hooks that Claude Code registers when the skill is invoked and keeps running for the rest of the session."
Claude Code: frontmatter reference
"Frontmatter hooks in a project skill follow the same … so they can run under -p in a folder you haven't trusted."
Claude Code: hooks in skills and agents

How the indexed skills do on Claude Code's rules

2,767 of 4,462 scored skills pass all 13 rules based on the Claude Code docs.

No skill fails the other 2: Body has instructions, Description and when_to_use fit in 1,536 characters.

Most installed skills, with the Claude Code command

Browse all 4,462 skills
npx skills add <owner/repo> --skill <name> -a claude-code

The skills CLI copies a skill into .claude/skills/, or ~/.claude/skills/ with -g. Agent ids and paths come from the skills CLI docs.