FIELD GUIDE · v1.0

Claude Code · Built-in Commands

Every slash-command Claude Code ships out-of-the-box — grouped by purpose with the core question: when do I use which? Includes the session loop, context decisions, and a reference across eight categories.

The typical session loop

From empty project to review. These six steps form the Context-First lifecycle of a session — in exactly this order.

1
Setup
/init
Create CLAUDE.md — always first.
2
Plan
/plan
Think first, then code.
3
Build
prompt
Natural language for coding.
4
Check
/context
How full is the context?
5
Compress
/compact
Condense instead of losing.
6
Ship
/security-review
Scan before PR / merge.

Context: making the right call

Context management is the biggest lever for output quality. These four questions solve 90% of cases.

New, independent task?
/clear — drop the history, a fresh start beats drift.
Long, but history still needed?
/compact — condenses to a summary instead of deleting.
Headed in the wrong direction?
/rewind — back to the last checkpoint (code + chat).
Testing an alternative?
/branch — fork off without losing the main line.

All commands by purpose

Syntax in mono, purpose alongside. Arguments are optional when in [brackets].

Context — Core

Biggest lever for quality.

CommandWhenAlias
/clearNew task, clean start./reset · /new
/compact [focus]Long session, context running low.
/contextCheck what’s filling the context.
/rewindRoll back conversation/code./checkpoint
/branch [name]Fork off into a new session.formerly: /fork
/btw <question>Side question without context clutter.

Model & Reasoning — Tuning

Control cost vs. depth.

CommandWhenAlias
/model [model]Sonnet to explore, Opus for the finale.
/effort [low…max|auto]Complex architecture = high/max.max requires Opus 4.6
/fast [on|off]Fast, simple iterations.

Code Workflow — Build

From setup to review.

CommandWhen
/initAlways first — generates CLAUDE.md.
/plan [desc.]Before multi-step changes.
/memoryAnchor project conventions.
/diffReview uncommitted changes.
/security-reviewBranch scan before PR/merge.
/agentsDelegate specialized tasks.
/skillsList available Skills.

Bundled Skills — Skill

Prompt-based, not hard-wired.

CommandWhen
/code-reviewReview (replaces the deprecated /review).
/batch <instruction>Mass refactor across worktrees.
/loop [interval]Iterate a prompt until green.
/debug [desc.]Enable debug logging.
/simplify [focus]Clean up changed files.
/claude-apiLoad API reference for the project language.

Session & Usage — Ops

Resume, measure, export.

CommandWhenAlias
/resume [session]Continue a conversation./continue
/rename [name]Name the session.
/export [file]Save/share the conversation.
/costToken usage for this session.
/stats · /usageUsage, sessions, streaks.
/insightsSession analysis report.
/statusVersion, model, account.

Integration & Setup — Connect

MCP, GitHub, IDE, Hooks.

CommandWhen
/mcpManage MCP servers & OAuth.
/install-github-appSet up the GitHub Actions app.
/ideConnect IDE integration.
/hooksView Hook configurations.
/pluginManage plugins.
/terminal-setupSet the Shift+Enter keybinding.

Config & System — Config

Permissions, sandbox, diagnostics.

CommandWhenAlias
/configOpen settings./settings
/permissionsView/change permissions./allowed-tools
/sandboxToggle sandbox mode.
/doctorCheck installation health.
/vim · /theme · /statuslineCustomize editor & UI.

Account & Misc — Util

Login, help, directories.

CommandWhenAlias
/helpShow all commands.
/login · /logoutSwitch account / sign out.
/add-dir <path>Add a working directory.
/feedbackSend feedback/bug./bug
/release-notesView the changelog.
/mobileQR code for the mobile app.
/exitLeave the REPL./quit