You’ve heard “Skills” mentioned in Claude Code and you’re not quite sure what they are. Are they just fancy slash commands? Something totally different? Do you need them?
Skills are a newer addition to Claude Code, and they work differently from anything else in the tool. This article explains exactly what they are, how they work, and whether you should start using them.
📋 TL;DR
– A Skill in Claude Code is a reusable behavior defined in aSKILL.mdfile
– Unlike slash commands (which you trigger manually), Skills can be triggered automatically when Claude detects a relevant task
– Skills live in.claude/skills/and use a special file format with structured frontmatter
– They’re best for behaviors you want Claude to apply consistently, without having to ask every time
– Claude Code ships with built-in skills for common file types like PDF, DOCX, and XLSX
This is part of our complete Claude Code Slash Commands & Skills — Full Guide.
The Plain English Definition
A Skill is a set of instructions you write once, stored in a specific file format, that Claude Code can follow automatically — without you typing a command.
Here’s the key difference from slash commands: you call a slash command. Claude invokes a skill.
When you create a skill and Claude Code detects you’re working on a task that matches it, it reads the skill file and applies the instructions on its own. No /skillname required.
Think of it like the difference between calling a coworker and asking them to proofread your document versus having already told them once: “Whenever I share a document, proofread it before we discuss it.” After that conversation, they just do it. That’s a skill.
What a Skill File Looks Like
Skills live in .claude/skills/ and use a file format called SKILL.md. Here’s a real example:
# This is a SKILL.md file — Claude reads this automatically when the skill is triggered
---
name: git-commit
description: Writes a conventional commit message whenever I ask to commit changes
allowed-tools: Bash
---
# Git Commit Message Skill
When I ask you to write a commit message or commit my changes, follow these rules:
Use the Conventional Commits format:
<type>(<scope>): <description>
Types: feat, fix, docs, style, refactor, perf, test, chore
Rules:
- First line under 72 characters
- Imperative mood ("add" not "added")
- No period at the end of the first line
- Include a body only if the change needs context
Output the commit message only. Nothing else.
Notice the section between the --- marks at the top. That’s called frontmatter, and it’s what makes skills different from regular slash commands.
The frontmatter tells Claude Code three things:
name** — the identifier for this skilldescription** — when Claude should apply this skill automaticallyallowed-tools** — which Claude Code tools this skill can use
That description field is especially important. Claude reads it to decide when to invoke the skill. Write it like a trigger condition: “Whenever I do X, apply this skill.”
How Auto-Invocation Works
This is the part that surprises most people. Claude Code reads all the skill descriptions at the start of a session. When you start working on something, Claude checks: does any skill’s description match what I’m doing right now?
If yes — Claude applies the skill without you asking.
Here’s a concrete example. Say you have a skill with this description:
# Frontmatter from a SKILL.md that triggers automatically on code review requests
---
name: code-review
description: Apply this skill when the user asks me to review code or check their work
allowed-tools: Read
---
Now you say to Claude: “Take a look at this function and tell me if anything looks off.”
Claude recognizes this as a code review request, finds your code-review skill, reads the full instructions, and applies them — without you typing /review or anything else.
💡 Pro Tip: Write your skill’s
descriptionfield as if you’re telling Claude exactly when to use it. Vague descriptions lead to skills that never trigger. Precise descriptions lead to skills that trigger at exactly the right moments.
Skills vs Slash Commands: The Core Difference
The single clearest way to understand the difference:
- Slash commands** — you control when they run. You type
/commit. It runs. - Skills* — Claude decides when they run. You describe what you’re doing*. Claude applies the skill if it matches.
Both let you give Claude reusable instructions. The difference is in who pulls the trigger.
The full comparison is in Skills vs Slash Commands — What’s the Difference?, but for now: if you find yourself typing the same slash command at the start of nearly every task, that’s a candidate to become a skill instead.
Where Skills Live
Skills follow the same project vs. global pattern as slash commands:
Project-level skills:
your-project/
└── .claude/
└── skills/
└── your-skill.md
Global skills:
~/.claude/
└── skills/
└── your-skill.md
Project-level skills only apply inside that project. Global skills apply everywhere on your machine.
To create the skills folder:
# Creates the skills folder in your current project
mkdir -p .claude/skills
Built-in Skills That Come With Claude Code
Claude Code ships with built-in skills for handling specific file types. These are already active — you don’t need to create them.
The built-in skills cover:
- PDF** — reading, extracting, and summarizing PDF files
- DOCX** — working with Word documents
- XLSX** — reading and analyzing Excel spreadsheets
- PPTX** — extracting content from PowerPoint presentations
When you ask Claude Code to work with one of these file types, it automatically applies the relevant skill — which includes optimized instructions for handling the format correctly.
All four are covered in detail in Built-in Claude Code Skills — PDF, DOCX, XLSX, PPTX.
A Real Example: The Difference in Practice
Say you want Claude to always write documentation when you finish a function.
With a slash command: You’d have to remember to type /docs after writing every function. If you forget, you get no documentation.
With a skill: You write a skill with a description like: “Apply this skill when the user has just finished writing a function and asks what to do next.” Now when you say “Okay, the function’s done — what’s next?” Claude recognizes the pattern, applies the skill, and writes the documentation before you even asked.
That’s the practical value of skills. They reduce the number of things you have to remember to do.
When to Use Skills (and When Not To)
Good use cases for skills:
- Behaviors you want applied to nearly every session of a certain type
- Formatting and style requirements you always want Claude to follow
- Document handling for file types your project works with constantly
- Workflow steps that should happen automatically, not on demand
Stick with slash commands when:
- You only want the behavior sometimes — not every time
- You need to control exactly when it runs
- The task is one-off or occasional
💡 Pro Tip: A skill is a commitment. You’re telling Claude “always do this when relevant.” If you find yourself turning a skill off frequently, it’s probably better as a slash command.
The Skill Frontmatter Fields
The three frontmatter fields control everything about how a skill behaves:
name — A short identifier. Used internally. Keep it lowercase with hyphens, like code-review or git-commit.
description — The trigger condition. This is what Claude reads to decide whether to invoke the skill. Write it clearly and specifically.
allowed-tools — Which Claude Code tools the skill can use. Common values: Read, Bash, Write. Restricting tools limits what the skill can do — which can be a useful safety measure.
The full breakdown of each field, with examples, is in Skill Frontmatter Explained — name, description, allowed-tools.
Common Misconceptions
“Skills replace slash commands.”
No — they complement them. Skills handle automatic, recurring behaviors. Slash commands handle explicit, on-demand actions. Most Claude Code power users use both.
“Skills are just CLAUDE.md with a different name.”
CLAUDE.md is project-level context that Claude always has. Skills are specific behavior modules that trigger conditionally. Different purposes.
“If I create a skill, it always runs.”
Skills only run when Claude determines they’re relevant based on the description field. A poorly written description means a skill that never triggers. A very broad description means a skill that triggers too often.
Key Takeaways
- A Skill is a
SKILL.mdfile in.claude/skills/that defines reusable behavior Claude can apply automatically - The frontmatter (the
---section) tells Claude when to invoke the skill via thedescriptionfield - Skills are triggered by Claude based on context; slash commands are triggered by you typing a command
- Claude Code ships with built-in skills for PDF, DOCX, XLSX, and PPTX
- Skills and slash commands are complementary — use both
Next Steps
- Understand the full comparison:** Skills vs Slash Commands — What’s the Difference?
- Build your first skill:** How to Create a Skill in Claude Code (With SKILL.md)
- See the built-in skills:** Built-in Claude Code Skills — PDF, DOCX, XLSX, PPTX
Return to Claude Code Slash Commands & Skills — Full Guide for the full picture.