On this page
Claude Code Commands: The Complete Reference for 2026
This 2026 reference maps all 90+ Claude Code slash commands, 70+ CLI flags, and extensibility features organized by real developer workflow. It covers setup, context management, subagent orchestration, pre-merge review, and the new credit pool pricing model for teams.
Claude Code exposes over 90 slash commands — and that’s before you layer in 70+ CLI flags, 27 hook events, and a subagent system that now nests five levels deep. The tool has outgrown its “terminal assistant” label so thoroughly that treating it like one leaves most of its capability on the table.
This reference maps the full command surface as of June 2026, organized by how you’d actually use it in a session — from setup through parallel execution to shipping. If you’re evaluating how this fits alongside other tools, our comparison of Cursor and Claude Code breaks down the workflow split most professional teams end up using.
Setup Commands: Your First Session
Every Claude Code project starts with the same sequence. /init reads your project structure and generates a starter CLAUDE.md file — the agent’s constitution for that repository, read every session to anchor conventions and commands. From there, the /memory, /mcp, /agents, and /permissions slash commands let you toggle auto-memory and view entries, connect external tool servers, configure subagents, and set allow, ask, and deny rules for tools respectively.
One thing worth noting: CLAUDE.md isn’t a one-time config file. It’s the primary mechanism for shaping agent behavior across sessions. Teams that treat it as a living document — updated as conventions evolve — see substantially better consistency than those that generate it once and forget it. For a deeper breakdown of how CLAUDE.md interacts with Cursor rules and other configuration formats, see our guide on AI agent configuration formats.
Session Management: Controlling Context and State
Context window management is where most developers either get frustrated or never hit limits at all. Three commands matter here:
/contextvisualizes context usage as a colored grid, so you can see exactly what’s consuming space./compactsummarizes conversation history to free context window space. You can pass custom instructions to control what gets preserved./clear(with aliases/resetand/new) wipes conversation history entirely.
The /rewind command restores code and/or conversation to a previous point, and v2.1.191 added support for resuming from before /clear was run — which fixes the most common “I cleared too aggressively” problem, per ExplainX’s changelog. The /cd command moves a session to a new working directory without breaking the prompt cache mid-session, per Toolsbase’s reference — a small but meaningful quality-of-life improvement for multi-repo work.
Model and Effort Control
/model switches the AI model and can save as default or session-only. Opus 4.8 became the default model on Max, Team Premium, Enterprise pay-as-you-go, and the Anthropic API on May 28, 2026, per Anthropic’s announcement.
/effort adjusts reasoning depth with levels: low, medium, high, max, auto, and ultracode. The ultracode level also serves as the trigger keyword for dynamic workflows, which can orchestrate hundreds of parallel subagents in a single session — per Pondero’s coverage. This is the mechanism that turns Claude Code from a single-agent tool into an orchestration layer.
The --fallback-model flag applies to interactive sessions and accepts a comma-separated list of up to three models tried in order, per GitHub release v2.1.166. This is useful if you’re running workloads that might hit capacity on your primary model and want a graceful degradation path.
The Extension System: Skills, Hooks, and MCP
Claude Code’s extensibility rests on three pillars:
Skills are SKILL.md files with frontmatter under .claude/skills/. They support /name invocation and autonomous invocation by Claude, per MarkTechPost’s guide. Think of them as reusable prompt templates with structured metadata.
Hooks are deterministic scripts that fire at defined lifecycle points. The system includes 27 events and 5 handlers, with PreToolUse serving as the primary security checkpoint before any tool runs. Hooks support MessageDisplay and args[] for customizing behavior.
MCP servers (Model Context Protocol) connect Claude Code to external tools like GitHub, databases, and browsers. The server handles integration; Claude reasons about what to do. Plugins bundle skills, subagents, commands, hooks, and MCP definitions into one installable unit via /plugin.
Subagents and Parallel Execution
Subagents are specialized instances with their own context windows — verbose work stays isolated so your main conversation stays focused. They can spawn nested subagents up to 5 levels deep, per GitHub release v2.1.172. The /agents command manages subagents and supports --json, --all, id, and state flags.
The /goal command sets a completion condition and Claude keeps working across turns until it’s met. Combined with auto mode — now GA on Pro and supporting Bedrock, Vertex AI, and Foundry, per Clauder Navi — this enables walk-away coding where you set a goal and return to finished work.
Agent View, accessible via claude agents, includes pinned sessions and background execution. This is the surface for monitoring and managing long-running agent work.
Pre-Merge Review Workflow
Four commands form a structured review pipeline before merging, per ExplainX’s command reference:
/diffshows changes/code-reviewruns a general code review/security-reviewfocuses on security concerns/reviewprovides a comprehensive assessment
These aren’t just convenience commands. They represent a shift toward making review a first-class workflow inside the coding tool rather than a separate step in a pull request.
Safety and Troubleshooting
The --safe-mode flag starts Claude Code with all customizations disabled — CLAUDE.md, plugins, skills, hooks, MCP servers, custom commands — for troubleshooting broken configurations, per GitHub release v2.1.169. Admin-managed policy settings still apply, so enterprise security rules don’t get bypassed.
The permission system includes 6 modes plus June 2026 hardening covering startup files and build configs. Auto-mode safety guards (v2.1.183) block unrequested destructive commands like git reset --hard and terraform destroy unless you explicitly asked for them.
The Economic Reality: Credit Pools and Hard Stops
Here’s where the command reference meets financial reality. Starting June 15, 2026, Claude Code programmatic usage (Agent SDK, claude -p, GitHub Actions) draws from a separate monthly credit pool billed at full API rates, per Bind AI’s analysis. The Pro plan ($20/month, or $17/month billed annually) includes Claude Code access, as does Max 5x at $100/month and Max 20x at $200/month — per MorphLLM.
The credit pool creates a hard stop when exhausted. No rollover. No automatic fallback. Heavy chat users get fewer Claude Code turns because both draw from shared quota. This matters for teams running unattended auto-mode sessions: the commands are powerful, but the economics are unforgiving. For a full breakdown of how these costs play out at team scale, see our Claude Code pricing deep-dive.
Artifacts: Sessions as Shareable Pages
Claude Code Artifacts launched on June 18, 2026 in beta for Team and Enterprise customers, turning session work into live, shareable web pages, per VentureBeat. Artifacts are private by default, viewable only by authenticated members of the same organization, and cannot be made public.
This is Anthropic absorbing the gap that third-party tools were filling — turning ephemeral terminal sessions into persistent, versioned records that teammates can open in any browser.
Quick Reference Table
| Category | Key Commands | Use Case |
|---|---|---|
| Setup | /init, /memory, /mcp, /agents, /permissions | First session in a new project |
| Context | /context, /compact, /clear, /rewind | Managing context window pressure |
| Models | /model, /effort, --fallback-model | Switching models and reasoning depth |
| Execution | /plan, /goal, /agents, /workflows | Orchestrating parallel and autonomous work |
| Review | /diff, /code-review, /security-review, /review | Pre-merge quality gates |
| Safety | --safe-mode, /permissions | Troubleshooting and access control |
| Extensibility | Skills, Hooks, MCP, /plugin | Customizing agent behavior |
What This Means for Your Workflow
The command surface is deep enough that most teams will only use 20% of it regularly — but that 20% depends entirely on your use case. If you’re doing interactive editing, the model and effort controls matter most. If you’re running unattended agents, the credit pool economics and safety guards are the story. If you’re building team infrastructure, the hooks system and MCP integrations are where you’ll spend your time.
The pattern I keep coming back to: Claude Code is transitioning from a session-based coding assistant to a continuously running agentic orchestration layer. The commands reflect that shift — and the pricing model, with its separate credit pools and hard stops, confirms it. The question isn’t whether the tool is capable. It’s whether your workflow and budget are built for the version of it that’s arriving, not the one that shipped a year ago.