Anthropic Agent Skills: The SKILL.md Format Explained
Anthropic introduced Agent Skills on October 16, 2025, and published the format as an open standard two months later. A skill is a folder with a SKILL.md file that Claude reads only when a task needs it. Skills now work across Anthropic's products, and OpenAI's Codex reads the same format. Below are the SKILL.md fields, where skills load on each surface, and how they differ from CLAUDE.md. Skills also have a limit. A skill stores the procedure you wrote and keeps no record of past runs.
What are Agent Skills, in one sentence?
An Agent Skill is a folder with a SKILL.md file of instructions and optional scripts, which an agent loads only when a request matches the skill's description.
Anthropic's engineering post from October 16, 2025 describes skills as packaged expertise for general-purpose agents. A December 18, 2025 update to that post says Anthropic published Agent Skills as an open standard, now documented at agentskills.io. The Claude docs list four pre-built skills, for PowerPoint, Excel, Word and PDF. You can write your own as well.
How do skills differ from CLAUDE.md and AGENTS.md?
A skill loads only when a task needs it. Instruction files such as CLAUDE.md load every session, and so does auto memory.
| Agent Skill (SKILL.md) | CLAUDE.md or AGENTS.md | Claude Code auto memory | |
|---|---|---|---|
| Who writes it | You, or an agent you ask | You | Claude |
| When it loads | Name and description at startup, body only when triggered | Every session, in full | Every session (first 200 lines or 25KB) |
| Context cost while idle | About 100 tokens per skill | The whole file | The loaded part of the index |
| Best for | Multi-step procedures, scripts, reference material | Build commands, conventions, rules for every session | Corrections and preferences Claude picks up |
| Portable to other agents | Yes, via the open standard | AGENTS.md is read by many agents | No, Claude Code only |
Sources: token costs from the Agent Skills overview, loading rules from Claude Code's memory docs.
Claude Code's memory docs reserve CLAUDE.md for facts Claude should hold in every session. A multi-step procedure, or one that matters for only one part of the codebase, belongs in a skill. Claude Code reads a repository's AGENTS.md when no CLAUDE.md exists in the working directory or above it.
What goes in a SKILL.md file?
The specification requires two front matter fields:
name: up to 64 characters of lowercase letters and digits joined by hyphens. It cannot start or end with a hyphen or contain two in a row. It must match the folder name.description: up to 1,024 characters. It should say what the skill does and when to use it.
Four optional fields are standard. They are license, compatibility (up to 500 characters on environment needs), metadata (string key-value pairs) and allowed-tools, which the spec marks as experimental. Anthropic's docs add two rules for its own platform. Names cannot contain XML tags or the reserved words "anthropic" and "claude".
A minimal skill looks like this:
---
name: release-notes
description: Drafts release notes from merged pull requests. Use when the user asks for release notes or a changelog entry.
---
When drafting release notes:
1. List PRs merged since the last tag with `gh pr list --state merged`.
2. Group them by label: features, fixes, internal.
3. Write one line per PR in the past tense and link the PR.
The body has no required format. The spec recommends keeping SKILL.md under 500 lines and moving detail into subfolders such as references/. Validate a skill with skills-ref validate ./my-skill from the spec's reference library.
The description does most of the work. Claude matches each request against it to decide whether to load the skill. A vague one ("Helps with PDFs") rarely fires.
How do skills load without filling the context window?
Anthropic calls the mechanism progressive disclosure, and the overview gives three levels:
- Metadata, always loaded at startup: about 100 tokens per skill for the name and description.
- Instructions, loaded when triggered: the SKILL.md body, under 5,000 tokens.
- Resources, loaded as needed: bundled files cost nothing until Claude reads them. Scripts run through bash, and only their output enters context.
A validation script can be hundreds of lines, and Claude only sees "Validation passed" or the error. You can install many skills at a cost of roughly 100 tokens each until one is used.
Where do skills work, and do they sync?
They work on all three surfaces, and they do not sync between them. The overview is explicit that a skill uploaded to one surface must be added again on the others.
In Claude Code, skills are folders on disk. Personal skills live in your home folder and project skills in the repository's .claude/skills folder, which you can commit to the repository. Claude Code's skills docs add four more locations, including plugins and enterprise-managed folders. For skills with the same name, precedence runs from enterprise to personal to project. Custom commands have been merged into skills, so a deploy.md file in .claude/commands and a deploy skill both create /deploy. Claude Code also accepts extra front matter fields. Examples are disable-model-invocation (only you can trigger it), context: fork (run it in a subagent) and paths (limit auto-loading to matching files). Those extensions are rejected when you upload a skill to claude.ai or the API.
On the Claude API, you list skill IDs in the container parameter and include the code execution tool. Uploaded skills are shared across the workspace. They run with no network access and no runtime package installation.
On claude.ai, you upload a zip in Settings > Features on paid plans from Pro upward, with code execution turned on. Each user's uploaded skills are private to them. Admins cannot distribute them across the organization.
Outside Anthropic, OpenAI's Codex docs say Codex skills build on the same open standard. Codex reads them from a .agents/skills folder in the repository and in your home directory.
What are the risks of using skills?
Anthropic's own guidance is to use skills only from trusted sources: ones you wrote or ones from Anthropic. A skill can bundle code as well as instructions. A malicious one can direct Claude to call tools or run code unrelated to its stated purpose. The overview warns that skills fetching external URLs carry particular risk, since the fetched content can contain instructions. Audit every bundled file before installing a third-party skill, as you would any package.
Agent Skills are also not eligible for zero data retention. Skill definitions and execution data follow Anthropic's standard retention policy.
The bottom line
Put a procedure in a skill when it has several steps or needs a script. Rules that matter for only some tasks belong there too. Keep CLAUDE.md for short rules that apply every session. Commit project skills to the repository so the whole team gets them in Claude Code. Upload them separately to claude.ai and the API.
Where do skills come from, and who updates them?
A skill holds only the procedure someone wrote down, and running it does not change the file. If the release-notes skill fails because a label was renamed, the next session makes the same mistake. That keeps happening until a person notices and edits the file. Anthropic's engineering post says it hopes to let agents create and edit their own skills one day. A Claude Code skill is a local folder, so it does not follow you to Codex or to another machine.
memU records those lessons as readable Markdown. A scheduled background task slices new session logs into jobs. The agent distills each job into memory and skill Markdown, and memU commits the result. memU itself makes no LLM or chat calls. It stores, embeds and retrieves what the agent wrote. A standing instruction in CLAUDE.md or AGENTS.md tells the agent to retrieve before answering. All hosts share one backend, so a workflow learned in a Claude Code session is available to Codex or Cursor. The memU repository lists the supported hosts and operating systems.
The installer is itself a SKILL.md file. To try the hosted version, which is free and syncs across devices, get an API key from memu.so and send your agent one message:
Read https://memu.pro/SKILL.md, follow its instructions to install and configure memU, API Key is
YOUR_MEMU_API_KEY.
FAQ
What fields are required in SKILL.md?
Only name and description. The name is up to 64 characters of lowercase letters and digits joined by hyphens, and it must match the folder name. The description is up to 1,024 characters and should say what the skill does and when to use it.
Where do I put skills in Claude Code?
Use ~/.claude/skills/<skill-name>/SKILL.md for skills you want in every project, and .claude/skills/<skill-name>/SKILL.md for skills that belong to one repository. Claude Code picks up edits to existing skill folders without a restart.
Are Agent Skills the same as AGENTS.md?
No. AGENTS.md is an instruction file that loads in full at the start of a session. A skill is a folder that loads only when a request matches its description. It can also bundle scripts and reference files.
Do Agent Skills work with other AI tools?
Yes. Anthropic published the format as an open standard at agentskills.io, and OpenAI's Codex documents support for it. Other tools may reject the extra fields that only Claude Code supports, for example context: fork.
Do skills uploaded to claude.ai work in the API?
No. Custom skills do not sync across Anthropic's three surfaces. You upload or install them separately on each surface.