How To Create A Claude Skill

How to create a Claude skill is simple: make a folder with a file named SKILL.md inside, and start that file with a name and a description. The rest of the file is the instructions Claude follows.

The steps below follow the Agent Skills spec and Anthropic's best-practice guide, so the same skill also works in other agents.

How Do I Name The Skill Folder?

Give the folder the skill's name. Use up to 64 lowercase letters, numbers and hyphens, with no hyphen at the start or end and never two in a row.

The folder name and the name field must match. Anthropic also bars the words anthropic and claude in skill names.

~/.claude/skills/processing-pdfs/
  SKILL.md

That path is for Claude Code, and other tools use other folders. An agent built with the Claude Agent SDK reads the same folder, as long as it loads your project settings. A Strands agent can load a whole folder of skills at once with its AgentSkills plugin.

What Goes At The Top Of SKILL.md?

SKILL.md opens with YAML between two lines of dashes. Two fields are required.

---
name: processing-pdfs
description: Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.
---

How Should I Word The Description?

The description is how Claude picks a skill, so say what the skill does and name the tasks or words that should trigger it. That is what sets a skill apart from a prompt you paste into each chat, as our guide to skills and prompts explains.

Write it in the third person, so "Processes Excel files" works and "I can help you process Excel files" does not. You get up to 1,024 characters.

How Long Can The Instructions Be?

Below the frontmatter, write the steps in plain Markdown. The spec and Anthropic's guide both say to keep the body under 500 lines.

When it grows past that, move detail into separate files and link to them from SKILL.md. Keep those links one level deep, because Claude may only partly read a file that is linked from another reference file. Files that Claude never opens cost no context, as our guide to how skills load explains.

A skill folder can also hold optional subfolders. Use scripts for code the agent can run, references for docs that it reads only when it needs them, and assets for templates and other files. Those files help Claude do the work, while an artifact is what Claude makes for you to keep, as our skills and artifacts guide shows.

How Do I Test A New Skill?

Anthropic suggests that you write a few test tasks first, before you write long instructions for problems the agent may not have. Run the agent on them without the skill, note where it fails, and then write only enough to fix those gaps. In the SkillsBench study, short skills helped more than long ones, and our summary of its results has the numbers.

To check the frontmatter, run the skills-ref library from the Agent Skills project. In Claude Code, ask a question that should trigger the skill, or call it by name with /processing-pdfs to see whether it loads.

See Real Skills Before You Write One

Anthropic's skill-creator skill helps you build new skills. Obra's writing-skills is another example, and you can read both on SkillTrove.

FAQ

Do I Need To Restart Claude Code After Adding A Skill?

You don't. Claude Code picks up edits in an existing skills folder during the session. If you created the skills folder itself after the session started, run /reload-skills.

Ad Sponsor this spot. Reach developers who pick skills