You’ve learned that Claude Code has both slash commands and skills. Now you’re wondering: when do you actually use each one? Can they do the same things? Do you need both?
The short answer: they solve different problems. This article gives you the clearest possible comparison so you can make the right choice for each situation.
📋 TL;DR
– Slash commands are manually triggered — you type/commandnameto run them
– Skills are automatically triggered — Claude invokes them when it detects a relevant task
– Both store reusable instructions; the difference is who decides when to use them
– Slash commands give you control; skills give you automation
– Most power users use both — they’re not competing, they’re complementary
This is part of our complete Claude Code Slash Commands & Skills — Full Guide.
The One-Sentence Version
Slash commands: You pull the trigger.
Skills: Claude pulls the trigger.
Everything else flows from that distinction.
How They’re Similar
Before getting into differences, it helps to understand what slash commands and skills have in common:
- Both store reusable instructions in plain Markdown files
- Both live inside the
.claude/folder in your project (or globally in~/.claude/) - Both let you define exactly how you want Claude to behave for a specific task
- Both can be project-level or global
- Both can include detailed, multi-step instructions
If you’ve built a slash command before, creating a skill will feel familiar. The content of the files is similar. The structure is slightly different.
How They’re Different
File Format
Slash commands are simple .md files. No special structure required. Write your instructions and save the file.
# This is a slash command file — plain markdown, no special format required
Review the code I'm working on. Check for bugs, naming issues, and suggest one improvement.
Format the response with three clear sections. Keep it under 200 words.
Skills use SKILL.md and require a frontmatter block at the top — a structured header between --- marks:
# This is a SKILL.md file — notice the frontmatter block at the top
---
name: code-review
description: Apply this skill when the user asks me to review their code
allowed-tools: Read
---
Review the code I'm working on. Check for bugs, naming issues, and suggest one improvement.
Format the response with three clear sections. Keep it under 200 words.
The frontmatter is what Claude reads to decide when to use the skill.
File Location
Slash commands: .claude/commands/
Skills: .claude/skills/
Same parent folder, different subfolder.
How They’re Triggered
This is the fundamental difference.
Slash commands require you to type the command:
# You type this explicitly to run a slash command
/review
Claude does nothing until you type that. You are in full control of when it runs.
Skills are triggered by Claude’s interpretation of the conversation:
- You say: “Can you look over this function for me?”
- Claude reads its loaded skills
- Claude finds a skill with description: “Apply when the user asks me to review their code”
- Claude applies the skill automatically
You never typed /review. Claude decided the situation matched the skill.
Side-by-Side Comparison
| Feature | Slash Commands | Skills |
|---|---|---|
| **File format** | `.md` | `SKILL.md` with frontmatter |
| **Folder** | `.claude/commands/` | `.claude/skills/` |
| **Trigger** | You type `/commandname` | Claude decides when relevant |
| **Control** | You decide when it runs | Claude decides when it runs |
| **Setup complexity** | Lower | Slightly higher (frontmatter required) |
| **Best for** | On-demand, explicit tasks | Recurring, automatic behaviors |
| **Works globally?** | Yes (`~/.claude/commands/`) | Yes (`~/.claude/skills/`) |
| **Built-in options?** | Yes | Yes (PDF, DOCX, XLSX, PPTX) |
When to Use a Slash Command
Choose a slash command when:
You want deliberate control. Some tasks should only happen when you explicitly ask for them. A deployment checklist, for example — you don’t want that running automatically every time you change a file. You want to call it when you’re actually ready to deploy.
The task is occasional, not constant. If you use a behavior once every few days, a slash command is fine. You’ll remember to type it when you need it.
You need to pass specific input. Slash commands can accept arguments — you can type /commit "refactor auth module" and pass context. This explicit input model is clean and predictable.
You want to force a specific behavior right now. Sometimes you want code reviewed your way, right now, not based on what Claude thinks is relevant. /review runs your command. Full stop.
When to Use a Skill
Choose a skill when:
You always want it applied to a certain type of task. If you always want Claude to write conventional commit messages whenever commits come up — and you’re tired of typing /commit every time — that’s a skill.
The behavior should be transparent. Skills work in the background. You have a natural conversation, and Claude quietly applies the right behavior without you managing it. This is ideal for style preferences, formatting requirements, or consistent output formats.
You’re working with specific file types. The built-in skills for PDF, DOCX, XLSX, and PPTX are great examples — Claude applies optimized handling for those files automatically. You don’t think about it.
You want to encode team standards. A skill with the description “apply our Python coding standards whenever reviewing or writing Python code” means those standards are always in effect, without anyone having to remember to invoke them.
The Same Task as a Command vs a Skill
Here’s the same code review behavior implemented both ways, so you can see the concrete difference:
As a slash command (.claude/commands/review.md):
# /review — manually triggered code review
Review the code I'm working on:
1. Flag bugs and logic errors
2. Point out unclear naming
3. Suggest one readability improvement
Keep the response under 200 words. Use three clear headers.
You call it explicitly: /review
As a skill (.claude/skills/code-review.md):
# SKILL.md — auto-triggered code review skill
---
name: code-review
description: Apply this skill whenever the user asks me to look at, check, or review their code
allowed-tools: Read
---
When reviewing code, always use this checklist:
1. Flag bugs and logic errors
2. Point out unclear naming
3. Suggest one readability improvement
Keep the response under 200 words. Use three clear headers.
Claude applies it automatically when you say things like “take a look at this” or “does this look right to you?”
Same instructions. Different trigger mechanism.
Can You Use Both at the Same Time?
Yes — and most experienced Claude Code users do.
A common pattern is to have a skill for your general coding standards (always applied) and slash commands for specific, on-demand tasks (called when needed).
For example:
- Skill:** “Always follow PEP 8 when writing or reviewing Python” — runs automatically
- Slash command
/review:** A deep code review — run when you specifically want it - Slash command
/commit:** Write a commit message — run when you’re ready to commit
The skill handles the always-on behavior. The commands handle the deliberate actions.
💡 Pro Tip: Start with slash commands. They’re simpler to set up and easier to understand. Once you notice patterns — behaviors you trigger almost every session — convert those to skills.
Common Mistakes
Building a skill for something you only do occasionally
Skills are always listening. If your skill description is too broad, it’ll trigger when you don’t want it. Save skills for truly recurring behaviors.
Building a slash command for something that should always be on
If you find yourself typing the same command at the start of every session without fail, it’s time to make it a skill. You’re doing work Claude could be doing for you.
Writing a vague skill description
The description field is what tells Claude when to invoke the skill. “Use this skill sometimes” is useless. “Apply this skill when the user asks me to review, check, or inspect code” is useful.
Key Takeaways
- Slash commands:** manual, explicit, you’re in control — use for on-demand tasks
- Skills:** automatic, contextual, Claude decides — use for recurring behaviors
- Both store reusable instructions in plain Markdown
- They live in different subfolders:
commands/vsskills/ - Use both together — they’re designed to complement each other
Next Steps
- Create your first skill:** How to Create a Skill in Claude Code (With SKILL.md)
- Understand skill frontmatter in depth:** Skill Frontmatter Explained — name, description, allowed-tools
- See how auto-invocation works:** How Claude Auto-Invokes Skills (vs Manual Commands)
Return to Claude Code Slash Commands & Skills — Full Guide for the full picture.