How to create Claude Code skills.
How to create Claude Code skills that turn a recurring task into instructions Claude can reuse across sessions.

Loading the lessonβ¦
Loading activitiesβ¦
How to create Claude Code skills that turn a recurring task into instructions Claude can reuse across sessions.

Loading the lessonβ¦
Loading activitiesβ¦
Typing the same giant prompt over and over gets old FAST. Skills fix that. They're custom slash commands that plug your own workflows into Claude Code, so you write the prompt once and fire it off with a single command forever after.
A skill is a markdown file full of instructions for Claude. When you call it with a slash command, Claude follows those instructions.
Example. Instead of typing "Review the recent git diff, check for security issues, performance problems, and style violations, then provide feedback as a numbered list" every time, you make a /review-changes skill that does it for you.
This is the whole reason I'm obsessed with turning repeat work into a tool. My website generator took 300+ hours to build, and now it handles what used to be 6 to 8 hours of manual work per site. A skill is a tiny version of that same move (minus the 300 hours, thankfully).
Project skills live in your project's .claude/skills/ directory. Each skill gets its own folder with a SKILL.md file inside, and the folder name becomes the command (so review-changes/ gives you /review-changes).
Want a skill in every project on your machine? Put it in ~/.claude/skills/ instead. Those are your personal skills, and they don't get committed with any one repo.
A skill file has two parts, the frontmatter on top and the instructions underneath.
| Field | Required | Description |
|---|---|---|
name | No | The slash command name. Leave it out and the folder name is used |
description | Recommended | What the skill does and when to use it. Claude reads this to decide when to load the skill on its own |
Every frontmatter field is optional, but write the description anyway. There are more fields for fancier stuff (like argument-hint, allowed-tools and disable-model-invocation), and Claude Code quietly ignores any field name it doesn't recognize, so a typo won't throw an error. It just won't do anything.
Skills can take arguments from you, too.
Usage. /component UserProfile and Claude builds a UserProfile component.
The $ARGUMENTS placeholder gets swapped for whatever you type after the command.
By default a skill works both ways. You can type /skill-name yourself, AND Claude can load it on its own when your request matches the skill's description. That's why a clear description matters so much.
Some skills you never want firing by surprise (deploys, commits, anything that touches production). Add disable-model-invocation: true and only YOU can kick it off.
Flip it around with user-invocable: false. The skill disappears from the / menu, but Claude can still load it as background knowledge when it's relevant.
Skills can point at other files sitting in their folder.
${CLAUDE_SKILL_DIR} gets swapped for the skill's own folder, so the path works whether the skill lives in the project or in ~/.claude/skills/. That way Claude follows your exact testing patterns every single time.
Since skills live in .claude/skills/, they're part of your git repo... which means sharing is basically free.
.claude/skills/ (project) or ~/.claude/skills/ (personal)description matters most, name is optional) plus the instructions$ARGUMENTS grabs whatever you type after the commanddisable-model-invocation: true to anything risky