How to write your first SKILL.md for Claude Code

Day 2, 25 minutes · advanced

Goal of this lessonWrite a SKILL.md with a name, a description Claude can match and clear rules, then run it by name and get your first repair ticket.

Why it matters

A skill lives or dies by two things: whether Claude picks it at the right moment, and whether its instructions are clear enough to follow without you. Both are written in one small file, SKILL.md. Most skills that "do not work" have a vague description or instructions that only made sense to the person who wrote them.

Today you write the first version of Odette's repair-ticket skill. It turns a rough customer note into a ticket with eight fixed lines. You learn the two parts of the file, the frontmatter fields you need now, and how to write a description that tells Claude exactly when the skill fits. At the end you have run the skill on a real note from the shop's folder and seen a ticket appear.

The two parts of SKILL.md

Every skill is a folder with a file named SKILL.md in it. A project skill lives at .claude/skills/<skill-name>/SKILL.md inside your project. The skills page describes the file in two parts:

  1. Frontmatter: YAML between two --- lines at the very top. It tells Claude Code about the skill.
  2. Content: plain markdown after the closing ---. These are the instructions Claude follows when the skill runs.

The opening --- must be the first line of the file. If it is not, Claude Code treats the whole file as content and reads no fields at all.

The two fields you need now

The frontmatter has many optional fields. Today you use two:

  • name: the command you type. Without it, the folder name is used. Keep it the same as the folder: lowercase letters, digits and hyphens.
  • description: what the skill does and when to use it. Claude uses this text to decide when to apply the skill. The skills page calls it the one recommended field. If you leave it out, Claude Code uses the first non-empty line of the content instead, which is rarely a good trigger.

Field names must match exactly, hyphens included. Claude Code ignores a field it does not recognise without an error, so a typo fails silently.

A description that makes Claude pick the skill

The skill authoring best practices give three rules for the description:

  • Say what it does and when to use it. Both halves matter. "Helps with tickets" says neither.
  • Write in the third person. "Turns a customer note into a ticket", not "I can help you" or "You can use this to".
  • Use the words people actually say. Odette's customers do not say "intake record". They say "note", "phone message", "the brakes squeak".

Put the main use first. The skills page says the description is cut off at 1,536 characters in the skill listing, and with many skills Claude Code may drop some descriptions from the listing to fit its budget, so keep it short and put the key words first.

Instructions Claude can follow alone

The content should be short and concrete. The skills page warns that once a skill loads, its text stays in the conversation, so every line costs tokens on every later turn. State what to do, in order, and leave out the why. A numbered list works well. Name the exact output: which fields, which file, which format.

Write each rule so it holds for the whole task. Claude Code does not re-read the file on later turns, so "Customer: first name only" works better as a standing rule than as one step among many.

The steps

  1. Start Claude Code in Manual mode in the practice folder.
  2. Ask Claude to create the skill file at .claude/skills/repair-ticket/SKILL.md. Folders under .claude are protected, so Claude Code asks before it writes there: read the file in the prompt and approve it.
  3. Check that it loaded with /skills. Claude Code watches the skills folders, so a new skill normally appears without a restart.
  4. Run it by name on one of the notes, and read the ticket it writes.
  5. Read the ticket against the rules and change one instruction if something is off.
  6. Commit the skill.

Follow the steps for Claude Code below.

Example: Odette's first run

Odette typed /repair-ticket and pasted the note about Lotje's cargo bike. Claude wrote tickets/PW-0001.txt with eight lines, used "Lotje" as the customer and left her email address out, as the rules say. It also said it had left out "wants it Thursday", because the ticket has no line for a date. That was useful: Odette decided the date stays in her diary for now, and changed one rule so Claude always lists what it left out. That is how a skill grows: run it, read the output, change one rule.

Common mistakes

  • A description in the first person. "I turn notes into tickets" reads oddly inside Claude's system prompt and can hurt discovery.
  • A skill file that is not in a folder. .claude/skills/repair-ticket.md does not load. It must be .claude/skills/repair-ticket/SKILL.md.
  • A wall of background. Claude does not need the history of the shop. It needs the fields, the file name and the rules.

Today's actions

Ticks are not saved without an account

Do it in Claude Code

Claude Code

  1. Start Claude Code in Manual mode in the practice folder.
    cd pennywhistle-shop
    claude --permission-mode manual
  2. Paste this prompt and press Enter. Claude Code asks before it writes in the protected .claude folder: read the file in the prompt and choose Yes.
    Create .claude/skills/repair-ticket/SKILL.md with exactly this content:
    ---
    name: repair-ticket
    description: Turns a rough customer note about a bike repair into a tidy Pennywhistle Cycles repair ticket. Use when the user pastes a customer note, a phone message or a quick description of a bike problem, or asks for a repair ticket.
    ---
    
    Make one repair ticket from the customer note.
    
    1. Use exactly these eight lines, in this order: Ticket, Customer, Bike, Problem, Work, Parts, Estimate, Status. Write each line as Field: value.
    2. Ticket: PW- and four digits, the next free number in tickets/, starting at PW-0001. Save the ticket as tickets/PW-NNNN.txt with that number.
    3. Customer: first name only. Never copy a phone number or email address.
    4. Parts: the parts needed, or none. Estimate: EUR and a whole number from the note, or EUR 0 if the note gives no price.
    5. Status: new.
  3. Type /skills and find repair-ticket in the list, then press Esc. If it is missing, type /reload-skills and look again.
  4. Run the skill by name on Lotje's note. Approve the new ticket file when Claude Code asks.
    /repair-ticket Make a ticket from notes/lotje.txt
  5. Read the ticket: eight lines, a first name only, no email address. Then ask Claude to add a sixth rule and approve the edit.
    Add this rule to .claude/skills/repair-ticket/SKILL.md, after rule 5:
    6. Show the ticket, then list anything from the note you left out.
  6. Ask Claude to commit the skill and the ticket, and approve the commit.
    Commit .claude/skills/repair-ticket/SKILL.md and the new ticket in tickets/ with the message: Add the repair-ticket skill.

Note: If /repair-ticket does not appear, check that the file is at .claude/skills/repair-ticket/SKILL.md, not .claude/skills/repair-ticket.md, and that --- is its very first line. The steps work the same on Windows, macOS and Linux.

Paid planNeeds a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. The free Claude plan does not include Claude Code.

Checked on 4 December 2026 · Source: Claude Code docs: Extend Claude with skills (opens in a new tab)

Create a free account to save your progress. Sign in or sign up