1054 words Slides Slide Issue
Slide Issue: Incomplete Command List
Study Aide Available:Tape: 3.2-slash-commands.tapeCheatsheet: 3.2-slash-commands-cheatsheet.md

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

  1. What Are Slash Commands?
  2. Start with / (e.g., /help, /clear, /mcp)
  3. Built-in actions that don't require full prompts
  4. Control Claude Code's behavior without asking Claude to do things
  5. Different from asking Claude a question

  6. Most Common Commands (Daily Use)

  7. /help - Shows all available commands (your reference)
  8. /clear - Nukes conversation history for fresh session
  9. /config - View/modify configuration settings
  10. /permissions - See and manage tool access rules

  11. Session Management Commands

  12. /resume - Pick up a previous conversation
  13. /compact - Compress conversation to save tokens (useful for long sessions)
  14. /init - Set up project memory and rules (one-time setup)
  15. /memory - Open CLAUDE.md for editing

  16. Performance Commands

  17. /fast - Toggle fast mode on/off (2.5x faster Opus at higher cost — ↯ indicator)
  18. /model - Switch between models mid-session

  19. Advanced/Specialized Commands

  20. /mcp - View/authenticate MCP servers (external tool integration)
  21. /plugins - Install/enable/disable extensions
  22. /add-dir - Grant access to additional directories
  23. /login - Re-authenticate if session expires
  24. /hooks - Manage automation triggers (advanced users)

  25. Context Management

  26. Type / in a session to see all available commands
  27. Type /help to get descriptions and examples
  28. Commands execute immediately (no confirmation needed for read-only ones)

  29. The Difference: Commands vs. Prompts

  30. Command: /clear (system action, instant)
  31. Prompt: "Clear the conversation history" (Claude processes, might misinterpret)
  32. Commands are faster, more reliable, always work the same way

Demo Plan

Live Session Walkthrough (2-5 minutes):

  1. Start Session bash cd /path/to/project claude

  2. Demo /help (30 seconds)

  3. Type: /help
  4. Show the full command list
  5. Point out: "These are always available, instant reference"
  6. Mention that / typed alone also shows commands

  7. Demo /config (30 seconds)

  8. Type: /config
  9. Show current settings (model, permissions, etc.)
  10. Say: "Settings control Claude's behavior across the whole session"
  11. Note: Can change settings here without editing files

  12. Demo /permissions (45 seconds)

  13. Type: /permissions
  14. Show current permission rules
  15. Say: "This is where you control what Claude can do—read files, run bash, edit code"
  16. Point out default mode (ask, plan, auto-accept, bypass)

  17. Demo /clear (30 seconds)

  18. Type some questions to build conversation history
  19. Type: /clear
  20. Say: "Watch the history vanish—useful when you want a totally fresh start"
  21. New conversation context saved separately (not lost)

  22. Demo /compact (Optional, 30 seconds)

  23. After a long session with lots of back-and-forth
  24. Type: /compact
  25. Explain: "This compresses the conversation to save tokens on very long sessions"
  26. Not needed in short videos, but important for production workflows

  27. Demo Slash + Tab (30 seconds, if terminal supports)

  28. Type: / and pause
  29. Show autocomplete suggestions
  30. Type: /he + Tab = autocompletes to /help
  31. 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

  1. Gotcha: /clear clears session but not saved history
  2. /clear = wipes conversation from current session
  3. But Claude saves session history (you can /resume later)
  4. If you want to truly delete a session, do that from the desktop app

  5. Tip: /help is your reference

  6. Presenter should open /help during demo
  7. Viewers will know to type /help first thing in their own sessions
  8. More reliable than docs for beginners

  9. Tip: Type / to see command list autocomplete

  10. Works in most terminals
  11. Tab completion fills in command names
  12. Faster than remembering exact names

  13. Gotcha: /login is rare but important

  14. Only needed if credentials expire
  15. Account issues = /login and re-authenticate
  16. Not a daily command

  17. Tip: /permissions before asking Claude to do risky things

  18. Want Claude to run bash? Check /permissions first
  19. Want Claude to edit files? Check /permissions first
  20. Prevents surprise permission prompts mid-task

  21. Tip: /config + /permissions = your safety net

  22. Before a big automation task, check both
  23. Know your permission mode (default vs. plan vs. accept-all)
  24. Know which tools are allowed
  25. Prevents accidents

  26. Gotcha: Commands are case-sensitive

  27. /help works
  28. /Help or /HELP might not work
  29. Always lowercase

  30. Gotcha: Commands don't work in one-off mode

  31. claude "ask a question" (one-off mode) can't use /help
  32. Only in interactive mode: claude → then /help
  33. 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