Lead Gen Jay
Slash CommandsLesson 1 of 19

Overview

2 min readLesson 1

Slash commands are built-in shortcuts you type directly into the Claude Code prompt to trigger specific actions. Instead of describing what you want in plain English, you type a forward slash followed by a command name — like /help or /clear — and Claude executes that action immediately. Think of them as quick-access buttons for common tasks.

Slash commands matter because they save you time and reduce ambiguity. Typing /compact is faster and more reliable than asking "please summarize and compress this conversation." They also unlock capabilities you might not know exist, like switching models mid-conversation or loading a custom workflow you've saved as a skill.

Slash commands are shortcuts that control Claude's behavior during an interactive session. They come in several types:

  • Built-in commands: Provided by Claude Code (/help, /clear, /model)
  • Skills: User-defined commands created as SKILL.md files (/optimize, /pr)
  • Plugin commands: Commands from installed plugins (/frontend-design:frontend-design)
  • MCP prompts: Commands from MCP servers (/mcp__github__list_prs)

Note: Custom slash commands have been merged into skills. Files in .claude/commands/ still work, but skills (.claude/skills/) are now the recommended approach. Both create /command-name shortcuts. See the Skills Guide for the full reference.

To see every command available in your current session, type /help at the prompt. You'll get a list of built-in commands plus any custom skills or plugin commands you've installed. Some commands accept arguments — for example, /model sonnet switches to Claude Sonnet, and /compact can take an optional instruction like /compact focus on the auth changes.

Key takeaway: Start with the built-in commands — /help, /clear, /compact, and /model — to build muscle memory. Once those feel natural, you can create your own slash commands as skills to automate workflows you repeat often.