Engineering Guide

What Are Claude Code Skills? Guide & How to Build One

A Claude Code Skill is a folder containing a SKILL.md file that Claude loads on demand — Anthropic calls Agent Skills "organized folders of instructions, scripts, and resources that agents can discover and load dynamically to perform better at specific tasks." You write the instructions once; Claude reads the one-line description at startup, then loads the full body only when your request matches. This guide covers what a Skill actually is, how it differs from MCP servers and slash commands (they are now the same mechanism), a minimal SKILL.md you can copy, where each Skill lives on disk, and which repos are worth trusting — as of July 2026, with every specific claim tied to an Anthropic doc or the real GitHub repo.

Claude Code Skills explained — a folder with a SKILL.md that Claude loads on demand

What a Claude Code Skill is

A Skill is a folder with a SKILL.md file that Claude Code loads on demand to do a specific task better. Anthropic's canonical definition: Agent Skills are "organized folders of instructions, scripts, and resources that agents can discover and load dynamically to perform better at specific tasks." In Claude Code's own words, "you create a SKILL.md file with instructions and Claude adds it to its toolkit. Claude uses skills when relevant, or you invoke one directly with /skill-name."

The mental model that makes everything else click: Claude reads only the Skill's short description at startup (roughly 100 tokens), and pulls in the full instructions only when your request matches. It is a reference book on the shelf, not a paragraph stapled to every prompt. That on-demand loading — Anthropic calls it progressive disclosure — is what lets you install dozens of Skills without bloating context. If you are new to the CLI itself, start with our how to use Claude Code guide, then come back here.

Anatomy of a SKILL.md

Every Skill requires one file — SKILL.md — with a YAML frontmatter block between --- markers, followed by markdown instructions. Two surfaces define the rules slightly differently, and it matters which one you are targeting:

Beyond the single file, a Skill can bundle three optional subdirectories, each with a defined role:

PathRoleLoaded
SKILL.mdRequired entrypoint — frontmatter + instructionsBody on trigger
scripts/Executable code Claude runs via bashRun, not read into context
references/Documentation loaded as neededOn demand
assets/Templates and supporting filesOn demand
How this is sourced. Field constraints and the directory layout are from Anthropic's Agent Skills overview (platform spec) and the Claude Code Skills docs (verified July 2026). Cite the right surface for each claim: the API spec is stricter than Claude Code.

Skill vs MCP vs slash command

Skills and slash commands are now the same mechanism; MCP is a different, complementary thing. This is the comparison people actually search for, so here it is straight:

SkillMCP serverSlash command
What it isFolder of instructions + optional scriptsRunning server exposing external tools/dataA Skill (merged in)
Primary jobPackage procedural knowledge / workflowsIntegrate external tools & softwareInvoke a Skill by name
Lives as.claude/skills/<name>/SKILL.mdA configured server process.claude/commands/<name>.md or a Skill
Invoked byAuto-match or /nameClaude calls its tools when relevant/name
Context cost~100 tokens until triggeredTool schemas loaded up frontSame as a Skill
Runs code?Yes — bundled scripts via bashYes — inside the serverVia the underlying Skill

Two clarifications the fact sheet is explicit about:

Build a minimal Skill

The smallest working Skill is one folder and one file. Create the directory, drop in a SKILL.md, and Claude Code picks it up — no install step, no restart if the .claude/skills/ folder already existed at session start.

# project-scoped: this repo only
mkdir -p .claude/skills/summarize-changes
$EDITOR .claude/skills/summarize-changes/SKILL.md

A minimal SKILL.md — frontmatter plus instructions. In Claude Code you could drop name entirely (it defaults to the folder summarize-changes), but including it and a sharp description is good practice because the description is what Claude matches on:

---
name: summarize-changes
description: Summarize the current git diff into a short, reviewable
  changelog grouped by area. Use when the user asks to summarize changes,
  write a changelog, or explain what changed before a commit.
---

# Summarize changes

Run `git diff --staged` (fall back to `git diff` if nothing is staged)
and produce:

1. A one-line summary of the overall change.
2. Bullets grouped by area (api, ui, tests, docs), most impactful first.
3. A short "risk" note for anything that touches auth, migrations, or
   money paths.

Keep it under 200 words. Do not invent changes that are not in the diff.

That is a complete, valid Skill. Now typing /summarize-changes invokes it, and Claude will also reach for it on its own when you ask something like "write me a changelog for what I just staged." To grow it: add a references/changelog-style.md for house conventions, or a scripts/diffstat.sh Claude can run via bash without reading the script into context. Anthropic recommends keeping SKILL.md under 500 lines and pushing detailed reference material into separate files.

Run your Skill-driven agents on any model, one key

Skills are model-agnostic instructions — the same SKILL.md can drive Claude, GLM, or an open model. DataLLM Lab routes 300+ models behind one OpenAI-compatible key with automatic failover, so your agent loop never dies on one provider's outage.

Where Skills live and how to install

A Skill's location decides its scope; installing one is usually just putting the folder in the right place. The four storage locations in Claude Code:

ScopePathApplies to
EnterpriseManaged settingsAll users in the org
Personal~/.claude/skills/<name>/SKILL.mdAll your projects
Project.claude/skills/<name>/SKILL.mdThis project only
Plugin<plugin>/skills/<name>/SKILL.mdWhere the plugin is enabled

When two Skills share a name across levels, precedence is enterprise > personal > project, and any of those overrides a bundled Skill of the same name. Plugin Skills use a plugin-name:skill-name namespace, so they can never collide.

A few operational details worth knowing:

Cross-surface caveat. Skills work in the Claude API (pre-built + custom via skill_id), Claude Code (custom, filesystem-based only — no API upload), and claude.ai (pre-built + custom uploaded as zip via Settings > Features). Custom Skills do not sync across surfaces — a Skill on your disk is not automatically available on claude.ai.

Invoking, arguments & control

You invoke a Skill by typing / plus its directory name, or Claude auto-loads it when your request matches the description. Note the subtlety: the command name comes from the Skill's directory name — the frontmatter name is only the display label (the one exception is a plugin-root SKILL.md).

Skills accept arguments, which is what makes them feel like commands:

Two more Claude-Code-specific levers control who can invoke a Skill (by default, both you and Claude can):

There is also dynamic context injection: a !`<command>` line runs a shell command before the Skill content reaches Claude, and its output replaces the placeholder (multi-line uses a fenced ```! block). Important framing — this is preprocessing done by Claude Code, not something Claude decides to execute. These invocation-control and context-injection features are Claude Code's extensions to the open standard, described next.

Progressive disclosure & context cost

Skills are cheap on context because they load in three levels. This is the design that lets you keep many Skills installed without paying for all of them on every turn:

Level 1 · Metadataname + description~100 tokens · always loaded Level 2 · InstructionsSKILL.md body<5k tokens · on trigger Level 3+ · Resourcesscripts / refs / assetsunlimited · as needed Startup pays only Level 1. A matching request pulls Level 2. Scripts in Level 3 run via bash — their contents never enter context. Net effectDozens of Skills installed ≈ a few thousand startup tokens total
Three-level progressive disclosure for Agent Skills. Source: Anthropic Agent Skills overview, July 2026.

Concretely: Level 1 metadata (name + description) is always loaded at startup at ~100 tokens per Skill; Level 2 (the SKILL.md body) loads only when the Skill triggers and stays under ~5k tokens; Level 3+ resources load as needed and are effectively unlimited because scripts run via bash without loading their contents into context. One lifecycle detail: when a Skill is invoked, the rendered SKILL.md enters the conversation as a single message and stays for the rest of the session — Claude Code does not re-read the file on later turns, which is another reason to keep it tight.

Claude Code Skills follow the Agent Skills open standard (agentskills.io), which works across multiple AI tools; Claude Code extends it with the invocation control, subagent execution (context: fork), and dynamic context injection covered above. It also ships bundled Skills in every session unless disabled with disableBundledSkills — including /code-review, /batch, /debug, /loop, and /claude-api. These are prompt-based (they instruct Claude rather than executing fixed logic) and invoked like any other Skill.

Where to find good Skills

Start with Anthropic's own repos, then vet third-party ones like software. As of July 2026, dozens of Skill repos exist; these three are load-bearing and verifiable:

To build and evaluate your own, the official skill-creator plugin (from claude-plugins-official) automates the process — install with /plugin install skill-creator@claude-plugins-official, run /reload-plugins, and it runs A/B baseline comparisons (with-Skill vs disabled) recording pass rate, tokens, and duration.

Security first. Anthropic's explicit guidance: use Skills only from trusted sources (self-created or from Anthropic). A malicious Skill can direct Claude to invoke tools or execute code in ways that don't match its stated purpose — treat installing a Skill like installing software. Read the SKILL.md and any scripts/ before you enable it.

FAQ

What is a Claude Code Skill?

A folder with a SKILL.md — YAML frontmatter plus markdown instructions — that Claude Code loads on demand to do a task better. Anthropic defines Agent Skills as organized folders of instructions, scripts and resources agents discover and load dynamically. Claude reads the short description at startup and the full body only when your request matches, or when you type /skill-name.

How is a Skill different from an MCP server?

Complementary, not competing. A Skill packages procedural knowledge (instructions + optional scripts run via bash); an MCP server integrates external tools and live data through a running process. Anthropic says Skills complement MCP by teaching agents workflows that involve those external tools. Encode a workflow with a Skill; connect a system with MCP.

Are slash commands the same as Skills now?

Yes. Custom commands have been merged into Skills. .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both create /deploy and behave the same. Old .claude/commands/ files keep working; if a Skill and command share a name, the Skill takes precedence.

How do I create a Claude Code Skill?

Make .claude/skills/<name>/SKILL.md with a --- frontmatter block and a description, then markdown instructions. In Claude Code all frontmatter is optional and only description is recommended; omit name and it defaults to the directory name. Add optional scripts/, references/, and assets/ subfolders.

Where do Skills live on disk?

Personal: ~/.claude/skills/<name>/SKILL.md. Project: .claude/skills/<name>/SKILL.md. Plugin Skills ship inside a plugin's skills/; enterprise Skills are org-managed. On name collisions, precedence is enterprise > personal > project, overriding any bundled Skill of the same name.

How do I invoke a Skill?

Type / plus the Skill's directory name (e.g. /summarize-changes), or let Claude auto-load it when your request matches the description. The command name is the directory name, not the frontmatter name. Pass args after the command; read them inside via $ARGUMENTS.

Where can I find good Skills?

Official: github.com/anthropics/skills (examples + spec + template) and github.com/anthropics/launch-your-agent. Third-party: BuilderIO/skills (MIT, also a plugin marketplace). Treat installing any Skill like installing software — use only trusted sources.

Do Skills use a lot of context?

No — three-level progressive disclosure. Level 1 (name + description, ~100 tokens/Skill) always loads; Level 2 (the body, <5k tokens) loads on trigger; Level 3 resources load as needed, and scripts run via bash without their contents entering context.

Written by
Kevin Fan

Founder of DataLLM Lab, the unified LLM gateway. Kevin tests models the boring way — same prompts, real costs, unedited outputs — and writes up what the runs actually show.

One API for every model

One API, every model.

Get a single API key for Claude Opus 4.7, GPT-5.4, and 300+ more — with automatic price comparison and routing to the best model for every request.