how to create a claude code skill

How to Create a Claude Code Skill (SKILL.md Step by Step)

Asfandyar Malik

Create your first Claude Code skill in ten minutes: where the folder goes, what to write in SKILL.md, how to run it, and how to fix it when it won't trigger.

6 min readMr Claude

To create a Claude Code skill, make a folder called ~/.claude/skills/your-skill-name/ and put a file named SKILL.md in it. The file has a short header (a name and a description) and then plain instructions. Type /your-skill-name in Claude Code and it runs.

What a skill actually is

A skill is a saved set of instructions that Claude Code can load when it needs them. Think of it as a recipe card. You write it once, and you stop pasting the same long prompt every morning.

Claude only keeps the short description of each skill in its context. The full text loads when the skill runs, either because you typed the slash command or because your request matches the description. That's why a skill is better than stuffing everything into one giant instruction file. If you want the always-on kind of instruction, that's a different file, and we cover it in how to write a CLAUDE.md file.

This guide follows the official Claude Code skills page, which we read for this article. Skills follow an open standard, and Claude Code adds a few extra options on top.

Before you start

  • Claude Code installed and working in your terminal.
  • One task you repeat. Good first picks: writing a weekly report, cleaning a spreadsheet, drafting replies to the same kind of email, or reviewing a page before you publish it.
  • A text editor. Any one works.

If you're new to the tool itself, start with the tracks first and come back here. A skill is much easier to write once you've used Claude Code for a few days.

Step by step: your first skill

  1. Pick the task. Write it as one sentence: 'Turn my rough notes into a client update email.' If you need two sentences, it's probably two skills.
  2. Choose where it lives. A personal skill goes in ~/.claude/skills/<skill-name>/SKILL.md and works in all your projects on that machine. A project skill goes in .claude/skills/<skill-name>/SKILL.md inside a repo, and you can commit it so teammates get it too.
  3. Create the folder from your terminal with the command below.
  4. Write SKILL.md. The first line must be three dashes. Then a name, a description, three more dashes, and your instructions in plain words.
  5. Run it. Type /client-update at the start of a message, then your notes.
  6. Read what came back, then fix the skill, not the answer. If Claude got the tone wrong, add a line about tone to the file. Next run is better.
mkdir -p ~/.claude/skills/client-update
touch ~/.claude/skills/client-update/SKILL.md

Now paste this into the file:

---
name: client-update
description: Turn rough notes into a short client update email. Use when I paste notes and ask for a client update, status email or weekly summary.
argument-hint: [paste your notes]
---

Turn these notes into an email to a client: $ARGUMENTS

Rules:
- Start with the one thing the client cares about most.
- Three short paragraphs at most.
- Plain words. No jargon. No exclamation marks.
- End with exactly one question or next step.
- If a date or number is missing from the notes, write [CHECK] instead of guessing.

That last rule matters. A skill that guesses missing facts is worse than no skill.

The header fields that matter

Every field in the header is optional, but the official docs recommend always writing a description. These are the ones you'll use most:

FieldWhat it does
nameThe slash command. If you leave it out, the folder name is used.
descriptionWhat the skill does and when to use it. Claude reads this to decide whether to load the skill on its own.
argument-hintA hint shown while you type, like [issue-number].
disable-model-invocationSet to true so only you can run it. Use it for anything with side effects, like deploying or sending.
allowed-toolsTools Claude can use without asking during that run.
contextSet to fork to run the skill in a separate subagent.

The docs say the description plus the optional when_to_use field are cut off at 1,536 characters in the skill list, so put the main use first.

Passing in input with $ARGUMENTS

Whatever you type after the slash command lands where you write $ARGUMENTS. You can also pick pieces by position: $0 is the first argument, $1 the second. Quotes group words, so /my-skill "hello world" second gives you 'hello world' as the first piece.

If you never write a placeholder, Claude Code adds your text to the end of the skill automatically. So even a skill with no placeholder still receives what you typed.

A worked example: a weekly report skill

Say you run a small shop and every Friday you copy sales numbers into a message to your partner. Make a skill called friday-report.

---
name: friday-report
description: Write the Friday sales summary for my business partner from a pasted list of numbers.
disable-model-invocation: true
---

Write a Friday summary from these numbers: $ARGUMENTS

Format:
1. One line: was the week up or down versus last week, and by how much.
2. Three bullets: best seller, worst seller, one thing to watch.
3. One suggestion for next week.

Only use numbers I gave you. If last week's number is missing, say so instead of estimating.

We set disable-model-invocation to true on purpose. You want this to run when you ask, not whenever Claude thinks a sales number looks interesting.

Run it: /friday-report Mon 120, Tue 90, Wed 140 .... You'll get the same shape every week. That sameness is the whole point. A skill turns a good one-off answer into a repeatable one.

Add supporting files when the skill grows

The official guidance is to keep SKILL.md under 500 lines and move detail into other files in the same folder. A common layout looks like this:

my-skill/
  SKILL.md
  reference.md
  examples.md
  scripts/helper.py

Mention each extra file inside SKILL.md so Claude knows when to open it. Example: 'For tone examples, read examples.md.' Scripts get run rather than read, so they don't eat your context.

One thing worth knowing: once a skill loads, its text stays in the conversation, so every line costs you a little on each later turn. Short skills are cheaper and followed better. Say what to do, skip the long explanations of why.

What goes wrong and how to fix it

  • The skill never triggers on its own. Your description probably doesn't use the words you actually say. Put natural phrases in it, like 'status email' or 'weekly summary'. Ask Claude 'What skills are available?' to confirm it's listed, then try the slash command directly.
  • The slash command isn't recognized. Check the folder path and the file name. It must be exactly SKILL.md. The docs say edits are picked up live, and if a brand new skill doesn't appear you can run /reload-skills.
  • The header is silently ignored. If the YAML doesn't parse, the skill still loads, but without its fields. Make sure the file starts with three dashes on line one, and that you used a colon and a space after each field name. Unknown field names are ignored without any warning, so a typo like descripton just vanishes.
  • It triggers when you don't want it. Make the description narrower, or set disable-model-invocation to true.
  • Claude drifts partway through. Long tasks can wander. Keep rules short and concrete, and run the skill again after a long session gets compacted.

Skill, CLAUDE.md or prompt?

Use a plain prompt for one-off asks. Use CLAUDE.md for facts that apply to every session, like build commands and house rules. Use a skill for a multi-step job you run on demand. If you find yourself pasting the same paragraph twice in a week, that paragraph wants to be a skill.

Where to go next

Build one skill this week and only one. Use it five times, then edit it. Skills get good through small edits, not through a perfect first draft. Our 90-day accountability tracker is a simple way to keep a daily habit going, and a new skill each week is a fine use of it.

If you'd like to build these next to other people doing the same thing, our community Build AI Business with Claude is $29 a month. It's optional. Everything in this article works without it.

Questions people ask

Where do Claude Code skills go?

Personal skills go in ~/.claude/skills/your-skill/SKILL.md and work in all your projects. Project skills go in .claude/skills/your-skill/SKILL.md inside a repo and can be committed to share with a team.

How do I run a Claude Code skill?

Type a slash and the skill name at the start of your message, for example /client-update followed by your notes. Claude can also load it on its own when your request matches the skill's description, unless you turned that off.

Why won't my skill trigger?

Usually the description doesn't use the words you naturally say, or the folder or file name is wrong. Check that the file is named SKILL.md, ask Claude what skills are available, and try the slash command directly.

How long should a SKILL.md be?

The official docs advise keeping it under 500 lines and moving detail into separate files in the same folder. Shorter is usually followed better.

Sources

Read next

Ready to learn by shipping?

Join Mr Claude for project-based Codex lessons, Claude Code workflows, SEO playbooks, and hands-on build tracks.