Claude Skills Best Practices: 7 Rules for Skills That Work

The best Claude skills are easy for Claude to find and cheap for it to read. The core of the claude skills best practices behind that fits in 7 rules: a clear name, a description that says when to use the skill, a short main file, reference files one level deep, a contents list on long files, a test written before the instructions, and a test on each model you plan to use.

If skills are new to you, this walks through each rule in order, with the numbers behind each one and what I found when I checked my own 56 skills against them.

Key Takeaways

  • Claude picks a skill from its name and description alone, out of potentially 100+ others, so a description that names the job and the moment to use it is what gets the skill picked.
  • Keep the main file under 500 lines and move detail into separate files, which Claude reads only when a task needs them.
  • Link every extra file straight from the main file. A file reached only through another file may be read only in part.
  • Write the test before the instructions: run Claude on the task without the skill, note where it fails, and write only what closes those gaps.
  • Check a skill on each model you use, whether Haiku, Sonnet or Opus. What works on Opus can need more detail on Haiku.

Short on time? Jump to the 7 rules in one table.

What Is a Claude Skill?

A Claude skill is a folder of instructions that Claude reads when a task matches it. The folder holds a main file called SKILL.md, and it can also hold reference files and scripts. Anthropic calls them Agent Skills, so you will see both names, and its authoring guide is where the rules below come from. The guide applies wherever skills run, and where something is specific to Claude Code, I say so.

If you are still getting set up, start with Claude Code basics.

In Claude Code, skills also come bundled inside plugins, so installing one is another way to get a skill.

Anthropic's skills documentation covers using them in Claude Code.

Claude has a limited amount of space for your conversation and instructions at once, called its context. It does not read the whole folder up front. It reads in layers, and that loading order is behind the rules below.

Layer When Claude reads it What it costs
Name and description At startup, for each skill you have Always in context
The main file, SKILL.md When the skill looks relevant (in Claude Code, also when you call it by name) Competes with your conversation for space
Reference files and scripts Only when the work needs them Nothing until opened, and a script that runs costs only its output

Each rule below helps Claude find the right skill, or helps it read only what it needs once it has found it.

The 7 Claude Skills Best Practices at a Glance

Rule What to do The number to know
1. Name it for the work Pick one naming pattern, such as a verb ending in ing, and keep it Up to 64 characters, lowercase letters, numbers and hyphens
2. Write the description for discovery Say what the skill does and when to use it, in third person Up to 1,024 characters
3. Keep the main file short Move detail into separate files Under 500 lines
4. Keep references one level deep Link every extra file directly from the main file 1 level
5. Add a contents list to long files Put it at the top of any long reference file Over 100 lines
6. Write the test first Run Claude without the skill, then build scenarios At least 3 scenarios
7. Test on each model Check the skill on every model you plan to use Haiku, Sonnet, Opus

How to Write Claude Skills: Names and Descriptions

Claude reads these 2 fields for each skill at startup, so they are the part it uses to decide whether to use a skill.

What makes a good skill name?

A good skill name says what the skill does. Anthropic's guide suggests a verb ending in ing, such as processing-pdfs, analyzing-spreadsheets or writing-documentation. Noun phrases like pdf-processing and action names like process-pdfs are acceptable too. What matters is consistency: pick one pattern and use it across your skills, so they read as one collection.

Vague names such as helper, utils and tools tell Claude nothing, and neither do generic ones like documents, data and files. A name can run to 64 characters, using lowercase letters, numbers and hyphens.

How should a skill description be written?

Write the description in third person, and say 2 things: what the skill does and when to use it. Add the words you would actually say when you ask for it. For example: "Turns rough meeting notes into a one page summary with action items. Use when the user pastes meeting notes or asks for a recap."

Third person matters because the description is added to Claude's system prompt, and mixing viewpoints ("I can help you with...", "You can use this to...") can cause discovery problems. Anthropic's own example of a weak description is "Helps with documents", which gives Claude nothing to match against.

The stakes are real. Claude chooses from potentially 100+ available skills using the description, so a vague one gives Claude little to match a request against. The guide caps a description at 1,024 characters.

How my own descriptions measure up

I ran the guide's checkable rules against the skills folder on my own machine, 56 skills in all. Descriptions drift fastest, because each fix tends to add a sentence, so they come first.

2 of the 56 go past the 1,024 character limit, at 1,299 and 1,141 characters. 9 go past 100 words, which is the line my own warning uses. That warning is a hook, a command Claude Code runs on its own at set points, and it flags a skill when its file passes 500 lines or its description passes 100 words.

On descriptions, the hook turned out to be stricter than the guide. It flags 9 skills where the published limit flags 2. A stricter house rule is fine, and it helps to know which line is the real one when you decide what to trim.

How Long Should a Skill Be?

SKILL.md best practices come down to 1 idea: the main file is a short overview that points to the detail, the way a table of contents does. Anthropic's guide calls this progressive disclosure, and the numbers are specific.

How long should SKILL.md be?

Keep the body under 500 lines. When it nears that, split the content into separate files and link them from the main file. Claude reads those only when a task needs them, so a large reference file costs no context until it is opened.

The same thinking applies line by line. Claude is already capable, so add only what it does not know, and test each paragraph against 3 questions: does Claude need this, can I assume it already knows this, and is it worth the space it takes? Give files descriptive names, such as form_validation_rules.md instead of doc2.md, so Claude can tell what is inside before it opens one.

Why keep reference files one level deep?

Link every reference file directly from SKILL.md. When one file points to another file that points to another, Claude may read the deeper ones only in part. The guide notes it can preview a file with a command like head -100, which shows the first 100 lines, so anything lower down can be missed.

The pattern to avoid is a chain: the main file links to advanced.md, which links to details.md. A folder of reference files is fine, as long as each file is linked straight from the main file.

When does a reference file need a table of contents?

Put a table of contents at the top of any reference file longer than 100 lines. It shows Claude the full scope of the file even when it previews only the start, so it knows to keep reading when the part it needs sits at line 350.

What happened to my longest skill

Skills grow one fix at a time, so a count catches what a read misses. Across my 56 skills, 2 main files run past 500 lines, at 734 and 713. My writing skill had reached 32,000 words, and one description in my folder had reached 287 words, before a count showed it.

The writing skill's fix was the structure in this section. Its main file is now 73 lines and links each of its 12 reference files directly. The heavy detail sits in those files, and each is read only at the step that needs it.

Run the 100 line check on your reference files too. 5 of that skill's 12 run past it, at 205, 148, 140, 127 and 114, and none has a contents list yet.

How to Test a Skill Before You Trust It

Anthropic's guide puts the test before the writing. The order feels backwards, and it keeps you from writing instructions for problems Claude does not have.

What are the steps for testing a skill?

  1. Run Claude without the skill. Give it real tasks and write down where it fails.
  2. Write 3 test scenarios. Cover the gaps you found.
  3. Record the baseline. Note how Claude does on those scenarios with no skill.
  4. Write the minimum. Add only the instructions that close the gaps.
  5. Run it again. Compare against the baseline and revise.

Is there a built in way to run these tests?

The guide says there is not currently a built in way to run these evaluations, so you build your own: a short list of test requests and what a good answer looks like for each.

Can Claude help write the skill?

Yes. The guide suggests working with 2 instances of Claude. One helps you write the skill, and a fresh one uses it on real tasks. When the second one stumbles, you bring the specifics back to the first.

While it works, watch which files it opens, which links it skips and which sections it ignores. A file Claude never opens may not belong in the skill, or may need a clearer link from the main file.

Test a Skill on Each Model You Plan to Use

A skill that works on 1 model can need changes on another. The guide's example: what works for Opus might need more detail for Haiku. Each model gets its own question.

Model The question to ask
Haiku Does the skill give enough guidance?
Sonnet Is the skill clear and efficient?
Opus Does the skill avoid over explaining?

Aim for instructions that hold up on the models you use. Run your 3 test scenarios once per model, and fix the skill where one of them fails.

Frequently Asked Questions

What is the difference between a skill and CLAUDE.md?

In Claude Code, a skill's main file loads when a task matches it or when you call it by name, while CLAUDE.md loads at the start of each session. That makes CLAUDE.md the place for rules that apply everywhere and a skill the place for a procedure you need sometimes. Keeping each one short helps both, and the CLAUDE.md best practices post covers the other half.

Can a skill name include the word Claude?

Anthropic's naming rules say no. The guide lists claude and anthropic as reserved words, so a name like claude-helper breaks them. Name the skill for the job it does instead, such as reviewing-contracts.

What else is in Anthropic's guide?

Anthropic's guide also asks for concise instructions, because each paragraph competes for space. It recommends matching how strict the instructions are to how fragile the task is, breaking big jobs into checklist steps, giving 1 default approach with an escape hatch instead of a menu of options, using the same term for the same thing, keeping time sensitive facts out of the main text, and writing file paths with forward slashes. For skills that run scripts, it adds advice on handling errors inside the script.

Where do I start if my skills are already messy?

If you have none yet, start with the task you explain to Claude most often, and write its description first. If you already have some, start with a count. List each skill's line count and description length, then fix the 2 biggest offenders first. Split any main file over 500 lines into reference files, and rewrite any description that does not say when to use the skill. Then write a test scenario for the skill you use most, and run it before and after the change.