Reactify Solutions

Slash commands

A slash command is a saved prompt template you trigger yourself by typing /name. Use one for a procedure you want to run exactly, on demand, without Claude deciding when to reach for it.

Claude CodeLast reviewed September 3, 2026
In one minute
  • A slash command is a prompt template you trigger by typing /name in the chat input.
  • As of 2026, a single-file slash command and a skill are the same underlying feature. The single-file form still works, but it is the older pattern.
  • $ARGUMENTS captures everything you type after the command name. $1, $2 capture positional arguments individually.
  • disable-model-invocation: true locks the command to manual use only — Claude will never call it on your behalf.

What it is

A slash command is an explicit prompt template you trigger yourself by typing /name. The difference from a skill is that Claude does not decide to use it on your behalf unless you allow that. You are always the one pulling the trigger.

The smallest working example

.claude/commands/commit.md
---
description: Create a git commit with a conventional message
allowed-tools: Bash(git add:*), Bash(git commit:*)
argument-hint: [message]
---
# Commit Changes
!`git diff --cached`

Create a commit message following Conventional Commits. If $ARGUMENTS is provided, use it.
  • $ARGUMENTS captures everything typed after the command name. $1, $2 capture positional arguments individually.
  • allowed-tools scopes exactly what this command may run. Useful for a command you want to trust without reviewing every time.
  • The ! prefix runs a command and inserts its output before your prompt reaches Claude, same as in a skill.
Check it worked.

Type /commit fix login bug. Claude drafts a commit using your staged diff and the text you passed as $ARGUMENTS.

How it behaves

  • Files live in .claude/commands/ (project) or ~/.claude/commands/ (personal). The filename becomes the command name.
  • disable-model-invocation: true means only you can trigger it by typing the slash command. The model itself will never call it automatically.
  • Subdirectories create namespaces: .claude/commands/frontend/component.md becomes /frontend:component.
  • If a skill and a command share a name, the skill wins.

When not to use one

A slash command is for a procedure you want to trigger explicitly, every time. If it should fire automatically when Claude recognises the right moment, that is a skill. If you need to keep noisy work out of your main conversation, that is a subagent. If the task fans out across multiple agents in a fixed structure, that is a workflow.

Last reviewed September 3, 2026 · verified against Anthropic's Claude Code docs, Sep 2026