When to use? Stay in flow without lifting hands from the keyboard. Learn
⇧Tab,
⌥T, and
CtrlO first — they save the most time.
Context: Main chat
Key: Fast, muscle-memory driven
CtrlCCancel input/generation
CtrlDExit session
CtrlLClear prompt input
CtrlOToggle transcript viewer / focus view NEW
CtrlRReverse search history
CtrlGOpen prompt in editor
CtrlX CtrlEOpen in editor (alias)
CtrlBBackground running task
CtrlTToggle task list
CtrlVPaste image ([Image #N] chip)
CtrlX CtrlKKill background agents
EscEscRewind or summarize
⌥PSwitch model
⌥TToggle thinking
\\EnterNewline (quick)
CtrlJNewline (control seq)
/Slash command
!Direct bash
@File mention + autocomplete
CtrlEToggle show all
Q / CtrlC / EscExit transcript
When to use? When Claude needs to connect to external systems — databases, APIs, Jira, Slack, Google Drive. Project scope (
.mcp.json) shares with team; local scope is personal only.
Context: Injects external data
Key: Standardized integration protocol
--transport httpRemote HTTP (recommended)
--transport stdioLocal process
--transport sseRemote SSE
Local~/.claude.json (you only)
Project.mcp.json (shared/VCS)
User~/.claude.json (global)
/mcpInteractive UI
claude mcp listList all servers
claude mcp serveRun Claude Code itself as a stdio MCP server
ElicitationServers can request user input mid-task
2KB eachTool descriptions and server instructions are each truncated at 2KB
maxResultSizeChars_meta["anthropic/maxResultSizeChars"] raises per-tool text threshold (up to 500K chars) NEW
When to use? Specialized commands you invoke manually when you need quick, parameterized shortcuts. Use them when you specifically know you’ll want to trigger something at certain moments. Top 3:
/compact,
/context,
/plan.
Trigger: Manual /command
Context: Shared with main chat
Key: Fast, user-controlled
/clearClear conversation
/resumeResume/switch session
/rename [name]Name current session
/branch [name]Branch conversation (/fork alias)
/costToken usage (per-model + cache breakdown) NEW
/diffInteractive diff viewer
/copy [N]Copy last (or Nth) response
/exportExport conversation
/configOpen settings
/model [model]Switch model
/fast [on|off]Toggle fast mode
/themeChange color theme
/effort [level]Set effort (low/medium/high/max/auto)
/color [color]Set prompt-bar color
/terminal-setupConfigure terminal keybindings
/initCreate CLAUDE.md
/add-dir <path>Add working directory
/powerupInteractive feature lessons NEW
/btw <question>Ask a side question without adding to the conversation
/plan [desc]Plan mode (+ auto-start)
/doctorDiagnose installation
/statsUsage streaks & prefs
/insightsAnalyze sessions report
/usagePlan limits & rate status
/security-reviewSecurity analysis of changes
/helpShow help + commands
/feedbackSubmit feedback (alias: /bug)
/stickersOrder stickers!
When to use? To give Claude persistent instructions across sessions.
CLAUDE.md is your “project brain” — it
survives compaction and is loaded every session. Use rules for filetype-specific memory.
Context: Always in context, survives compaction
Key: Persistent project knowledge
./CLAUDE.mdProject (team-shared)
./CLAUDE.local.mdLocal personal project notes (gitignored)
~/.claude/CLAUDE.mdPersonal (all projects)
/etc/claude-code/CLAUDE.mdManaged policy (Linux/WSL, org-wide)
.claude/rules/*.mdProject rules
~/.claude/rules/*.mdUser rules
paths: frontmatterPath-specific rules
@path/to/fileImport in CLAUDE.md
~/.claude/projects/<proj>/memory/MEMORY.md auto-loads at startup (first 25KB or 200 lines); topic files load on demand
When to use? When looking for the best pattern for a specific task. Plan mode for safe analysis, worktrees for parallel features, headless for CI.
Context: Varies per workflow
Key: Patterns for common tasks
⇧TabNormal → Auto-Accept → Plan
--permission-mode planStart in plan mode
⌥TToggle thinking on/off
"ultrathink"Max effort for turn
CtrlOSee thinking (verbose)
/effort○ low · ◐ medium · ● high · ★ max
/permissions → RecentRetry denied with R NEW
--worktree nameIsolated branch per feature
isolation: worktreeAgent in own worktree
sparsePathsCheckout only needed dirs
workspace.git_worktreeStatus line JSON: linked worktree path NEW
/batchAuto-creates worktrees
/voiceEnable push-to-talk
Space (hold)Record, release to send
20 languagesEN, ES, FR, DE, CZ, PL…
/contextUsage + optimization tips
/compact [focus]Compress with focus
Auto-compact~95% capacity (thrash detection: 3x) NEW
1M contextOpus 4.6 (Max/Team/Ent)
CLAUDE.mdSurvives compaction!
claude -cContinue last conv
claude -r "name"Resume by name
/btw questionSide Q, no context cost
claude -p "query"Non-interactive
--output-format jsonStructured output
--max-budget-usd 5Cost cap
cat file | claude -pPipe input
/loop 5m msgRecurring task
/rcRemote control (hostname prefix default) NEW
/ultraplanDraft plan in browser, auto-create default cloud env if needed NEW
--remoteWeb session on claude.ai
When to use? To customize Claude Code’s behavior globally or per-project. Settings cascade: managed > user > project > local. Env vars override everything.
Context: Loaded at startup
Key: Cascading settings hierarchy
~/.claude/settings.jsonUser settings
.claude/settings.jsonProject (shared)
.claude/settings.local.jsonLocal only
~/.claude.jsonOAuth, MCP, state
.mcp.jsonProject MCP servers
managed-settings.d/Drop-in policy fragments
modelOverridesMap model picker → custom IDs
autoMemoryDirectoryCustom memory dir
worktree.sparsePathsSparse checkout dirs
sandbox.failIfUnavailableExit if sandbox fails
Monitor toolStream events from background scripts NEW
PermissionDeniedHook: auto-mode denial NEW
showThinkingSummariesOpt-in (off by default now) NEW
allowedChannelPluginsAdmin channel plugin allowlist
hooks: "defer"Pause headless → resume later
disableSkillShellExecBlock !`cmd` in skills/plugins NEW
forceRemoteSettingsRefreshFail-closed: block startup until fresh NEW
refreshIntervalRe-run custom status line every N sec NEW
ANTHROPIC_API_KEYAPI key
ANTHROPIC_MODELModel override
CLAUDE_CODE_EFFORT_LEVELlow/medium/high/max/auto
MAX_THINKING_TOKENS0=off
ANTHROPIC_CUSTOM_MODEL_OPTIONCustom /model entry
CLAUDE_CODE_SUBPROCESS_ENV_SCRUBStrip creds from Bash, hooks, MCP subprocesses; Linux isolates PID namespace NEW
CLAUDE_CODE_SCRIPT_CAPSJSON caps for specific script invocations when env scrubbing is enabled NEW
CLAUDE_CODE_PERFORCE_MODEEnable Perforce-aware write protection with p4 edit hint NEW
CLAUDE_STREAM_IDLE_TIMEOUT_MSStreaming watchdog (def 90s)
CLAUDE_CODE_NO_FLICKERAlt-screen rendering (=1) NEW
MCP_CONNECTION_NONBLOCKINGSkip MCP wait in -p NEW
CLAUDE_CODE_USE_MANTLEUse Mantle for Bedrock (=1) NEW
CLAUDE_CODE_CERT_STOREComma-separated TLS CA sources: bundled, system (default: both) NEW
CLAUDECODEDetect CC shell (=1)
When to use? Skills are specialized instructions that may not always be relevant. Use them when you want to
sometimes provide your primary agent with a relevant skillset — repeatable SOPs to apply across sessions. Description always loaded; full body loads only when invoked. Survives compaction (5K tokens each, 25K combined).
Trigger: Auto-triggered by AI or manual
Context: Shared, progressively loaded
Key: Token-efficient, automatic activation
/simplifyCode review (3 parallel agents)
/batchLarge parallel changes (5-30 worktrees)
/debug [desc]Troubleshoot from debug log
/loop [interval]Recurring scheduled task
/claude-apiLoad API + SDK reference
.claude/skills/<name>/Project skills
~/.claude/skills/<name>/Personal skills
descriptionAuto-invocation trigger
allowed-toolsSkip permission prompts
modelOverride model for skill
effortOverride effort level
paths: [globs]Path-specific (YAML list) NEW
context: forkRun in subagent (fresh context)
$ARGUMENTSUser input placeholder
${CLAUDE_SKILL_DIR}Skill's own directory
!`cmd`Dynamic context injection
When to use? Subagents are specialized personas you offload work to — code reviewer, skeptic, testing specialist, architect. Use them to
keep your context clean for isolated tasks that don’t need context from others: “run tests on this file”, “refactor this function”. Results summarized back one-way; subagents cannot talk to each other. ⚠ Can burn tokens going down rabbit holes unchecked.
Trigger: Dispatched by user/AI
Context: Isolated context (fresh)
Key: Independent execution, no context pollution
ExploreFast read-only (Haiku)
PlanResearch for plan mode
GeneralFull tools, complex tasks
BashTerminal separate context
permissionModedefault / acceptEdits / plan / dontAsk / bypassPermissions
isolation: worktreeRun in git worktree
memory: user|project|localPersistent memory
background: trueBackground task
maxTurnsLimit agentic turns
initialPromptAuto-submit first turn
SendMessageResume agents (replaces resume)
@agent-nameMention named subagents NEW
When to use? When you need a
coordination layer — a lead reviewing output from code agents and deciding what to merge. Teams shine for parallel exploration, competing hypotheses, cross-layer changes. The lead’s context acts as a
natural check on scope creep — unlike subagents, teammates don’t go unchecked. Experimental.
Trigger: User requests team creation
Context: Independent + peer-to-peer messaging
Key: Coordinated parallel work, shared task list
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSEnable in env or settings.json (=1)
Team leadMain session: spawns teammates, coordinates work
TeammatesSeparate Claude instances, each with own context
Task listShared across team; teammates self-claim pending tasks
MailboxDirect messaging between any teammates
in-processAll in one terminal; ⇧↓ to cycle teammates
tmux / iTerm2Split panes, one per teammate
--teammate-modeOverride per-session
messageSend to one specific teammate by name
broadcastSend to all teammates (costly — use sparingly)
Plan approvalRequire teammates to plan before implementing
TeammateIdleRuns when teammate about to go idle; exit 2 to keep working
TaskCreatedRuns on task creation; exit 2 to prevent
TaskCompletedRuns on task completion; exit 2 to block
When to use? For launching, scripting, and composing Claude Code. Key patterns:
-p for headless/CI,
-c to continue,
--remote for web,
--max-budget-usd to cap costs.
Context: New or resumed session
Key: Unix-composable, scriptable
claudeInteractive
claude "q"With prompt
claude -cContinue last
claude -r "n"Resume
claude updateUpdate
--modelSet model
-wGit worktree
-n / --nameSession name
--add-dirAdd dir
--agentUse agent
--allowedToolsPre-approve
--allow-dangerously-skip-permissionsAdd bypassPermissions to ⇧Tab cycle
--output-formattext/json/stream-json
--json-schemaStructured
--max-turnsLimit turns
--max-budget-usdCost cap
--exclude-dynamic-system-prompt-sectionsPrint mode: improve cross-user prompt caching NEW
--verboseVerbose
--bareMinimal mode (skips hooks/skills/plugins/MCP/auto-memory/CLAUDE.md)
--effortlow/medium/high/max