3.2 Slash Commands
Course: Claude Code - Essentials Section: Basic Input & Interaction Video Length: 2-5 minutes Presenter: Daniel Treasure
Opening Hook
Typing the same prompt over and over is like writing the same email a hundred times. Slash commands are shortcuts—quick actions that save seconds per keystroke. When you use them a dozen times a day, those seconds add up to hours per month.
Key Talking Points
- What Are Slash Commands?
- Start with
/(e.g.,/help,/clear,/mcp) - Built-in actions that don't require full prompts
- Control Claude Code's behavior without asking Claude to do things
-
Different from asking Claude a question
-
Most Common Commands (Daily Use)
/help- Shows all available commands (your reference)/clear- Nukes conversation history for fresh session/config- View/modify configuration settings-
/permissions- See and manage tool access rules -
Session Management Commands
/resume- Pick up a previous conversation/compact- Compress conversation to save tokens (useful for long sessions)/init- Set up project memory and rules (one-time setup)-
/memory- Open CLAUDE.md for editing -
Performance Commands
/fast- Toggle fast mode on/off (2.5x faster Opus at higher cost — ↯ indicator)-
/model- Switch between models mid-session -
Advanced/Specialized Commands
/mcp- View/authenticate MCP servers (external tool integration)/plugins- Install/enable/disable extensions/add-dir- Grant access to additional directories/login- Re-authenticate if session expires-
/hooks- Manage automation triggers (advanced users) -
Context Management
- Type
/in a session to see all available commands - Type
/helpto get descriptions and examples -
Commands execute immediately (no confirmation needed for read-only ones)
-
The Difference: Commands vs. Prompts
- Command:
/clear(system action, instant) - Prompt: "Clear the conversation history" (Claude processes, might misinterpret)
- Commands are faster, more reliable, always work the same way
Demo Plan
Live Session Walkthrough (2-5 minutes):
-
Start Session
bash cd /path/to/project claude -
Demo /help (30 seconds)
- Type:
/help - Show the full command list
- Point out: "These are always available, instant reference"
-
Mention that
/typed alone also shows commands -
Demo /config (30 seconds)
- Type:
/config - Show current settings (model, permissions, etc.)
- Say: "Settings control Claude's behavior across the whole session"
-
Note: Can change settings here without editing files
-
Demo /permissions (45 seconds)
- Type:
/permissions - Show current permission rules
- Say: "This is where you control what Claude can do—read files, run bash, edit code"
-
Point out default mode (ask, plan, auto-accept, bypass)
-
Demo /clear (30 seconds)
- Type some questions to build conversation history
- Type:
/clear - Say: "Watch the history vanish—useful when you want a totally fresh start"
-
New conversation context saved separately (not lost)
-
Demo /compact (Optional, 30 seconds)
- After a long session with lots of back-and-forth
- Type:
/compact - Explain: "This compresses the conversation to save tokens on very long sessions"
-
Not needed in short videos, but important for production workflows
-
Demo Slash + Tab (30 seconds, if terminal supports)
- Type:
/and pause - Show autocomplete suggestions
- Type:
/he+ Tab = autocompletes to/help - Say: "Tab completion works for all commands"
Code Examples & Commands
Daily Commands
# Check what you can do
/help
# Start fresh conversation
/clear
# See your settings
/config
# Check what Claude can access
/permissions
# Get back a previous session
/resume
# Save tokens on long sessions
/compact
# Set up project memory
/init
Performance & Model
# Toggle fast mode (2.5x faster Opus, higher cost)
/fast
# Switch model mid-session
/model
Advanced Workflows
# Manage external tool integrations
/mcp
# Then authenticate GitHub, connect to Slack, etc.
# Grant access to another folder
/add-dir
# Choose directory, Claude gets access
# Install a plugin for additional skills
/plugins
# Edit project instructions
/memory
# Opens .claude/CLAUDE.md in your editor
# Manage automation rules
/hooks
# Add triggers for bash commands, tests, etc.
Gotchas & Tips
- Gotcha: /clear clears session but not saved history
/clear= wipes conversation from current session- But Claude saves session history (you can
/resumelater) -
If you want to truly delete a session, do that from the desktop app
-
Tip: /help is your reference
- Presenter should open /help during demo
- Viewers will know to type
/helpfirst thing in their own sessions -
More reliable than docs for beginners
-
Tip: Type / to see command list autocomplete
- Works in most terminals
- Tab completion fills in command names
-
Faster than remembering exact names
-
Gotcha: /login is rare but important
- Only needed if credentials expire
- Account issues =
/loginand re-authenticate -
Not a daily command
-
Tip: /permissions before asking Claude to do risky things
- Want Claude to run bash? Check
/permissionsfirst - Want Claude to edit files? Check
/permissionsfirst -
Prevents surprise permission prompts mid-task
-
Tip: /config + /permissions = your safety net
- Before a big automation task, check both
- Know your permission mode (default vs. plan vs. accept-all)
- Know which tools are allowed
-
Prevents accidents
-
Gotcha: Commands are case-sensitive
/helpworks/Helpor/HELPmight not work-
Always lowercase
-
Gotcha: Commands don't work in one-off mode
claude "ask a question"(one-off mode) can't use/help- Only in interactive mode:
claude→ then/help - One-off mode is for print, not interaction
Lead-out
Slash commands are built-in. Next: custom slash commands—commands you create to automate your own workflows. Want a /review-pr command? A /refactor-component command? That's the next video.
Reference URLs
- Official Docs - Built-in Commands: https://code.claude.com/docs/en/cli-reference (section: "Built-in Commands")
- Official Docs - Interactive Mode: https://code.claude.com/docs/en/quickstart (section: "Essential Commands")
- Official Docs - CLI Reference (full): https://code.claude.com/docs/en/cli-reference
Prep Reading
- Official: CLI Reference docs - shows all commands with descriptions
- Official: Quickstart - shows essential commands for beginners
- Context: From recent-articles.md: "Creator's Workflow" - shows Boris Cherny using custom commands frequently