Commands across a typical workflow
Most commands are useful at a specific point in a session, from setting up a project to shipping a change.
First session in a repo. Run /init to generate a starter CLAUDE.md, then /memory to refine it. Use /mcp to set up any servers the project needs, ask Claude to create any subagents you want, and run /permissions to set your approval rules.
During a task. /plan switches into plan mode before a large change. /model and /effort adjust which model you're using and how much reasoning it applies. When the conversation gets long, /context shows what's filling the window and /compact summarizes it to free space. Use /btw for a side question that shouldn't add to the conversation history.
Run work in parallel. Claude delegates side tasks to subagents, and /tasks lists the current session's background work, including subagents that have finished. /background detaches the whole session to keep running as a background agent and frees your terminal. For a large change that spans the codebase, /batch decomposes it into independent units and runs each in its own worktree. See Run agents in parallel for how these approaches relate.
Before you ship. /diff shows what changed. /code-review checks the current diff for correctness bugs and cleanups and can apply the findings with --fix; pass a PR number, such as /code-review high 1234, to review a pull request instead. /review is an alias. /code-review ultra runs a multi-agent review in the cloud. /security-review checks the diff for security vulnerabilities.
Between sessions. /clear starts fresh on a new task while keeping project memory. /resume returns to an earlier conversation, /branch branches the current one to try a different direction, and /fork copies it into a new background session. /teleport pulls a web session into this terminal, and /remote-control lets you continue this local session from another device.
When something is wrong. /rewind rolls code and conversation back to a checkpoint, or summarizes part of the conversation. /doctor runs a setup checkup that diagnoses installation and configuration issues and can fix them, /debug diagnoses runtime issues, and /feedback reports a bug with session context attached.