Your complete guide to slash commands Claude Code

Kenneth Pangan
Written by

Kenneth Pangan

Last edited September 10, 2025

Let’s be real, a big part of any developer’s day can feel like you’re stuck in a loop. You’re running the same git commands, scaffolding the same components, and checking for the same linting errors over and over again. AI coding assistants have definitely helped, but you often find yourself typing out the same lengthy instructions. What if you could just package up those multi-step workflows and run them with a single, simple command?

That’s pretty much the whole idea behind slash commands in Claude Code. They’re a key part of Anthropic’s command-line interface for agentic coding, and they can make a huge difference in your daily productivity. Think of them as custom spells for your most common development tasks.

This guide will walk you through everything you need to know about slash commands Claude Code. We’ll cover what they are, how to build your own custom commands from the ground up, and look at some practical examples you can start using today. We’ll also touch on their limits and figure out when it’s time to move from a command-line tool to a full-blown automation platform for your entire business.

What are slash commands in Claude Code?

In Claude Code, slash commands are basically shortcuts you type into the chat, starting with a /, to run specific, pre-defined tasks. Instead of writing out a long prompt every single time you want to check your code for security flaws or create a new component, you can create a command that handles it all in one go.

Their main purpose is to make your life easier by helping you:

  • Automate your common tasks: Have a five-step process for creating a new pull request? You can turn that into a one-line /create-pr command.

  • Keep processes consistent: By creating project-specific commands, you can make sure everyone on your team follows the exact same steps for deployments, testing, or code reviews.

  • Use fewer tokens: Complex instructions can eat up a lot of space in your context window. Storing them in an external command file saves tokens and keeps your main chat with Claude feeling clean and focused.

These commands come in two main flavors: built-in and custom. The built-in ones are the standard tools that ship with Claude Code for managing your session. The custom commands are where the real fun begins, letting you build your own automations.

FeatureBuilt-in CommandsCustom Commands
PurposeManage the Claude Code session and settings.Automate project-specific or personal workflows.
CreationIncluded with Claude Code by default.Created by users as Markdown (.md) files.
Example/clear, /help, /permissions/deploy, /run-tests, /new-component
CustomizationNot customizable.Fully customizable prompt and logic.

The building blocks of custom slash commands

Creating your own slash commands is a lot less intimidating than it sounds. It all boils down to creating simple Markdown files and putting them in the right folders. Let’s break down the key parts you’ll use to build some useful and dynamic automations.

Project vs. personal command scope

First up, you need to decide where your command is going to live. This determines who can use it and in what context.

  • Project commands: You store these in a .claude/commands/ directory right inside your project’s repository. The great thing about this is that they get checked into version control, so anyone who clones the repo gets the same set of standard commands. It’s perfect for team-wide workflows like running integration tests or deploying to a staging environment.

  • Personal commands: These live in a central ~/.claude/commands/ folder in your home directory. These are your personal productivity shortcuts, and they’re available to you in any project you’re working on. For instance, you could have a /security-review command that reflects your personal checklist, and you can use it anywhere without copying the file into every project.

Making slash commands dynamic with arguments

A command that does the exact same thing every time is handy, but one that can adapt to different inputs is a real superpower. Claude Code lets you pass information to your commands using arguments.

The most common way is with the $ARGUMENTS placeholder. This special variable grabs all the text you type after the command itself. For example, you could create a command file for /fix-issue.md that contains the prompt: "Review and fix the bug described in GitHub issue #$ARGUMENTS."

When you run /fix-issue 123 in the terminal, Claude swaps $ARGUMENTS with "123," giving the AI the specific context it needs to get to work. You can also use positional arguments like $1, $2, and so on, for more structured commands where you need to pass a few different pieces of information.

Advanced control with frontmatter

For even more fine-grained control, you can add a block of YAML, known as "frontmatter," to the very top of your command’s Markdown file. This lets you set up some metadata about how your command should behave.

Some of the most useful frontmatter fields are:

  • description: A quick, simple explanation of what your command does. This shows up when you run /help, making it easy to remember what’s available.

  • argument-hint: This gives users a little hint about what kind of arguments the command is expecting (e.g., [issue-number] [priority]).

  • model: You can use this to force a command to run with a specific model, like claude-3-5-sonnet-20240620, which is great for tasks that need a particular model’s strengths.

Practical examples of slash commands

Theory is one thing, but let’s see how this stuff actually works in practice. Here are a few real-world examples of how you can use slash commands to cut down on the daily grind.

Streamlining git and deployment workflows

Version control and deployments are full of repetitive command sequences. A custom slash command can bundle them into a single, easy-to-remember action.

For example, a /commit command can automate your whole commit process. Instead of manually checking the status, staging files, writing a message, and pushing, you can create a commit.md file that tells Claude to do it all for you, maybe even following the conventional commit standard.

Likewise, a /deploy-check command can act as a final quality check before you ship code. You can set it up to run your linter, execute the full test suite, and run a production build, catching any last-minute slip-ups before they become bigger problems.

Automating content and project management

If you work on something like a documentation site or a blog built with a static site generator like Hugo, slash commands can save you a ton of time.

Let’s say you need to create a new blog post. You could make a /new-post "$ARGUMENTS" command. The Markdown file for this command would include instructions to:

  1. Generate a filename using today’s date and a slugified version of the title (which is $ARGUMENTS).

  2. Create the new Markdown file in the right content folder.

  3. Fill out the file with the necessary frontmatter, like the title, date, and draft: true.

You could also create a /check-links "$ARGUMENTS" command that reads a file and uses Claude’s browsing tools to make sure every single hyperlink is still active, which helps you avoid those embarrassing 404s.

Enforcing code quality and consistency

Custom commands are also great for making sure code quality and security standards are being met across the board.

  • /security-review: You can create a command that holds your team’s standard security checklist. When you run it on a file, it tells Claude to look for common vulnerabilities like SQL injection, cross-site scripting (XSS), or insecure direct object references.

  • /refactor: This could be a command that applies modern coding patterns to older parts of your codebase. You could tell it to convert class components to functional components in React, or replace old promises with async/await syntax, helping you keep the code clean and up-to-date.

This video provides a live coding demonstration of how to build and use simple slash commands in Claude Code for practical development tasks.

Limitations of slash commands in Claude Code

As useful as slash commands Claude Code are for developers, they’re definitely a specialized tool for a specific audience. When you zoom out and look at what a whole business needs for automation, you start to see their limits pretty quickly.

The technical barrier for non-developers

Let’s be honest: creating slash commands means you’re living in the command line. You have to be comfortable finding hidden directories, creating and editing Markdown files, and understanding ideas like arguments and frontmatter. This is all second nature to a developer, but it’s a non-starter for your coworkers in customer support, sales, or IT.

A support agent with a brilliant idea for automating ticket responses can’t just whip up a slash command. They need a user-friendly, visual interface where they can build and manage automations without having to write a single line of code.

The challenge of automating business workflows

The tricky part of business automation isn’t just about running scripts; it’s about connecting all the different tools where people actually do their work. While Claude Code has something called the Model Context Protocol (MCP) for integrations, setting up an MCP server to talk to your helpdesk or CRM is a big project that needs serious developer time.

Your support team needs to connect to Zendesk and Shopify without a fuss. Your IT team needs to work with Jira Service Management and a knowledge base in Confluence. These kinds of workflows need simple, one-click integrations, not complex, custom-built connectors that take weeks to set up.

Moving from slash commands to a collaborative AI platform

This is the point where you graduate from a developer-focused tool to a platform that’s designed for team-wide business automation. Real operational efficiency happens when anyone in the company can automate their own tedious tasks.

This is where a different kind of tool, like eesel AI, comes into the picture. eesel AI is built to give powerful, accessible automation to entire teams, not just developers. It’s a bit different because it’s:

  • Radically self-serve: You can sign up and launch an AI agent that connects to your tools in just a few minutes, all from a visual dashboard. No sales calls, no mandatory demos, and definitely no command line.

  • Powered by one-click integrations: It instantly connects to dozens of key business apps like Freshdesk, Intercom, Slack, and Google Docs. eesel AI brings all your knowledge together without needing a developer to build custom pipelines.

  • A fully customizable workflow engine: Non-technical users get all the power of custom automation without touching any code. They can use a simple prompt editor to define their AI’s persona, tone of voice, and what actions it can take, from escalating a ticket to looking up order information.

CapabilityClaude Code slash commandseesel AI Workflow Automation
Target UserDevelopers, technical usersEntire business teams (Support, IT, Ops)
SetupManual creation of .md files in CLIVisual, self-serve dashboard
CustomizationRequires editing Markdown/YAMLNo-code prompt editor and action builder
IntegrationsDeveloper-led (MCP servers)100+ one-click business integrations
Use CaseCode refactoring, git workflows, deploymentsTicket triage, drafting replies, internal Q&A

The takeaway on slash commands

Slash commands in Claude Code are a fantastic tool for boosting developer productivity. They offer a deep level of customization that lets you automate complex, code-heavy tasks, which can save a ton of time and keep things consistent across projects. If you’re a developer who spends most of your day in the terminal, they’re an essential tool to get familiar with.

But that power is also very specialized. For the kind of AI automation that can really change how an entire business operates, you need something that’s more accessible, integrated, and built for teamwork. To give every team member that same automation superpower, you need a platform that meets them where they already work.

Automate more than just your command line

Ready to give your entire support team AI automation they can actually build and manage themselves? eesel AI plugs into your existing helpdesk and knowledge sources to automate frontline support in minutes, not months. Start your free trial today.

Frequently asked questions

You should create project-specific commands by placing your Markdown files in a .claude/commands/ directory at the root of your repository. When you check this folder into version control, every team member who clones the project will have access to the same standardized commands.

You can use the $ARGUMENTS placeholder inside your command’s Markdown file to capture all the text that follows the command. For example, if you run /refactor component.js, the value of $ARGUMENTS within your prompt will be "component.js".

Yes, you can use the built-in /help command to list all available personal and project commands. To make your custom commands more useful in this list, be sure to add a description field to the YAML frontmatter in your Markdown file.

Generally, no. Slash commands are designed for automating local development and coding workflows within your terminal. Connecting to and automating external business applications requires a different type of tool built for API integrations.

The biggest benefits are efficiency and consistency. Commands save you from retyping complex instructions for common tasks and ensure that everyone on the team performs those tasks in the exact same way, which is great for things like deployments or code reviews.

Share this post

Kenneth undefined

Article by

Kenneth Pangan

Writer and marketer for over ten years, Kenneth Pangan splits his time between history, politics, and art with plenty of interruptions from his dogs demanding attention.