/Slash Command Reference

All built-in commands, shortcuts, and prefixes โ€” updated July 2026
v2.1.205+
๐Ÿ’พ

Session & Memory

/init
Initialize project with CLAUDE.md. Creates your project's persistent instruction file read at every session start.
/memory
View and manage auto-memory files. Use # prefix in the REPL to add things to memory without editing files.
/resume
Resume a previous session. /resume 1 for most recent, /resume name by name. Sessions are resumable up to 7 days.
/rename
Name the current session for easy resuming. Example: /rename pr-review
/clear
Clear conversation history. Keeps files and memory intact โ€” only the chat context is wiped.
/compact
Condense conversation history to free up context. Optionally focus: /compact focus on tests
/context
View context window usage with actionable suggestions on when to compact.
/export
Export the conversation transcript to a file.
/rewind
Return to a prior checkpoint. Also triggered by pressing Esc Esc.
/branch
Branch the conversation for parallel exploration without affecting your main session.
โšก

Model & Effort

/model
Switch model mid-session. Options: /model sonnet (default, Sonnet 5), /model opus (Opus 4.8), /model haiku, /model fable. Also Alt+P while typing.
/effort
Set reasoning effort: low, medium, high, xhigh. Use /effort xhigh with Opus for hardest agentic work.
/fast
Toggle fast output mode for quicker, lighter responses.
/usage
View token usage, cost, and plan limits. /cost and /stats are shortcuts that open specific tabs here.
/status
View current session state: active model, permission mode, and settings summary.
๐Ÿ”

Autonomous Work

/loop agentic
Run a prompt or command on a repeating interval. /loop 3h check PRs, /loop 5m /my-skill, or bare /loop for self-paced maintenance. Stop with /loop stop or Ctrl+C.
/goal v2.1.139+
Set a completion condition; Claude keeps going autonomously until the condition is met. Example: /goal all tests pass. Uses a fast model to evaluate after each turn.
/plan
Enter plan mode โ€” Claude outlines the approach before touching any files. Best before large refactors. /plan fix the auth module
/batch
Run batch operations across multiple files or targets in parallel.
/tasks
List all background agents currently running in this session.
/bashes
List background bash tasks spawned by Claude.
Tip: /loop vs /goal โ€” use /loop when you want Claude to wake up on a schedule. Use /goal when you want Claude to keep working until a condition is true.
๐Ÿ”

Code Quality

/code-review
Find correctness bugs. Supports effort levels: /code-review medium, /code-review ultra. Use --fix to auto-apply fixes, --comment to post inline GitHub PR comments.
/security-review
Review code specifically for security vulnerabilities โ€” OWASP Top 10, secrets, injection risks.
/claude-api
Get help building apps with the Anthropic SDK โ€” tool use, batch processing, MCP integration, streaming.
๐Ÿค–

Parallel & Agents

/agents
Open Agent View โ€” an operations screen for running, blocked, and completed Claude Code sessions. Up to 10 subagents can run in parallel.
/skills
List installed skills with a type-to-filter search box. Skills are prompt-based commands stored in .claude/skills/.
/add-dir
Expand file access by adding additional working directories to the session.
โš™๏ธ

Config & Permissions

/config
Open the full settings interface interactively.
/permissions
Manage permission settings interactively โ€” what Claude can read, edit, and execute.
/hooks
View current hook configuration. Hooks fire on events like PreToolUse, PostToolUse, Stop, etc.
/mcp
Configure MCP servers. /mcp enable, /mcp disable. MCP expands Claude's tool access to external services.
/doctor
Full setup checkup โ€” diagnoses and fixes environment issues. Alias: /checkup
/bug
Report a bug directly to Anthropic from within your session.
/login / /logout
Authenticate or sign out mid-session without restarting Claude Code.
โŒจ๏ธ

Keyboard Shortcuts

Ctrl+CCancel current operation
Ctrl+DExit session (EOF)
Ctrl+LClear screen (keeps history)
Ctrl+BBackground current operation
Ctrl+X Ctrl+KStop all agents
Ctrl+SStash prompt draft
Ctrl+GOpen external editor
Ctrl+VPaste image from clipboard
Ctrl+OToggle verbose output
Ctrl+RSearch command history
Esc EscRewind last change
Shift+TabCycle permission modes
Alt+PSwitch models while typing
Alt+TToggle thinking mode
TabAccept prompt suggestion
! TabBash history autocomplete
?Show all shortcuts
โŒจ๏ธ

Quick Prefixes

#
Persistent Memory
# Always use TypeScript
/
Slash Command
/code-review --fix
!
Execute Bash
! git status
@
Reference File
@src/index.ts
&
Send to Cloud
& Build the API
๐Ÿ› 

Custom Commands

Create a .md file in .claude/commands/ (project) or ~/.claude/commands/ (personal) and invoke it with /filename. Use $ARGUMENTS for arguments.
--- # .claude/commands/pr-review.md description: Review open PRs and post GitHub comments allowed-tools: Bash(gh pr list *), Bash(gh pr diff *), Bash(gh pr review *) model: opus --- 1. Run `gh pr list --state open --json number,title` 2. For each PR, run `gh pr diff <number>` 3. Review for: breaking API changes, missing error handling, security issues 4. Post: `gh pr review <number> --comment -b "<feedback>"`
Usage: /pr-review โ€” or schedule it: /loop 3h /pr-review
๐Ÿ”

Permission Modes

manual (default)
Prompts on first use of each tool
Normal development
acceptEdits
Auto-approves file edits, prompts for bash
Trusted projects
auto
Safety classifier reviews each action automatically
Autonomous with guardrails
plan
Read-only โ€” no edits or execution
Analysis only
bypassPermissions
Skips all prompts entirely
CI/CD automation
Cycle modes with Shift+Tab. Set at startup: claude --permission-mode auto