A SKILL.md file teaches an AI agent a new capability. It is a folder containing a SKILL.md file — YAML frontmatter followed by Markdown instructions — plus optional scripts/, references/, and assets/. Get the frontmatter wrong and many agents will never surface your skill at all, with no error message. Get it right and your skill loads reliably across Claude Code, OpenAI Codex, Cursor, and Gemini CLI.
STEP 1
Create the folder first, then match the name
Create a folder for the skill, then set the frontmatter name to exactly the folder name.
Rules that cause silent failures:
namemust be 1–64 characters: lowercase letters, numbers, and hyphens only.- It must not start or end with a hyphen, and must not contain consecutive hyphens.
- It must match the parent directory name exactly.
Example: a folder called pdf-table-extractor needs name: pdf-table-extractor. Rename the folder later and you must rename the field too, or the skill stops matching.
STEP 2
Write a description agents can trigger on
Agents load every installed skill's name and description at startup and use the description to decide when to activate the full skill. That makes the description the most important field in the file.
- Required, non-empty, 1–1,024 characters.
- Say what the skill does and when to use it, with specific keywords.
- Keep it tight: name + description sit in the agent's context for every session, so a bloated description costs standing context on every run.
Good description pattern: "Use when you need to [task] with [input/output]."
STEP 3
Add only the optional fields you need
license: a short license name or a reference to a bundled license file.compatibility: 1–500 characters if provided — intended product, system packages, network access.metadata: a map of string keys to string values for extra properties.allowed-tools: a space-separated list of pre-approved tools. This is experimental and support varies by agent, so do not rely on it alone. Never use a wildcard here.
STEP 4
Write the body for the agent, not for a human reader
After the closing --- of the frontmatter, write Markdown instructions the agent will follow when the skill activates: the task, the inputs it will receive, the steps in order, and what a good result looks like. Put long reference material in references/ and executable helpers in scripts/ instead of bloating the main file.
STEP 5
Check the file before you ship it
Paste the full file into the free checker and fix every error first:
Validate your SKILL.md free — skillmdvalidator.com
Errors are the official spec rules (missing name/description, unclosed frontmatter, folder-name mismatch, the character caps). Warnings are security heuristics worth a second look before you install or share a third-party skill.
EXAMPLE
A complete example you can copy
---
name: pdf-table-extractor
description: Use when you need to extract tables from a PDF into clean Markdown. Handles scanned pages, multi-page tables, and merged header cells.
---
# PDF Table Extractor
## When to use this skill
When the user asks to convert a PDF table into Markdown, CSV, or a spreadsheet.
## Steps
1. Identify the pages that contain tables.
2. Extract each table, preserving header rows.
3. Return Markdown tables, one per source table, in page order.
## Output format
Markdown tables with a header row. Do not invent values for empty cells.
ANTI-PATTERN
Bad example: the same skill, written to fail silently
---
name: PDF_Table_Extractor
description:
---
# PDF Table Extractor
Three failures in five lines: uppercase letters and underscores in name, an empty description, and a name that cannot match any valid folder name. This is exactly the kind of file that loads nowhere and explains nothing.
CHECKLIST
Checklist before you publish a skill
- Folder name and
namefield match exactly descriptionis non-empty, under 1,024 characters, and says when to use the skill- Frontmatter opens and closes with
--- - No
curl | bash,rm -rf, wildcardallowed-tools, or hidden Unicode characters - File passes the free checker with zero errors
FAQ
FAQ
Where do I put a skill so agents find it?
Paths differ by agent (for example ~/.claude/skills/ for Claude Code and ~/.agents/skills/ as a shared location), but the file format is the same. Several agents also read the shared ~/.agents/skills/ location.
Does a clean validation mean a skill is safe?
No. A clean report means the format follows the spec and none of the checker's known risky patterns were found. It is a first pass, not a security audit — always read a third-party skill in full before installing it.
Can I check a file without uploading it?
Yes. The checker on skillmdvalidator.com runs entirely in your browser. Your file contents are never uploaded, analyzed, or stored; only anonymous page visits are counted.
Ready to ship it? Validate your SKILL.md free — it runs 100% in your browser, and nothing you paste ever leaves your device.