The difference between Claude Code Skills and slash commands.
Claude Code Skills and the slash command both automate repetitive tasks, but they work differently. Let's explore when to use either Claude Code Skills or the slash command, and how to build both effectively.
- Two tools, one goal: Automating repetitive tasks in Claude Code
- What are slash commands in Claude Code?
- What are skills in Claude Code?
- The core difference between Claude Code Skills and slash commands.
- When should you use the slash command?
- When should you use a skill?
- Built-in slash commands
- Custom slash commands
- The technical way the skill works.
- The MCP server acts as a skill distribution mechanism.
Two tools, one goal: Automating repetitive tasks in Claude Code
Anyone who uses Claude Code for a few days will notice the same pattern: You're constantly typing the same instructions, performing the same setup steps, and rephrasing the same context. Claude Code offers two distinct ways to overcome this—the slash and skill commands—and most users don't understand the difference between them or which one to use.
This article will analyze both approaches. You'll learn what slash commands and Claude Code Skills really are, how each works, and the real-world situations where one is more effective than the other. Whether you're building alone or setting up a workflow for a team, understanding these differences correctly will save you real time.
What are slash commands in Claude Code?
Slash commands are text-based shortcuts that insert pre-written instructions into your Claude Code session. Type / into the terminal, and Claude Code will show you a list of available commands. Some are built-in. Others are custom-made.
Built-in slash commands
Claude Code comes with a native slash command set that handles session management and common developer tasks:
/help— List the available commands and how to use them/clear— reset conversational context/compact— Summarize the conversation to save space in the context window./cost— Displays the number of tokens consumed by the current session/doctor— Run a check of your Claude Code setup status/model— Switching the active model between sessions/memory— Edit your project's memory file CLAUDE.md
These are very useful, but the more interesting category is the custom slash commands.
Custom slash commands
You can create your own slash commands by placing markdown files in specific directories:
- Project-level commands are located in the .claude/commands/ file inside your project directory. They are available to anyone working on that project.
- User-level commands are located in ~/.claude/commands/ in your home directory. They follow you through every project.
Each file becomes a command. A file named review.md will become /project:review or /user:review depending on its location.
Inside the file, you write a prompt template. Claude treats the contents of the file as instructions when you call a command. You can also include a placeholder variable $ARGUMENTSto pass dynamic input at runtime — so /project:review src/auth.ts will replace $ARGUMENTS with src/auth.ts in your statement.
Here's a simple example. A file at .claude/commands/test-coverage.md might contain:
Analyze the test coverage for $ARGUMENTS. Identify which branches are untested, suggest specific test cases, and flag any logic that's particularly risky to leave uncovered.
Call it using `@payments` /project:test-coverage src/payments/and Claude will run that analysis on the payments directory.
Slash commands are input text, output text. They shape what Claude does by controlling the statement. They don't give Claude any new capabilities—they just make existing prompts reusable and shareable.
What are skills in Claude Code?
Instead of prompt templates, skills are programming tools that extend what Claude can actually do. They give Claude access to external functions, APIs, and services that he would otherwise be unable to access.
The technical way the skill works.
Claude Code supports tool usage through two main mechanisms: direct function definition and integration with an MCP (Model Context Protocol) server.
When a skill is registered, Claude knows that it can call that tool by name, with specific inputs, and receive a structured output. Claude infers when to use a tool based on what it's trying to accomplish. This is different from slash commands, where you explicitly call a specific action.
Skills for running code. A skill can include:
- Search the web and return structured results.
- Send emails via SMTP service.
- Query the database and return the rows.
- Creating images using the diffusion model
- Post to Slack, update Jira tickets, or upload files to S3.
The MCP server acts as a skill distribution mechanism.
MCP is Anthropic's open standard for connecting AI models to external tools. The MCP server provides a set of tools that Claude Code can call. After you configure the MCP server in the ~/.claude/mcp.json file or project-level configuration, those tools will be available in your session.
This is where skills come into play. Instead of writing a prompt like "please check if this code has any security vulnerabilities," you can provide Claude with a skill that actually calls a static analysis API and returns real results.
Disadvantages : The skills require more complex setup. You need to configure an existing MCP server or build a new one yourself. This is more work than simply copying a markdown file to a directory.
The core difference between Claude Code Skills and slash commands.
This is the clearest way to express it:
| Slash command | Zinc | |
|---|---|---|
| Define | Prompt template | Callable functions/tools |
| How Claude used them | You call them explicitly. | Claude automatically uses them when needed. |
| Setup complexity | Low — write a markdown file | Higher level — configuring or building tools/MCP server |
| What they can do | Shaping Claude's argument and results | Perform practical actions on external systems. |
| Input | Textual arguments | Type parameters |
| Output | Written response | Structured data + text |
| Share | Commit .claude/commands/to archive |
Share MCP server configuration or npm package |
| Best for | Reusable guides and workflows | Integration and action in the real world. |
The slash command describes how Claude thinks. The skill describes what Claude can touch.
When should you use the slash command?
The slash command is the right choice when your main problem is prompt repetition — you're constantly giving Claude the same context or instruction, and you want a faster way to trigger that behavior.
Situations where the slash command is effective:
Standardize code review . If you always want Claude to check the same things—security, performance, test coverage, naming conventions—the slash command will record that checklist once and make it immediately reusable.
Context guidance . New team members can run through it /project:setupand get a full explanation of the codebase conventions, common errors, and where to start. No one needs to rewrite anything.
Iterative debugging process . When you're in a debugging session and repeatedly asking Claude to track down a specific type of error, the slash command standardizes the approach so you don't have to explain it again every time.
The document template command /project:document-functioncan instruct Claude to create JSDoc annotations in a specific format, with specific sections, each time—without you having to manually specify the formatting.
Team consistency . Including the .claude/commands/ file in your repository means everyone in the team uses the same prompt for the same task. Less deviation, less inconsistency.
Key takeaway : If your problem is 'I keep writing the same prompts', then the slash command will solve that problem. They are less disruptive, easy to maintain, and don't require infrastructure.
When should you use a skill?
Skill is the right choice when you need Claude to do something beyond reasoning and text generation — when it needs to interact with external systems, trigger practical actions, or work with structured data from external sources.
Situations where skills are necessary:
Send a notification or email . The slash command can tell Claude how you want to format the email draft. The skill can actually send the email.
Make API calls . If Claude needs to check deployment state, query a database, or retrieve data directly from an external service, that requires a tool—not a prompt template.
Creating assets . Creating images, videos, and other media tasks requires a callable capability to route to the appropriate model and return the results.
Connecting multi-step workflows . When Claude needs to search for something, process the results, and then perform an action based on what it finds, you need skills at each step—not just better prompts.
Interacting with your infrastructure . Skills can include using CLI tools, calling Docker APIs, running test suites, or triggering CI/CD pipelines. Prompt templates can describe these things, but they cannot execute them.
Key takeaway : If your problem is 'Claude can't access what it needs to work', then the skills will solve that problem. They extend Claude's scope from text to action.
- Core commands in Claude Code
- What is Claude Skills?
- This Claude Code mode is a worthy competitor to other IDEs.
- What is the Claude Code?
- The skill and plugin ecosystem in Claude Cowork
- How to combine Claude Code with Obsidian CLI
- 10 essential skills for Claude (and any programming agent)
- When should you not use Claude Code?