Lv.1 0 XP

Slash Commands — Project and User-Scoped Shortcuts

Core 8 min +30 XP
💡
THE ANALOGY

Keyboard shortcuts vs typing menu paths. Both do the same thing — but a keyboard shortcut executes a complex sequence in one keystroke. Slash commands are keyboard shortcuts for Claude Code workflows — one command triggers a complete, consistent workflow.

⚠️ EXAM TRAP — The Wrong Answer People Choose

Confusing project-scoped commands (in .claude/commands/) with user-scoped commands (in ~/.claude/commands/). Project commands are shared via git. User commands are personal and not shared.

KEY POINTS
1 Slash commands are reusable prompt templates invoked with /command-name in Claude Code.
2 Project-scoped commands live in .claude/commands/ — committed to git, shared with team.
3 User-scoped commands live in ~/.claude/commands/ — personal, not shared.
4 Commands support $ARGUMENTS placeholder for passing context at invocation time.
5 Commands can specify allowed-tools in frontmatter to control which tools Claude can use when the command runs.