ProfessorGPTProfessorGPT
Platform guide

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

A Claude Code skill is just a folder with one Markdown file — a SKILL.md that teaches Claude how you like things done. In this guide you'll build one from scratch, learn exactly where it goes, and fix it when it doesn't trigger.

13 min read Updated Oct 15, 2026 Beginner Needs Claude Code
§1First principles

What is a Claude Code skill?

Imagine hiring a brilliant new teammate. They can code, write, and analyze anything — but they don't yet know how your team does things: your commit style, your report format, your naming rules. So you hand them a one-page onboarding doc.

A Claude Code skill is exactly that: a folder containing a file named SKILL.md — a short instruction sheet Claude reads only when the task calls for it. Nothing to compile, no code required. If you can write a Markdown file, you can write a skill.

Fig. 1 — A skill in one picture: folder → SKILL.md → Claude → new capability. That's the whole mechanism.

Claude Skills are Anthropic's implementation of the open Agent Skills standard, so the same SKILL.md format works in Claude Code, the Claude apps, and other agents like Codex and Gemini CLI. New to the idea? Start with what agent skills are.

Where do skills work?

This guide uses Claude Code, where skills are plain folders on your disk. In the Claude apps you upload the same folder as a ZIP under Customize → Skills — and skills you turn on there also sync into Claude Code when you sign in with the same account.

§2The clever part

How Claude decides to use a skill

You might worry: "If I add 30 skills, won't Claude get slow and confused?" No — thanks to a design called progressive disclosure. Think of your skills as a bookshelf. Claude keeps only the spines in view: each skill's name and description. It pulls a book off the shelf — loads the full SKILL.md — only when your request matches a spine.

Level 1 · Always loaded

name + description — the “book spine”

~100 tokens / skill
your request matches the description

Level 2 · Loaded when relevant

the full SKILL.md body — your instructions

< 5k tokens
the skill points to more detail

Level 3 · Opened only if needed

extra files: reference.md, templates, scripts…

only when used
Fig. 2 — Progressive disclosure: only the spine is always loaded, so dozens of skills stay cheap. Token figures are the open standard's guidance.

The practical consequence, which you'll use in every skill you write: the description field is how Claude finds your skill. It isn't documentation for humans — it's what Claude matches your request against.

§3Know your tools

Claude skill vs slash command, subagent, plugin, and MCP

These building blocks overlap, so it's worth knowing which one you're reaching for:

What it addsWho triggers itBest for
SkillKnow-how: instructions, plus optional scripts and reference filesClaude, when the task matches — or you, with /skill-nameRepeatable workflows
Slash commandA saved prompt you run by nameYouNow part of skills — .claude/commands/ files still work
SubagentA separate agent with its own context windowClaude delegates to itBig, self-contained side tasks
PluginA bundle of skills, agents, hooks, and MCP serversYou install it onceSharing a toolkit across repos and teams
MCP serverTools and data from outside systemsClaude calls its toolsConnecting APIs, databases, and apps

The short version: MCP adds tools; a skill adds instructions. They're complementary — a skill can teach Claude how to use an MCP server well.

§4The #1 point of confusion

Where Claude skills live: ~/.claude/skills vs .claude/skills

This is where most beginners get stuck, so let's slow down. Claude Code looks for skills in two different places, for two different reasons:

  • Personal skills live in ~/.claude/skills/, inside your home directory. They follow you: available in every project you open on this machine, invisible to teammates.
  • Project skills live in .claude/skills/, inside a project's root folder next to its src/ and package.json. They follow the repo: commit them to git and every teammate who clones the project gets them.

Same folder name, completely different address. The only visual difference is that little ~/ prefix — which is exactly why it trips people up.

Fig. 3 — Two homes for a skill. Same folder name, different address, different audience.

New to ~ and the leading dot? Read this first

  • ~ (tilde) means "my home directory." Your terminal expands it for you: macOS → /Users/yourname, Linux → /home/yourname, Windows → C:\Users\yourname (PowerShell understands ~ too).
  • The leading dot makes .claude a hidden folder. In Finder press Cmd+Shift+.; in Windows File Explorer turn on hidden items from the View menu; or run ls -a in a terminal.
  • The folders may not exist yet — that's normal. Nothing creates ~/.claude/skills/ in advance; you'll create it in the hands-on part below.

So… which one should I use?

Personal · ~/.claude/skills/Project · .claude/skills/
Who benefits?Just youEveryone who clones the repo
ScopeEvery project on your machineOnly this project
Lives in git?No — it's outside any repoYes — commit and review it like code
Perfect forYour personal style: commit messages, note formats, favorite refactorsTeam rules: API conventions, release checklists, PR templates

Rule of thumb

Start personal. The moment a teammate says "I want that too," move the folder into the repo's .claude/skills/. That's the entire migration.

§5The file itself

Anatomy of a SKILL.md file

A SKILL.md has two parts: a small frontmatter block between --- fences (machine-readable metadata), and below it a free-form Markdown body with your actual instructions. Here's a complete, working one you can copy:

SKILL.md
---
name: commit-messages
description: Writes clear, conventional commit messages from staged changes or a diff. Use when the user asks to write, improve, or review a git commit message.
---

# Commit messages

Follow the Conventional Commits format:

type(scope): short summary in imperative mood

## Rules
- Allowed types: feat, fix, docs, refactor, test, chore
- Summary line: max 72 characters, no trailing period
- Explain the why in the body, not the what
- Breaking change? Add a "BREAKING CHANGE:" footer

## Example
feat(auth): add passwordless login via magic links

Reduces sign-up friction; password resets were 30% of support tickets.

The two fields that matter

  • name — the skill's ID, and the /command you can type to run it. Use lowercase letters, numbers, and hyphens only (max 64 characters), and keep it identical to the folder name: commit-messages/ ↔ name: commit-messages. Claude Code falls back to the folder name if you leave it out, but the open standard requires it — so set it and your skill stays portable.
  • description — the "book spine" from above. It answers two questions: what the skill does and when Claude should reach for it. Lead with the key use case; the open standard caps it at 1,024 characters.

The golden rule

Write the description for Claude, not for humans. Include the words a user would actually type. Compare:

✗ "Git helper." — Claude has no idea when this applies.

✓ "Writes conventional commit messages… Use when the user asks to write, improve, or review a commit message." — now "improve this commit message" is an obvious match.

Common frontmatter mistakes

  • Name the file exactly SKILL.md — capital SKILL, lowercase .md.
  • The opening --- must be the very first line of the file; Claude Code ignores frontmatter that starts anywhere else.
  • YAML is picky: put a space after every colon (name: value). If the YAML doesn't parse, the skill still loads — but with no description, so Claude can't match it.
  • Field names must match exactly, hyphens included. Claude Code silently ignores a field it doesn't recognize.
§6Hands on — 5 steps

How to create a Claude Code skill step by step

We'll create the commit-messages skill as a personal skill, so it works in every project you open. Total time: about five minutes.

1. Create the folder

macOS / Linux
mkdir -p ~/.claude/skills/commit-messages
Windows (PowerShell)
mkdir -Force ~\.claude\skills\commit-messages

Both commands create every missing parent folder in one go — remember, none of them may exist yet — and are safe to run twice.

2. Create SKILL.md inside it

Open the new folder in any editor and save the file from the anatomy section above as SKILL.md. Or let Claude do it — open Claude Code and paste:

Prompt for Claude Code
Create ~/.claude/skills/commit-messages/SKILL.md with a skill that writes Conventional Commits messages. The description should say to use it whenever I ask to write, improve, or review a commit message.

Yes — Claude is good at writing skills for Claude. Review what it generates and tweak the rules to taste.

3. Load it — no restart needed

Claude Code watches your skills folders, so a skill you add or edit is picked up in the current session. One exception catches almost every first-timer: if ~/.claude/skills/ didn't exist when the session started, Claude Code isn't watching it yet. Run /reload-skills (again after each edit there), or simply start a new session.

4. Trigger it — naturally

Don't announce the skill. Ask the way you normally would, and watch Claude reach for it on its own:

Fig. 4 — Success looks like this: Claude loads the skill, then follows your rules. Simplified — the exact output varies by Claude Code version.

You can also call it directly by typing /commit-messages — skills double as slash commands.

5. Check the shelf

Curious what Claude can see? Run /skills to list every skill Claude Code has loaded, or simply ask: "What skills are available?" Your new skill should be on the list. If it is — congratulations, you've shipped your first skill. 🎓

§7Office hours

Claude skill not triggering? Troubleshooting

Most "my skill doesn't work" cases come down to one of these. Check them in order:

SymptomLikely cause and fix
Missing from /skillsWrong location. The path must be exactly ~/.claude/skills/<name>/SKILL.md (personal) or <project>/.claude/skills/<name>/SKILL.md (project). A file in .claude/skill/ (singular), or a SKILL.md dropped straight into skills/ without its own folder, won't be found.
Still missing after you fix the pathFolder not watched yet. If the skills/ folder was created after the session started, run /reload-skills or start a new session.
/commit-messages works, but Claude never picks it on its ownBroken frontmatter. If the YAML doesn't parse, the skill loads with no description, so Claude has nothing to match. Check the --- fences and colons; claude --debug prints the parse error.
Listed, never usedVague description. Add the phrases users actually type ("commit message", "changelog", "release notes"), then test with a request that contains one.
Works in one project, not anotherIt's a project skill. By design it exists only inside that repo (Fig. 3). Copy it to ~/.claude/skills/ to make it personal.
Fires when you don't want itDescription too broad. Make it more specific — or add disable-model-invocation: true so it runs only when you type /commit-messages.

Debug like a pro

Ask Claude itself: "Why didn't you use my commit-messages skill for that request?" The answer usually points straight at a description that didn't match — and Claude can rewrite it on the spot. To check every skill's frontmatter at once, run claude plugin validate ~/.claude/skills in your shell.

§8Shortcuts

How to install a ready-made Claude skill

You don't have to write every skill from scratch. Three ways to add an existing one, no coding required:

1. Plugin marketplace (Anthropic's official method). Claude Code registers Anthropic's official marketplace the first time you start it, so you can install straight away. The command opens the plugin's details, where you review it and pick a scope:

Claude Code
/plugin install skill-creator@claude-plugins-official

Other marketplaces need adding first — Anthropic's example skills, for instance:

Claude Code
/plugin marketplace add anthropics/skills
/plugin install example-skills@anthropic-agent-skills

Skills from a plugin show up namespaced, as /plugin-name:skill-name.

2. The skills CLI (community tool). Install a raw SKILL.md skill from any GitHub repo:

bash
npx skills add owner/repo --skill <skill-name> -a claude-code -g

-g installs globally to ~/.claude/skills; drop it to install into the current project (.claude/skills). This is the third-party skills.sh CLI, not an Anthropic command.

3. Manual. Copy any skill folder (the one containing SKILL.md) into ~/.claude/skills/ — Claude Code picks it up right away (run /reload-skills if that folder is brand new).

Or find one in the ProfessorGPT catalog and install it in one command.

§9Skip the boilerplate

Let Claude scaffold it: skill-creator

Anthropic publishes an official skill-creator plugin that writes skills for you: it drafts the SKILL.md, helps you add test cases, and tunes the description so the skill triggers reliably. Install it with the command above (/plugin install skill-creator@claude-plugins-official), then ask in plain language: "Create a skill that reviews my PRs." It picks up that request on its own — or run it from the / menu as /skill-creator:skill-creator. (In OpenAI Codex the same idea is a built-in $skill-creator command.)

§10No YAML at all

Build a Claude skill without writing YAML

If you'd rather not hand-write frontmatter, the Skill Builder generates a clean, standard-compliant SKILL.md from a few inputs: pick a category, describe the job, then download or install the result. You can also browse ready-made skills and adapt one.

§11Beyond your first skill

Level up from here

You now have the core loop: folder → SKILL.md → trigger → iterate. Everything advanced is a variation on it:

  • Bundle resources. Drop a reference.md, templates, or examples next to SKILL.md and link to them from the body — Claude opens them only when needed (Level 3 in Fig. 2).
  • Add scripts. A skill can ship runnable helpers like scripts/validate.py and tell Claude to run them instead of improvising.
  • Control who triggers it. disable-model-invocation: true makes a skill manual-only — right for anything with side effects, like a deploy. allowed-tools pre-approves specific tools for the turn that runs the skill; it doesn't restrict the others.
  • Share it. Commit project skills to git, bundle a set into a plugin to reuse across repos, or publish one to the ProfessorGPT catalog.

The SKILL.md template adds the optional frontmatter fields, and the SKILL.md examples show finished skills to borrow from.

Before you ship a skill

  • Path is exactly …/skills/<skill-name>/SKILL.md — its own folder, exact filename
  • A deliberate choice: personal (~/.claude/skills/) or project (.claude/skills/)
  • name: lowercase letters, numbers, and hyphens, ≤ 64 characters, same as the folder
  • description: says what and when, uses real trigger words, key use case first
  • Tested with a natural request — and Claude actually used it

Frequently asked questions

Where are Claude skills stored?+
Personal skills live in ~/.claude/skills/ and project-specific skills in .claude/skills/ inside the repo. Each skill is its own folder containing a SKILL.md. If the same name exists in both, the personal one wins.
Do I need to code to create a Claude skill?+
No. A skill is plain markdown with a short YAML frontmatter. Scripts are optional. You can also generate one with the free Skill Builder without writing any YAML.
How does Claude decide when to use a skill?+
From the description field. Claude always sees each skill's name and description, and loads the full body only when the current task matches — so write the description around what the skill does and when it should trigger.
Do I need to restart Claude Code after adding a skill?+
No. Claude Code watches your skills folders and picks up new or edited skills in the current session. The exception: if the top-level skills folder did not exist when the session started, run /reload-skills or start a new session.
Why is my Claude skill not triggering?+
Usually the description: it must say what the skill does and when to use it, in the words users actually type. Also check the path (~/.claude/skills/<name>/SKILL.md), that the opening --- is the file's first line, and run /skills to confirm Claude Code loaded it.
Is a Claude skill the same as an agent skill?+
Yes. Claude Skills are Anthropic's implementation of the open Agent Skills / SKILL.md standard, so the same file format works across compatible agents like Codex and Gemini CLI.
How do I share a Claude skill?+
Publish the skill folder to a Git repo, or publish it to the public catalog on ProfessorGPT so others can install it with a single command.
How do I install (add) an existing Claude skill?+
Three ways, all without coding: from inside Claude Code run /plugin install <name>@<marketplace> (Anthropic's official method; the official marketplace is ready from the first start); use the community skills CLI — npx skills add owner/repo --skill <name> -a claude-code -g; or copy a skill folder into ~/.claude/skills/. Claude Code picks it up right away.
What is skill-creator?+
An official Anthropic plugin that builds skills for you — it drafts the SKILL.md and tunes the description for reliable triggering. Install it with /plugin install skill-creator@claude-plugins-official, then ask Claude in plain language to "create a skill that…", or run /skill-creator:skill-creator. In OpenAI Codex it is a $skill-creator command.

Build your skill now

Generate a standard SKILL.md in seconds — no YAML by hand.