← Back to the A-Z glossary
AI glossary · P1

Slash command

A slash command is a short command that fires off a prepared instruction inside an AI tool.

Tools 4 min read Updated 2026-05-22
— Definition

Slash command, in plain words

A slash command is a short command that fires off a prepared instruction inside an AI tool.

Frame the /command pattern as a reusable shortcut for repetitive tasks.

A concrete example

I create /review, which kicks off a full code review. I type /review and Claude applies my process without me describing it again.

Why it matters

Slash commands turn a manual workflow into a button. You save hours on routine work.

You run into it in Claude Code, Codex CLI, the /memory, /agents, /review commands, and reusable workflows.

Don't mix it up with

Claude Code: Claude Code is Claude's agent: it reads a project, edits files, and runs commands with your approval.

CLAUDE.md: CLAUDE.md is the file where you write down a project's rules so Claude doesn't start from scratch.

Common mistakes

  • Creating a command for something you'll only do once.
  • Piling up 50 commands without deleting any.
  • Forgetting to version the commands in the repo.

Quick checklist

  • First I check whether the word names a concept, a tool, a risk, or a metric.
  • I tie it to a concrete case: I create /review, which kicks off a full code review. I type /review and Claude applies my process without me describing it again.
  • I keep the main trap in mind: Creating a command for something you'll only do once.

Quick questions

What is Slash command in AI?

A slash command is a short command that fires off a prepared instruction inside an AI tool.

Where will I run into Slash command?

You run into it in Claude Code, Codex CLI, the /memory, /agents, /review commands, and reusable workflows.

Which word should I read next?

Start with Claude Code, CLAUDE.md, Hook.

Want to keep going in order?

Head back to the full glossary, search a word, then open only the pages that deserve more than a short definition.

Open the AI glossary