Ravindra BagaleCourses & study guides Track your progress

Guides · Generative AI

Claude Code Skills Examples: Create Your First SKILL.md

A skill in Claude Code is a folder with a SKILL.md file: short YAML frontmatter plus instructions. As of 25 October 2026, Claude Code docs say project skills go in .claude/skills/<name>/SKILL.md and personal ones in ~/.claude/skills/<name>/SKILL.md. You run one with /name, and Claude can also load it automatically when the description matches. Use $ARGUMENTS for input. Old .claude/commands/ files still work.

Suppose Tanvi in Mumbai always asks Claude to “summarise my changes for the PR”, and Felix in Vienna always asks for “a commit message in our format”. Each turns the repeated request into a skill folder and now just types /summarize-changes or /commit-msg.

Related pages

See also Claude Code Hooks Examples, and AGENTS.md vs CLAUDE.md vs Cursor Rules.

What you will learn in this guide

  • What a skill is
  • Where SKILL.md lives
  • Frontmatter fields
  • Three example skills
  • Skill vs hook vs CLAUDE.md

1. Why: stop retyping the same prompt

If you type the same request every day, a skill saves it with exact steps. The team gets the same result every time.

2. What: the parts

Part Meaning
Folder .claude/skills/name/ (project) or ~/.claude/skills/name/ (you)
name Becomes the /command
description Helps Claude know when to use it
disable-model-invocation true = only you can run it
allowed-tools Tools allowed without asking while the skill runs
$ARGUMENTS Text you type after /name
First skill in five steps Steps from top to bottom: 1 Make the folder, .claude/skills/name; 2 Write SKILL.md, Frontmatter plus steps; 3 Describe when to use, One clear line; 4 Run with /name, Pass arguments; 5 Commit to git, Team shares it. 1Make the folder.claude/skills/name 2Write SKILL.mdFrontmatter plus steps 3Describe when to useOne clear line 4Run with /namePass arguments 5Commit to gitTeam shares it

Figure 1. First Claude Code skill in five steps: folder, SKILL.md, description, run with /name, commit.

3. How: create one

  1. In your repo, make .claude/skills/summarize-changes/.
  2. Create SKILL.md with name and description in frontmatter.
  3. Write the steps below the frontmatter.
  4. Start claude and type /summarize-changes.
  5. Commit the folder so teammates get it.

4. Source

  • Claude Code docs, “Extend Claude with skills” (checked 25 Oct 2026).
  • Hooks always run on events; skills run when called or when relevant; CLAUDE.md is always-on project memory.

5. Worked example 1: make the folder (start here)

In your project:

mkdir -p .claude/skills/summarize-changes
ls .claude/skills

Expected output (yours will be similar, not the same):

summarize-changes

6. Worked example 2: summarize-changes skill

Save as .claude/skills/summarize-changes/SKILL.md:

---
name: summarize-changes
description: Summarise uncommitted changes for a pull request description.
disable-model-invocation: true
---

Current changes:
!`git diff HEAD`

Write a PR description with:
1. One-line summary
2. Bullet list of changes by file
3. Risks and how to test

Expected output (yours will be similar, not the same):

In Claude Code, typing /summarize-changes prints a PR description built from your diff.

The !command line runs first and its output is put into the prompt.

7. Worked example 3: skill with arguments

Save as .claude/skills/explain/SKILL.md:

---
name: explain
description: Explain a file or function in simple English for a beginner.
---

Explain $ARGUMENTS in simple English:
- What it does (2 lines)
- Inputs and outputs
- One example call
Do not change any files.

Expected output (yours will be similar, not the same):

Typing /explain src/utils.py gives a short beginner explanation.

Names, amounts and companies in the examples are made up for practice.

8. Common mistakes

Mistake Risk Fix
Wrong folder name Skill not found .claude/skills/name/SKILL.md
Vague description Never auto-used Say when to use it
Secrets in SKILL.md Leak via git Use env vars
Too many allowed-tools Risky actions Allow the minimum
Huge skills Slow and confusing One job each

9. Try at home

Try at home

  1. Create summarize-changes.
  2. Run it after a small edit.
  3. Commit the skill folder.

Recap

In short

  1. A skill is a folder with SKILL.md.
  2. Project: .claude/skills; personal: ~/.claude/skills.
  3. Run with /name; pass $ARGUMENTS.
  4. description helps auto-use.
  5. Keep secrets out.

Repeat a prompt twice? Make it a skill.

Frequently asked questions

Do old .claude/commands files still work?

Yes, per the docs. Skills add folders, extra files and auto-loading.

Can Claude run a skill by itself?

Yes if the description matches, unless disable-model-invocation is true.

Can a skill include scripts?

Yes, you can put helper files in the skill folder and reference them.

Are skills free?

Skills are a Claude Code feature; Claude Code itself needs a paid plan or API.

Related: Claude Code Hooks Examples: Auto-Format, Block Files and Get Notified