✻Founding-member pricing: every lesson for $19/mo. The first 3 lessons are free. Start lesson 1 →
Unit 4 · Agent Skills · Lesson 18 of 40

Create Your First Skill

Build a working Claude Code skill step by step: SKILL.md frontmatter, a description that triggers reliably, $ARGUMENTS, and testing it.

ACADEMY12 min+74 XP4-question quiz

🎯 By the end of this lesson you'll be able to

  • Create a skill folder and SKILL.md
  • Write a description that triggers reliably
  • Accept arguments with $ARGUMENTS
  • Test invocation both ways

The anatomy of SKILL.md

.claude/skills/release-notes/SKILL.md
---
name: release-notes
description: Write user-facing release notes from merged PRs since the last tag. Use when the user asks for release notes, a changelog entry, or "what shipped".
argument-hint: "[version]"
---

# Release notes

1. Find the last tag: `git describe --tags --abbrev=0`
2. List merged PRs since then: `gh pr list --state merged --search "merged:>=<tag date>"`
3. Group changes into **New**, **Improved** and **Fixed**. Skip internal refactors.
4. Write for customers, not engineers: lead with the benefit, one line each.
5. Title the notes with version $ARGUMENTS (or "Unreleased" if none was given).
6. Save to `docs/releases/<version>.md` and show me the result.

Two parts:

  • Frontmatter (between the --- lines): metadata such as name, description and options.
  • Body: the instructions Claude follows when the skill runs.

The folder name becomes the command, so this skill runs as /release-notes 2.4.0.

Write a description that triggers

The description answers two questions: what does this skill do, and when should it be used. Include the words a user would actually say.

◎Will this description trigger reliably?pick the best fit
"Helps with docs."
Too vague. Which docs? When? It will misfire or never fire.
"Write user-facing release notes from merged PRs since the last tag. Use when the user asks for release notes, a changelog entry, or 'what shipped'."
It says what and when, with real trigger phrases.
"Utility skill."
Claude can't match any request to this.
"Generate a typed API client from openapi.yaml. Use when the OpenAPI spec changes or the user mentions regenerating the SDK."
Specific inputs, outputs and triggers.

You can also add a separate when_to_use field for trigger phrases. It's combined with the description.

Arguments

Anything typed after the command is available as $ARGUMENTS. For positional pieces, use $0, $1 and so on (or name them with the arguments field):

markdown
---
name: migrate-component
description: Migrate a UI component from one framework to another
arguments: [component, from, to]
---
Migrate the $component component from $from to $to, preserving behavior and tests.
text
/migrate-component SearchBar JavaScript TypeScript

If your skill doesn't reference $ARGUMENTS anywhere, Claude Code appends what you typed automatically, so nothing gets lost.

Test it both ways

⇅Build and test a skilldrag or use arrows
  1. ⋮⋮Create the folder .claude/skills/release-notes/
  2. ⋮⋮Write SKILL.md with frontmatter and instructions
  3. ⋮⋮Invoke it directly with /release-notes 2.4.0
  4. ⋮⋮Start a fresh session and ask "what shipped since the last release?"
  5. ⋮⋮Check that Claude loaded the skill, and refine the description if it didn't

Changes to existing skills are picked up live. If you create a brand-new top-level skills directory mid-session, run /reload-skills.

⌨Type the command+15 XP

Type the slash command that runs a skill named "release-notes" with the argument 2.4.0

❯
☑Build yourssaved on this device

Check your understanding

?Lesson quiz10 XP per correct answer · +25 for a perfect score
QUESTION 1 OF 4

What becomes the skill's slash command name by default?

Why: The skill's directory name becomes /name unless name overrides it.
QUESTION 2 OF 4

A great description includes:

Why: What plus when, in the user's words, is what triggers reliably.
QUESTION 3 OF 4

How does a skill receive what you type after /skill-name?

Why: $ARGUMENTS holds the full string. $0, $1 and named arguments give the pieces.
QUESTION 4 OF 4

You created a brand-new skills directory mid-session and Claude can't see it. What do you run?

Why: New top-level skill directories need /reload-skills. Edits to existing skills are picked up live.
0 / 4 correct
Academy lesson

Unlock lesson 18 and the next 22

You've finished the free lessons. Join the Academy for $19/month to unlock every lesson, quiz, terminal simulation and puzzle, plus the final exam and your certificate of completion.

  • All 40 lessons across 9 units
  • 165+ quiz questions
  • Final exam + certificate
  • New lessons as Claude Code evolves
  • XP, streaks and badges
  • Cancel anytime

Already a member? Log in to continue.

Key takeaways

  • SKILL.md = frontmatter (name, description, options) + instructions.
  • The description must say what and when, in the words users actually say.
  • Use $ARGUMENTS, $0, $1 or named arguments for inputs.
  • Test both direct invocation and automatic triggering.

Nice work. Lesson 18 done?

Mark it complete to earn +74 XP, keep your streak alive and unlock badges.

Written by Curtis Cornell from Anthropic's public Claude Code documentation. Last reviewed November 14, 2026. Claude Code changes fast; if something here differs from your version, the official docs win.

Start lesson 1 free →