Skip to content

Course · Claude Code

Quick reference

What this course’s lessons - steering sessions, setting permission modes, delegating to subagents - use most: commands, shortcuts, flags, modes, files, in one place to look up rather than re-read.

Command What it does
/clear Start a new conversation in the same process; the previous session remains resumable
/compact Summarize the thread to reclaim tokens without losing the plot
/context Show what’s currently filling the context window, including which memory files loaded
/usage Show token spend for this session
/rewind Restore or summarize an eligible checkpoint (a saved snapshot of the session’s tracked edits); it is not a Git replacement
/plan Plan a single prompt without switching the session’s mode
/init Generate or improve a starter CLAUDE.md by scanning the project
/memory List, open, or edit memory files (CLAUDE.md, rules) and manage auto memory (the agent’s own notes on your machine)
/model Inspect models; picking one in the list (Enter) or naming it (/model <name>) saves your default, s uses the pick for this session only
/effort Set supported reasoning effort levels
/permissions View and manage allow, ask, and deny rules (saved to settings)
/tasks List background sessions and subagents; attach to or stop each one
/btw Ask a side-question in an overlay that stays out of conversation history; the newest twenty exchanges replay as context for each ask, x clears them (interactive-mode reference)
/resume Pick a previous session to continue
/branch Create a new conversation branch from the current session
/fast Toggle fast mode, or set it with on / off; currently Opus-only (as of 2026-10; see the fast-mode reference), subscription use draws from usage credits, and it is disabled by default for Team and Enterprise organizations until an Owner enables it
/recap Summarize the current session without compacting it
/config Open the interactive settings panel (editor mode, recaps, theme)
/terminal-setup Install the Shift+Enter binding for common terminals
/keybindings Configure interactive keybindings
Flag What it does
--continue Resume the most recent session in this directory
--resume Pick a past session to resume from a list
-p Run a single prompt headlessly and exit (no REPL)
--output-format Control headless output: text, json, stream-json
--max-turns Cap how many agentic turns a headless run may take
--bare Skip project auto-discovery such as CLAUDE.md, hooks, skills, plugins, and MCP (the Model Context Protocol, an open standard for connecting an agent to an external tool or data source)
--model Set the model for this invocation without /model
--permission-mode Start the session in a named mode (plan, dontAsk, …)
--allowedTools Pre-approve specific tools or command patterns for the run
--cloud Start a cloud session on Claude Code on the web (clones the repo’s current branch)
Shortcut What it does
Shift+Tab Cycle the modes available in the current configuration, normally default → acceptEdits → plan
Escape Interrupt the agent mid-response; Esc Esc with an empty prompt opens the rewind menu
Ctrl+C Cancel the current input or action
Mode Behaviour
default Reads are free; edits and most shell commands ask for approval
acceptEdits File edits and common filesystem shell commands auto-approve; other shell commands still ask
plan Reads run freely; commands prompt you or are gated by the safety classifier, and approved commands can run; edits are held until you approve a plan
auto Most actions auto-approve; a background classifier blocks the unsafe ones (documented for current versions; see the permission-modes reference)
dontAsk Deny calls that would otherwise prompt; useful for unattended runs
bypassPermissions Skips most permission prompts; use only inside strong isolation

A plain claude launch in the terminal or VS Code extension starts in auto mode (v2.1.283+; earlier versions did this only on Pro, Max, and Team plans); --permission-mode pins a different starting mode, and claude -p and SDK runs start in default unless you set one. The permission-modes reference lists the exceptions. Deny rules block in every mode, including bypassPermissions.

File Purpose
CLAUDE.md Project instructions loaded at session start (rules, conventions, context)
.claude/settings.json Per-project permission rules, allowed/denied tools and paths
.claude/skills/ Reusable skill definitions the agent invokes by description match
.claude/agents/ Custom subagent definitions with their own model and permissions