Vibe Coding Bootcamp start date · Feb 1, 2027Learn more
ILLITH
Blog

Claude Code skills: create and use a skill step by step

What is a Claude Code skill? The SKILL.md file, its fields, where to store it, when Claude loads it, and how it differs from commands, subagents, MCP, and plugins.

Antoine Vigneau
Antoine Vigneau
12 min read
Claude Code skills: create and use a skill step by step
Listen to article0:00 / 12 min

Claude Code skills are instruction folders that Claude loads when the task calls for it. You write once the procedure you repeatedly paste into the conversation, and Claude retrieves it on its own or on demand. This article explains what a skill is, how to write the SKILL.md file, where to store it, and how Claude decides to read it. Then, it distinguishes between skills, slash commands, sub-agents, MCP servers, and plugins.

What is a skill in Claude Code?

A skill is a folder containing a SKILL.md file: a header specifying when to use it, followed by instructions in Markdown. Claude Code keeps the name and description of each skill in memory and only loads the body when needed, either because Claude deems it relevant or because you type /skill-name.

The Claude Code documentation (retrieved on October 31, 2026) puts it this way: you create a SKILL.md file with instructions, and Claude adds it to its toolkit. It therefore recommends creating one whenever you find yourself repeatedly pasting the same checklist or multi-step procedure, or when a section of your CLAUDE.md file has become a procedure rather than a fact.

Anthropic introduced Agent Skills on October 16, 2025, in its official announcement: folders of instructions, scripts, and resources that Claude loads when needed. The format has become an open standard. According to the October 22, 2026 announcement, more than 70 agent platforms have integrated it since its release in December 2025. Consequently, a skill written for Claude Code is not locked into this tool.

How Claude decides to load a skill

Everything relies on what the platform documentation calls progressive disclosure. Indeed, Claude does not read all your skills with every message. It loads information in stages, as needed.

LevelWhen it is loadedWhat enters the context
1. MetadataAlways, at startupThe name and description, about 100 tokens per skill
2. InstructionsWhen the skill is triggeredThe body of SKILL.md, under 5,000 tokens according to the Agent Skills documentation
3. Resources and codeOn demandA supporting file when Claude reads it, or only the script output

The field that determines everything is the description. Claude compares it to your request to decide whether to trigger the skill. It must therefore state both what the skill does and when to use it. Furthermore, the Claude Code documentation notes that the skill list truncates the text of description and when_to_use at 1,536 characters: place the primary use case at the very beginning.

Anatomy of a Claude Code skill: a folder with SKILL.md (frontmatter and body), supporting files and scripts, and the three stages when each part is loaded
Anatomy of a skill and loading stages. Diagram based on official Claude Code and Claude platform documentation.

This mechanism has a practical consequence. A long skill costs almost nothing as long as it is not used, whereas a long CLAUDE.md file adds weight to every session. That is the underlying reason to move a procedure from CLAUDE.md into a skill.

The SKILL.md file and its frontmatter

A SKILL.md file has two parts. The YAML frontmatter sits between two lines of dashes and must begin at the very first line of the file. Otherwise, Claude Code treats the entire file, dashes included, as content. The Markdown body contains the instructions that Claude follows when the skill runs.

In Claude Code, all frontmatter fields are optional, and only description is recommended. Here are the ones listed in the documentation, grouped by usage:

  • name and description: the command name, which defaults to the folder name, and the phrase Claude matches against your request.
  • when_to_use, argument-hint, and arguments: additional trigger phrases, input hints, and named arguments.
  • disable-model-invocation and user-invocable: who is allowed to run the skill, you alone or Claude alone.
  • allowed-tools and disallowed-tools: tools pre-approved during the turn, or removed.
  • model and effort: the model and effort level used during this turn.
  • context, agent, and background: execution inside an isolated subagent.
  • paths: file patterns that restrict automatic triggering.
  • hooks and shell: hooks tied to the skill, and the shell used for command-line execution.
  • metadata, license, and compatibility: informational fields, accepted but without effect on behavior.

A field name must match the documentation table exactly, including hyphens. Indeed, Claude Code silently ignores any field it does not recognize. A typo in disable-model-invocation therefore produces no error message, and the skill simply remains invocable by Claude.

However, one point deserves attention if you want to reuse your skills outside Claude Code. The platform documentation requires a name of at most 64 characters, using lowercase letters, numbers, and hyphens, and a description of at most 1,024 characters. Writing within these limits therefore keeps the file portable.

Claude Code skills: a step-by-step SKILL.md example

If you are looking for a short Claude Code tutorial, the following step-by-step guide is enough for your first skill. It creates a personal skill, available across all your projects.

  1. Create the folder: mkdir -p ~/.claude/skills/relire-pr.
  2. Inside it, create a file named exactly SKILL.md with the content below.
  3. Launch claude in a project and ask a request matching the description, for example "can you review my changes?".
  4. Or invoke the skill directly by typing /relire-pr.
---
name: relire-pr
description: Reviews current changes before a commit and flags risks. Use when the user asks for a review, wants to check their diff, or is preparing a commit.
---

# Review before commit

1. Run git diff to read uncommitted changes.
2. Summarize the changes in at most three bullet points.
3. Flag separately: missing error handling, hardcoded values, tests to update.
4. If there are no changes, say so and stop.
5. For the detailed checklist, read reference.md.

This file follows the template from the documentation: a description stating what and when, followed by numbered instructions. The last line illustrates Level 3 from the table above. Thus, a reference.md file placed in the same folder is only read if Claude needs it. The documentation recommends keeping SKILL.md under 500 lines and offloading details into supporting files referenced in the body.

Two tips from the same documentation. First, write instructions that apply to the entire task ("run tests after every change") rather than a single action, because the skill content enters the conversation only once and Claude does not re-read the file on subsequent turns. Second, state what needs to be done rather than explaining why: every line stays in the context and costs tokens on every turn.

Where to store your Claude Code skills: project, user, plugin

The location determines which sessions load the skill. Here are the main ones, according to official documentation.

LocationPathWho loads it
Personal~/.claude/skills/<skill-name>/SKILL.mdAll your projects on this machine
Project.claude/skills/<skill-name>/SKILL.mdSessions in this repository; commit it so the team gets it
Plugin<plugin>/skills/<skill-name>/SKILL.mdEverywhere the plugin is enabled, as /plugin:skill
EnterpriseThe managed settings directoryAll users on machines where the organization deploys it

The documentation also describes skills nested in a subfolder, folders added with --add-dir, and skills synchronized from a claude.ai account. For repositories, one detail prevents surprises: Claude Code loads project skills from the folder where you launch it and its parent directories up to the repository root. On the other hand, skills in a deeper subfolder only load upon first reading or modifying a file in that subfolder.

A project committed with its .claude/skills/ folder gives everyone who clones it the same procedures. This is the simplest way to align a team on how to review, deploy, or name things.

Skills, slash commands, sub-agents, MCP, and plugins

These five concepts overlap, which explains most of the confusion. The table separates them by their role.

ConceptWhat it isWhere it runsChoose when
SkillAn instruction folder loaded on demandIn the current conversationYou repeat a procedure or convention
Slash commandAn action typed with /, built into Claude Code or provided by a skillIn the sessionYou want to trigger a specific action
Sub-agentA specialized assistant with its own context and toolsIn an isolated context windowA side task would generate too much noise
MCP serverA connection to an external tool or data sourceA process connected to the sessionClaude needs to read or take action in another system
PluginA package combining skills, sub-agents, hooks, and MCP serversDepends on its componentsYou are distributing or installing a bundle

Skill or slash command: Claude Code commands have been merged

Many people search for Claude Code commands thinking of two distinct mechanisms. The reference documentation now separates built-in commands, whose behavior lives inside the program, such as /help or /compact, from skills. Custom commands have merged into skills: a file .claude/commands/deploy.md and a skill .claude/skills/deploy/SKILL.md both create /deploy and work the same way. Legacy command files continue to work. Still, the documentation recommends a skill for any new work, because it accepts supporting files.

The difference therefore lies in how they are triggered. By default, both you and Claude can launch a skill. With disable-model-invocation: true, Claude will no longer run it on its own: reserve this for actions with side effects, such as deployments. Finally, with user-invocable: false, only Claude can load it, which is ideal for background knowledge that has no use as a standalone command.

Skill or sub-agent

A sub-agent works in its own context window, with its own system prompt and tools, then returns a summary. A skill runs in the main conversation. Thus, the sub-agents documentation recommends considering a skill when you want reusable prompts or workflows in the main context. However, the two can be combined: context: fork runs a skill inside a sub-agent, and a sub-agent's skills field preloads skills into its context.

Skill or MCP server

The Model Context Protocol is an open standard that connects Claude Code to tools, databases, and APIs, according to the Claude Code MCP documentation. An MCP server provides access. A skill provides a method. For example, a skill can easily explain how to use tools from an MCP server, and the allowed-tools field is used to pre-approve them during its execution.

Skill or plugin: the role of Claude Code plugins

Claude Code plugins are the distribution layer. According to the plugins documentation, a plugin is a directory of skills, agents, hooks, or MCP servers that Claude Code installs as a single package, with a manifest in .claude-plugin/plugin.json. Skills, sub-agents, hooks, and MCP servers also work independently, without a plugin. Switch to a plugin when you want to bundle several elements, share them with a team, or publish versions. To install one, type /plugin in a session and open the Discover tab.

An enabled plugin is part of all your sessions: the name and description of each skill it contains remain in the context on every turn, even when not in use. The full text only loads upon use. Therefore, installing twenty plugins to only use two does not come without a cost.

Claude Code skills: what to do when a skill does not trigger

The troubleshooting section of the documentation provides clear steps to follow.

  1. Check that the description contains words you would naturally say in your request.
  2. Ask Claude "What skills are available?" to confirm that the skill appears in the list.
  3. Rephrase your request so that it more closely matches the description.
  4. Invoke the skill directly with /skill-name.

If the YAML frontmatter is malformed, the skill loads without metadata. /skill-name still works, but Claude can no longer match your request against the description. Run claude --debug to see the parsing error, or claude plugin validate .claude/skills to find files whose frontmatter cannot be parsed.

Conversely, a skill that triggers too often calls for a more specific description, or the disable-model-invocation: true option. Finally, if Claude stops following a skill after a few exchanges, the documentation distinguishes three cases. First, a rule that must hold every single time belongs in a hook, not a skill. Second, a judgment guideline must target the entire task. And after conversation compaction, the skill must be reinvoked: Claude Code keeps only the first 5,000 tokens of each skill, within an overall limit of 25,000 tokens across all skills. Therefore, put the most important instructions at the top of the file.

Caution with third-party Claude Code skills

A skill can contain scripts, and Claude follows its instructions. Therefore, the Agent Skills documentation states plainly: only use skills you have written or obtained from trusted sources, and audit all provided files, scripts and resources included. A skill that fetches content from an external address requires special attention, as that content may carry malicious instructions. Treat installing a skill just like installing software.

Training on Claude Code and skills with ILLITH

Writing a skill is as much a framing skill as a technical one: you need to know how to describe a procedure well enough for an agent to follow it. This is one of the core practices of a project manager building with AI. ILLITH's AI Project Manager and Vibe Coding bootcamp curriculum includes Cursor and Claude Code to build, solidify, and deploy a project. It costs €4,990, and ILLITH is a Qualiopi-certified training organization. Details on available financial aid can be found on the funding page.

Moving forward, two articles complement this one. First, if Claude Code is not installed yet, start with installing Claude Code. Next, to move from a skill to an autonomously working agent, read creating an AI agent with Claude. Finally, keep the skills page of the Claude Code documentation open: Claude Code is evolving rapidly, and it is the authoritative source for field names and versions.

Frequently Asked Questions

What is a skill in Claude Code?

A skill is a folder containing a SKILL.md file, with YAML frontmatter and Markdown instructions. Claude Code only keeps the name and description in context. The body is loaded when the task matches, or when you invoke the skill with /skill-name. It can also include supporting files and scripts.

Where should you store a SKILL.md file in Claude Code?

For a personal skill available across all your projects, place it in ~/.claude/skills/skill-name/SKILL.md. For a repository-specific skill, use .claude/skills/skill-name/SKILL.md and commit it so your team gets it. A plugin can also provide skills, located under its skills/ directory and invoked as /plugin:skill.

What is the difference between a skill and a slash command?

Built-in commands like /help or /compact are hardcoded into Claude Code. Custom commands have been merged into skills: a .claude/commands/deploy.md file and a .claude/skills/deploy/SKILL.md skill both create /deploy. The skill adds supporting files and automatic loading by Claude when the description matches.

Should you choose a skill, a subagent, or a plugin?

A skill introduces a procedure into the current conversation. A subagent runs in its own context and returns a summary, which is helpful when the task generates a lot of noise. A plugin is a bundle grouping skills, subagents, hooks, and MCP servers to install or share them all at once. All three work together.

Why is my Claude Code skill not triggering?

First, verify that the description contains the words you use in your prompt, then ask Claude which skills are available. Try triggering the skill directly with /skill-name. If the YAML frontmatter is malformed, the skill loads without metadata: run claude --debug to inspect the parsing error.

Antoine Vigneau
Antoine Vigneau
ILLITH Teaching Team

Blog articles are written by the ILLITH teaching team.

Read next

Newsletter

Boost your No-Code and AI learning journey

Get weekly insights, tools, and pro tips straight from the ILLITH team.

One-click unsubscribe. No spam, guaranteed.

Video testimonial

Book a call to discuss your project

Book an appointment