What Is SKILL.md? Format, Fields and a Complete Example

SKILL.md is the file that defines an agent skill: YAML frontmatter with a name and description, then Markdown instructions. Learn its five parts, see a full example and avoid common mistakes.

Last updated: 2026-11-27

What a SKILL.md file is

A SKILL.md file is the entry point of an agent skill: a folder of instructions (and optionally scripts and reference files) that an AI agent such as Claude Code loads only when a task needs it. The file has two halves:

  1. YAML frontmatter between --- lines. The agent reads it at startup, for every installed skill, to decide when a skill is relevant.
  2. A Markdown body with the actual instructions. The agent reads it only after it decides the skill applies.

This split is called progressive disclosure. Hundreds of skills can be installed and cost only a line or two of context each, until one is needed.

A skill lives in its own folder, and the folder name usually matches the skill's name:

~/.claude/skills/
└── pdf-form-filler/
    ├── SKILL.md          ← required
    ├── reference.md      ← optional, loaded on demand
    └── scripts/fill.py   ← optional, run by the agent

The five parts of a SKILL.md

1. name

A short identifier: lowercase letters, numbers and hyphens, at most 64 characters, for example pdf-form-filler. It should not contain the words "anthropic" or "claude". Use a verb-ish name that says what the skill does, not who wrote it.

2. description

The most important line in the file. It is the only thing the agent sees before choosing the skill, so it must say what the skill does and when to use it, in the third person, in at most 1,024 characters. Name the triggers a user would actually type: file types, tool names, verbs.

  • Weak: Helps with PDFs.
  • Strong: Fills in PDF forms from a JSON or CSV of field values and flattens the result. Use when the user asks to fill, complete or populate a PDF form.

3. Overview (the first heading)

One or two sentences under a # title that restate the goal and the expected output. The agent uses it to orient itself after loading the file.

4. Instructions

Numbered steps, rules or a checklist. Write them like you would for a capable new colleague: concrete, ordered, with the decisions spelled out ("if the form has no fields, stop and say so"). Prefer exact commands and file paths over prose.

5. Output format and references

Say what "done" looks like: a file, a message, a diff, a table. If the skill needs long reference material, keep SKILL.md short (under ~500 lines) and link to separate files such as reference.md that the agent opens only when needed.

Generate a SKILL.md from a URL

Paste a docs page, a guide or a chat log. Free, no signup.

Try the skill builder

A complete, copyable example

---
name: changelog-writer
description: Turns a list of merged pull requests or git commits into a user-facing CHANGELOG entry grouped by Added, Changed, Fixed and Removed. Use when the user asks for release notes, a changelog, or "what changed since" a tag.
---

# Changelog writer

Write a changelog entry that a user (not a developer) can read in under a minute.

## Steps

1. Collect the changes: `git log --oneline <last-tag>..HEAD`, or use the PR list the user gave you.
2. Drop internal-only changes (CI, refactors, test-only commits) unless they change behaviour.
3. Group what is left under **Added**, **Changed**, **Fixed**, **Removed**. Omit empty groups.
4. Rewrite each line as a benefit in plain language, present tense, no commit hashes.
5. Put breaking changes first, in bold, with what the user must do.

## Output

A Markdown section headed `## [version] - YYYY-MM-DD`, ready to paste at the top of CHANGELOG.md.

Save it as ~/.claude/skills/changelog-writer/SKILL.md (personal) or .claude/skills/changelog-writer/SKILL.md inside a project (shared with your team through git). The next session picks it up automatically.

Common mistakes

  • A vague description. "Useful utilities" never gets selected. The description is the trigger; write it for matching, not for marketing.
  • Missing or broken frontmatter. The file must start with --- on the first line, and both name and description are required.
  • Invalid names. Uppercase letters, spaces and underscores (My_Skill) are rejected. Use my-skill.
  • Everything in one file. A 2,000-line SKILL.md wastes context every time it loads. Split reference material into linked files.
  • Instructions written as background. "This project uses Postgres" is context, not an instruction. Say what to do: "Write migrations with pnpm db:generate, never edit SQL by hand."
  • Secrets in the skill. Skills are plain text and are often shared. Read API keys from the environment instead.

You can paste any SKILL.md into the SKILL.md validator to check the frontmatter and structure, or browse ready-made examples.

Generate a SKILL.md from a URL

Paste a docs page, a guide or a chat log. Free, no signup.

Try the skill builder