Claude Code Command Roundup — Slash Commands, Shortcuts, CLI
claude-codeindie-dev
A cheat sheet of Claude Code commands, organized for my own use. Nobody memorizes all of them, so this is sorted "most used first." (As of July 2026. /help, or typing / in the input box, shows the list for your current version.)
Learn these first
Action
What happens
/clear
Reset the conversation and start a new session (history is recoverable via /resume)
/compact
Summarize the conversation to compress context. /compact instructions also steers the summary
/context
Show a breakdown of context usage. When it balloons, time for /compact
/resume
Pick a past session from a list and resume it
Esc
Interrupt Claude mid-run (work so far is kept). For course corrections
Esc ×2
With empty input: the rewind menu (roll code and conversation back to a checkpoint). With input: clears the draft
Shell mode. Run a command directly, bypassing Claude, with output captured into the conversation
@path
File-path mention with completion. Point instructions at a specific file
Session and conversation controls
Command
Description
/clear
Start a fresh conversation (memory like CLAUDE.md is retained)
/compact
Summarize and compress the conversation
/context
Visualize context usage
/resume
Return to a past session
/rewind
Roll code and conversation back to a checkpoint (same as Esc ×2)
/fork
Copy the current conversation into a separate background session
/btw question
Ask a side question without polluting history; the answer shows in an overlay
/copy
Copy the last response to the clipboard
/export
Export the conversation to a text file
/recap
Generate a summary of the session so far
/btw is a sort of reverse subagent: "sees all current context, can't use tools." Great for asking "what was that filename again" without stopping the work.
Add a working directory (for touching things outside the repo)
/mcp
Manage MCP server connections and auth
/agents
Create and manage subagents
/skills
List and manage available skills
/hooks
Configure pre/post tool-execution hooks
/statusline
Configure the status line at the bottom of the terminal
/terminal-setup
Set up the Shift+Enter newline keybinding in your terminal
/theme
Change the color theme
/doctor
Diagnose installation and settings
/login/logout
Switch accounts
/usage (/cost)
Show token usage and remaining plan quota
Development workflow (bundled skills)
Command
Description
/plan
Switch to plan mode (have it plan before implementing, then approve)
/code-review
Review the current diff. /code-review ultra runs the heavy multi-agent review
/security-review
Check the diff for security vulnerabilities
/simplify
Review proposing behavior-preserving cleanups only
/review PR#
Review a GitHub PR
/deep-research query
Search the web and produce a cited report
/loop
Run a prompt repeatedly (scheduled / self-driving)
/goal condition
Set a goal condition and keep working until it is met
/subtask instructions
Delegate a task to a subagent
/tasks
List running background tasks and subagents
/background
Turn the current session into a background agent
Keyboard shortcuts (the useful ones)
Key
Action
Esc
Interrupt / close dialogs
Esc ×2
Rewind menu (when input is empty)
Shift+Tab
Cycle permission modes
Ctrl+C
Interrupt. Clears input if any; press again to exit
Ctrl+O
Toggle the transcript viewer (detailed tool-execution log)
Ctrl+R
Reverse-search past prompts
Ctrl+B
Send the running command or agent to the background
Ctrl+T
Toggle Claude's task checklist view
Ctrl+S
Stash the text being typed (press again to restore)
Ctrl+G
Edit the input in an external editor
Ctrl+L
Redraw the screen (when the display corrupts)
Alt+P
Switch model (without losing your input)
Alt+O
Toggle fast mode
? (empty input)
Show the shortcut help
Tab
Accept the grayed-out prompt suggestion
Newlines: Shift+Enter (works out of the box in Windows Terminal; VS Code terminals need /terminal-setup), Ctrl+J, or \ + Enter.
Input prefixes
First character
Meaning
/
Invoke a command or skill
!
Shell mode (run directly; output enters the conversation)
@
File-path completion
?
Shortcut help (empty input only)
CLI commands from the terminal
Command
Description
claude
Start an interactive session
claude "prompt"
Start with an initial prompt
claude -p "prompt"
Run once non-interactively and exit (for scripts; accepts piped input)
claude -c
Continue this directory's most recent session
claude -r name
Resume a session by name or ID
claude --model NAME
Launch with a specific model
claude update
Update Claude Code itself
claude doctor
Diagnose the environment
claude mcp
Configure MCP servers
claude agents
Manage parallel sessions in the agent view
Building custom commands (skills)
Your own slash commands are built as skills. Write the procedure in .claude/skills/COMMAND/SKILL.md in the repository and it becomes callable as /COMMAND — and committing it with the repo shares it with your team (and future you).
.claude/
skills/
commit/
SKILL.md ← callable as /commit
In my repo, /commit (commit conventions), /blog-article (blog post generation), and /x-announce (X announcement assets) are all skills, which killed the need to retype the same instructions. A good rule of thumb: the second time you paste the same instructions, make it a skill.
Summary
Daily life is mostly /clear/compact/context/resume + EscShift+Tab!@
When things go wrong, Esc ×2 to rewind. To lock in a design first, /plan
/code-review before committing; extract routine work into .claude/skills/
Type / in the input box for the current full list. This article is a map of the frequently used ones