Lesson format
Reading lesson with structured written material and clear navigation inside the course flow.
Reading lesson with structured written material and clear navigation inside the course flow.
This lesson is free and open to all visitors.
You've been using Claude Code by typing natural language prompts. But what if you could save your best prompts as reusable commands that you invoke with a single slash? That's exactly what Skills are.
A skill in Claude Code is a Markdown file that contains a prompt template. When you type /skill-name in Claude Code, it loads the contents of that file and executes it as an instruction. Think of skills as saved prompts on steroids — they're reusable, shareable, and can accept parameters.
Here's the simplest possible skill — a file called review.md:
Review the current git diff and provide:
1. A summary of changes
2. Potential bugs or issues
3. Suggestions for improvement
Now instead of typing all that every time, you just type /review. Claude loads the prompt and executes it. That's it — that's a skill.
Claude Code comes with a few built-in slash commands that work out of the box:
| Command | What it does |
|---|---|
/init | Creates a CLAUDE.md file for your project |
/clear | Clears the conversation context |
/compact | Compresses the conversation to save context space |
/cost | Shows token usage and cost for the current session |
/help | Shows available commands and help info |
/model | Switch between Claude models |
These are useful, but the real power comes from custom skills — commands you create yourself for your specific workflow.
Without skills, every time you want Claude to do something complex, you need to type or paste a detailed prompt. This leads to:
Skills solve all three problems:
When you type /my-command in Claude Code, here's what happens:
my-command.md in the skills directories/my-command some text), that text is available as a parameterThe search order for skill files is:
.claude/commands/ in your project root~/.claude/commands/ in your home directoryProject-level skills override user-level ones if they have the same name. This means a team can define project-specific skills that take priority over your personal ones.
Here's a slightly more advanced skill — .claude/commands/commit.md:
Look at the current git diff (staged and unstaged changes).
Write a concise, meaningful commit message that:
- Starts with a verb (Add, Fix, Update, Remove, Refactor)
- Summarizes the "why" not just the "what"
- Is under 72 characters for the first line
- Adds a blank line and bullet points for details if needed
Stage all changes and create the commit.
Type /commit and Claude analyzes your changes, writes a great commit message, and creates the commit. Every single time. No thinking about what to type.
Skills transform Claude Code from a chat interface into a programmable development assistant. Instead of explaining what you want each time, you encode your best practices once and reuse them forever.