Claude Code Cheat Sheet 2026
Complete reference for slash commands, bundled skills, CLI flags, keyboard shortcuts, environment variables, hooks, config files, and scheduling. Updated through v2.1.81.
Major Features
New capabilities shipped in the past 30 days (v2.1.63 through v2.1.81):
- Auto Mode (research preview) — AI classifier reviews every tool call before execution; replaces manual permission approvals; toggle with
--enable-auto-mode or Shift+Tab
- Agent Teams — multiple Claude Code instances working in parallel, each with own context window and git worktree; requires v2.1.32+
- Code Review (multi-agent) — dispatches parallel review agents on PR open; each agent reviews a different dimension
- AutoMemory — automatically writes memory rules from session habits; stored in
.claude/skills/; persists per project
- Voice Mode (
/voice) — push-to-talk via spacebar; 20 languages supported; keybinding configurable via keybindings.json
- 1M Token Context Window (GA) — Opus 4.6 on Max, Team, and Enterprise plans; no beta header required
- Opus 4.6 as default model — replaces Sonnet 4.5; 64k default output, 128k upper bound; Sonnet 4.6 also at 128k upper
- Remote Control — control a live session from browser or phone via
claude.ai/code
- Desktop Scheduled Tasks — persistent cron-style tasks that survive restarts; local file/MCP access
- Cloud Scheduled Tasks (
/schedule) — tasks run on Anthropic infrastructure; survive closed laptops
- MCP Elicitation — MCP servers can request structured input mid-task via interactive form or browser URL
- Fast Mode — speed-optimized API settings for Opus 4.6; ~2.5x speed, ~2x cost; best for live iteration
/simplify and /batch — two new bundled skills (shipped v2.1.63, Feb 28 2026)
/loop — in-session cron scheduler (shipped March 2026; up to 7 days)
/btw — side-channel mid-task annotation without interrupting Claude
- MCP tool search (lazy loading) — reduces context usage ~95% by loading tools on demand
Bundled Skills
Built-in skills shipped with Claude Code. Zero setup. Available in every session.
| Skill | Description |
|---|
/simplify | 3 parallel review agents (reuse, quality, efficiency); auto-fixes issues in changed files |
/batch | Plans and executes large-scale migrations using isolated git worktrees; up to 30 parallel units; auto-creates PRs |
/loop | In-session cron scheduler; fires prompts on interval; session-scoped |
/btw | Side-channel question mid-task; ephemeral, low-cost, no tools consumed |
/review | Multi-agent code review |
/debug | Bundled debugging skill |
/claude-api | Auto-invoked when code imports Anthropic SDK (anthropic, @anthropic-ai/sdk, claude_agent_sdk) |
Slash Commands
Session Management
| Command | Description |
|---|
/clear | Wipe conversation history and free all context (also /reset, /new) |
/compact [focus] | Compress history into dense summary; optional focus instruction to control what survives |
/context | Show context window usage with actionable suggestions (bloat, heavy tools, capacity warnings) |
/resume | Display session picker to resume a previous session |
/branch | Create a conversation branch for safe experimentation (renamed from /fork; /fork still works) |
/rewind | Roll back conversation and/or code changes; Esc+Esc shortcut; choose code-only or full rollback |
/rename [name] | Name the current session; auto-generates name from conversation if no argument given |
/tag | Tag current session for retrieval |
/export [filename] | Export conversation as plain text |
/fork | Alias for /branch |
Context and Files
| Command | Description |
|---|
/diff | Interactive diff viewer showing all session file changes |
/copy [N] | Copy Nth-latest assistant response to clipboard; w key writes to file instead (useful over SSH) |
/add-dir <path> | Add a working directory to the session without restarting |
/todos | Show outstanding tasks Claude is tracking |
Model and Effort
| Command | Description |
|---|
/model [name] | Switch model mid-session (opus, sonnet, haiku); also Option+P / Alt+P |
/effort [level] | Set model effort: low, medium, high; /effort auto resets to default |
/fast | Toggle Fast Mode (speed-optimized Opus 4.6; ~2.5x faster) |
Permissions and Config
| Command | Description |
|---|
/plan [description] | Toggle plan mode; optional description immediately starts execution |
/permissions | Manage tool/permission rules with tab/arrow key navigation |
/config | Open config menu; includes "Show turn duration" toggle |
/keybindings | Open and edit ~/.claude/keybindings.json; changes take effect immediately |
/vim | Toggle vim keybinding mode for input |
Scheduling
| Command | Description |
|---|
/loop [interval] <prompt> | Schedule recurring in-session prompt; e.g., /loop 5m check deploy status |
/schedule | Create cloud-based scheduled tasks that run on Anthropic infrastructure |
Agentic / Multi-Agent
| Command | Description |
|---|
/simplify [focus] | Run 3 parallel review agents on changed files; optional focus text |
/batch <description> | Plan and execute large-scale parallel code migrations |
/review | Multi-agent code review |
Voice and Remote
| Command | Description |
|---|
/voice | Toggle push-to-talk voice mode; hold spacebar to speak |
/remote-control | Bridge VS Code session to claude.ai/code to continue from browser or phone |
Info and Diagnostics
| Command | Description |
|---|
/help | Show all available commands and skills |
/skills | List all available skills (built-in and custom) |
/status | Read current config: model, permissions, MCP servers, tool state |
/doctor | Run environment diagnostics; reports failures with actionable errors |
/cost | Show current session token cost (API billing users) |
/usage | Show plan-level limits and rate limit status |
/stats | Show usage progress against plan limits (Pro/Max users) |
/release-notes | View what changed in the current version |
/insights | Analyze your own usage patterns |
/heapdump | Memory diagnostic tool |
Plugin Management
| Command | Description |
|---|
/plugin | Install, update, validate, and uninstall plugins |
/plugin validate | Check skill/agent/command frontmatter and hooks/hooks.json |
MCP
| Command | Description |
|---|
/mcp | Manage MCP server connections interactively |
/mcp__[server]__[prompt] | Call a specific MCP server prompt directly |
Init and Setup
| Command | Description |
|---|
/init | Scan project and generate CLAUDE.md; v2 interviews you before generating |
/terminal-setup | Install terminal keybindings (enables Shift+Enter for newlines, etc.) |
Color and UX
| Command | Description |
|---|
/color <color> | Set prompt-bar color for the current session |
| Prefix | Behavior |
|---|
! | Run bash command directly; output injected into context; no model tokens consumed |
# | Save text directly to memory (CLAUDE.md); opens memory prompt |
@ | File path autocomplete; explicitly reference a file (@src/index.ts fix this) |
& | Background task; run without blocking the current session |
CLI Flags
Session Startup
| Flag | Description |
|---|
claude | Start interactive session |
claude "prompt" | Start session with initial prompt |
claude -p "prompt" | One-time non-interactive query (print mode) |
claude -c | Continue most recent session |
claude -r <ID> | Resume specific session by ID |
claude -r <title> | Resume session by custom title |
claude --from-pr <number> | Start session linked to a specific PR |
-n / --name <name> | Set display name for session at startup |
Model and Effort
| Flag | Description |
|---|
--model <name> | Set model at startup (opus, sonnet, haiku, or full model ID) |
--effort <level> | Set effort at startup: low, medium, high |
Automation and Scripting
| Flag | Description |
|---|
--bare | Scripted -p calls; skips hooks, LSP, plugin sync, skill walks; requires ANTHROPIC_API_KEY |
--dangerously-skip-permissions | Skip all permission prompts (use only in trusted containers) |
--enable-auto-mode | Enable Auto Mode (research preview); AI classifier approves/blocks actions |
--channels | (Research preview) Allow MCP servers to push messages into your session |
--console | Use claude auth login --console for Anthropic Console / API billing auth |
Context and Directories
| Flag | Description |
|---|
--add-dir <path> | Add additional working directory to session context |
--worktree | Start session in an isolated git worktree |
--append-system-prompt <text> | Append custom instructions to system prompt (safe; keeps defaults) |
--system-prompt <text> | Replace entire system prompt (removes all defaults) |
Multi-Agent
| Flag | Description |
|---|
--agents <JSON> | Define agent team configuration at startup |
MCP
| Flag | Description |
|---|
claude mcp add | Add an MCP server |
claude mcp serve | Expose Claude Code itself as an MCP server |
Maintenance
| Flag | Description |
|---|
claude update | Update Claude Code to the latest version |
claude --version | Show current version |
Keyboard Shortcuts
macOS: Alt = Option. Configure Option as Meta in iTerm2: Settings > Profiles > Keys > Left Option = Esc+
Navigation and Control
| Shortcut | Action |
|---|
Ctrl+C | Cancel current response / interrupt Claude |
Esc | Interrupt Claude mid-response |
Esc + Esc | Open rewind menu (code-only or full rollback) |
Ctrl+R | Search session input history |
Ctrl+G / Ctrl+X Ctrl+E | Open external editor for current input |
Shift+Tab | Cycle permission modes: Default > Auto-accept > Plan Mode |
Tab | Toggle extended thinking on/off for next turn |
Alt+T / Option+T | Toggle extended thinking |
Alt+P / Option+P | Open model picker without clearing input |
Up Arrow (after interrupt) | Restore interrupted prompt and rewind in one step |
Ctrl+F (press twice to confirm) | Kill all background agents |
Ctrl+X Ctrl+K | Stop all background agents |
Input Editing (Multi-line)
| Shortcut | Action |
|---|
Shift+Enter | Insert newline (run /terminal-setup to enable) |
Option+Enter | Insert newline (macOS) |
Ctrl+J | Insert newline |
\ + Enter | Continue on next line |
Ctrl+S | Stash current input |
Clipboard and Files
| Shortcut | Action |
|---|
w (in /copy mode) | Write selection directly to a file (bypasses clipboard; useful over SSH) |
Custom Keybindings
Rebind any action in ~/.claude/keybindings.json:
{
"bindings": [
{
"context": "Chat",
"bindings": {
"ctrl+k ctrl+s": "chat:stash",
"ctrl+shift+p": "chat:modelPicker",
"ctrl+g": "chat:externalEditor"
}
},
{
"context": "Global",
"bindings": {
"ctrl+shift+t": "app:toggleTodos"
}
}
]
}
Click to copy
Available actions include: chat:submit, chat:externalEditor, chat:stash, chat:modelPicker, app:toggleTodos, task:background, chat:killAgents
Thinking / Effort Keywords
Type these keywords anywhere in your prompt to control reasoning depth for that turn:
| Keyword | Thinking Budget | Use Case |
|---|
think | ~4,000 tokens | Simple reasoning tasks |
think hard | ~10,000 tokens | Moderate complexity |
think harder | ~16,000 tokens | Complex logic, architecture |
ultrathink | ~31,999 tokens | Maximum depth; critical decisions, architecture, debugging loops |
Note: ultrathink overrides the session effort level for that turn only. Best paired with Opus 4.6 + Plan Mode for multi-file features.
Environment Variables
Model and API
| Variable | Description |
|---|
ANTHROPIC_API_KEY | API key for authentication |
ANTHROPIC_BASE_URL | Override API base URL (proxy, Bedrock, Vertex) |
ANTHROPIC_MODEL | Set default model |
ANTHROPIC_DEFAULT_OPUS_MODEL | Override Opus alias (useful for custom fine-tunes) |
ANTHROPIC_DEFAULT_SONNET_MODEL | Override Sonnet alias |
ANTHROPIC_DEFAULT_HAIKU_MODEL | Override Haiku alias |
ANTHROPIC_CUSTOM_MODEL_OPTION | Add a custom entry to the /model picker; use _NAME and _DESCRIPTION suffix variants for display |
ANTHROPIC_BETAS | Enable beta features by name |
Behavior Control
| Variable | Description |
|---|
CLAUDE_CODE_EFFORT_LEVEL | Persist effort level across sessions (low, medium, high) |
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE | Override auto-compaction threshold (default ~95%) |
CLAUDE_CODE_DISABLE_AUTO_MEMORY | Temporarily disable AutoMemory for a session |
CLAUDE_CODE_DISABLE_1M_CONTEXT | Disable 1M context window |
CLAUDE_CODE_DISABLE_CRON | Disable all scheduled cron jobs (/loop becomes unavailable) |
ENABLE_TOOL_SEARCH | Enable lazy MCP tool loading even when ANTHROPIC_BASE_URL is set |
ENABLE_CLAUDEAI_MCP_SERVERS | Opt out of claude.ai managed MCP servers (false to disable) |
Security and Subprocesses
| Variable | Description |
|---|
CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1 | Strip Anthropic and cloud provider credentials from subprocess environments (Bash tool, hooks, MCP stdio) |
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS | Suppress experimental beta headers (fixes 400 errors on proxy gateways / Bedrock / Vertex) |
Plugins and Seeds
| Variable | Description |
|---|
CLAUDE_CODE_PLUGIN_SEED_DIR | Seed directory for plugins; supports multiple dirs separated by : (Unix) or ; (Windows) |
Hooks and Sessions
| Variable | Description |
|---|
CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS | Override SessionEnd hook timeout in milliseconds |
Scheduling
| Variable | Description |
|---|
CLAUDE_CODE_DISABLE_CRON=1 | Disable the scheduler entirely; cron tools and /loop become unavailable |
Hooks
Hooks fire at specific lifecycle events and can run shell commands, POST to URLs, or intercept/block actions.
Hook Events
| Event | Fires When |
|---|
PreToolUse | Before any tool call executes |
PostToolUse | After a tool call completes |
Stop | When Claude ends a turn normally |
StopFailure | When a turn ends due to API error (rate limit, auth failure) |
PostCompact | After context compaction completes |
SessionEnd | When the session closes |
Elicitation | When an MCP server requests structured input |
ElicitationResult | After an MCP elicitation response is given |
Hook Types
| Type | Description |
|---|
| Shell command hook | Runs a local script; receives JSON on stdin; exit code 0 = success, exit code 2 = block action |
| JSON-output hook | POSTs JSON to a URL; receives JSON response; no local scripts needed |
Hook Fields (New in 2026)
agent_id and agent_type — available in all hook events for subagent tracking and logging
- Hook source display in permission prompts — shows whether hook came from
settings, plugin, or skill
Example: Block rm -rf in PreToolUse
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": ".claude/hooks/validate-bash.sh"
}
]
}
]
}
}
Click to copy
Scheduling
Three scheduling options depending on persistence needs:
/loop — In-Session (CLI)
/loop [interval] <prompt>
/loop 5m check if the deployment finished
/loop 1h run test suite and report failures
/loop babysit all PRs and auto-fix build issues
Click to copy
- Units:
s (seconds, rounds up to 1m), m, h, d
- Max duration: 7 days (then auto-expires)
- Max tasks per session: 50
- Session-scoped: all tasks die when you exit
- Fires between turns, never mid-response
- One-shot: describe in natural language without an interval; Claude schedules a single-fire task that deletes itself
Manage tasks:
show running cron jobs # CronList
cancel loop c21d95a0 # CronDelete by ID
Click to copy
Disable entirely:
CLAUDE_CODE_DISABLE_CRON=1 claude
Click to copy
Desktop Scheduled Tasks — Persistent Local
- Configured in the Desktop sidebar: Scheduler > + New Task
- Survives restarts; runs as long as Desktop app is open
- Full access to local files, MCP servers, skills, plugins
- Supports model selection, permission mode, working folder, worktree isolation
/schedule — Cloud Tasks
/schedule run security audit every Monday at 9am
/schedule resolve CI failures on every failed build
Click to copy
- Runs on Anthropic infrastructure
- Survives closed laptops
- Used for continuous automation (CI fixes, doc updates, nightly builds)
Agent Teams
Run multiple Claude Code instances in parallel, each in its own context and worktree.
Requires: v2.1.32+
Best use cases:
- Parallel code review (security, performance, architecture simultaneously)
- New modules where agents can own separate pieces
- Debugging with competing hypotheses
- Cross-layer changes (frontend + backend + tests)
Key behaviors:
- Lead agent orchestrates; teammate agents work independently
- Each teammate gets its own git worktree; no merge conflicts
- Killing a background agent preserves its partial results in conversation context
SendMessage({to: agentId}) to continue a stopped agent
agent_id and agent_type fields in all hook events for tracking
Agent frontmatter:
---
effort: high
maxTurns: 20
disallowedTools: [Bash]
initialPrompt: "Review the auth module for security issues"
---
Click to copy
Permissions System
Permission Modes (Shift+Tab cycles through these)
| Mode | Behavior |
|---|
| Default | Claude asks approval for each file edit and bash command |
| Auto-accept | Automatically approves all actions (use with caution) |
| Plan Mode | Claude proposes each action and waits for your approval before executing |
| Auto Mode | AI classifier approves safe actions; blocks risky ones (research preview) |
Permission Rules in settings.json
{
"permissions": {
"allow": [
"Read",
"Bash(git *)",
"Bash(npm run *)",
"Bash(docker compose *)",
"WebSearch",
"WebFetch(domain:github.com)"
],
"ask": [
"Write(*.ts)",
"Bash(git push*)"
],
"deny": [
"Bash(rm -rf *)",
"Read(.env)",
"Read(./.env.*)",
"Read(./secrets/**)",
"Write(package-lock.json)"
]
}
}
Click to copy
Rule evaluation order: deny checked first, then ask, then allow. First match wins.
Auto Mode (Research Preview)
- Enable:
claude --enable-auto-mode or Shift+Tab to cycle to it
- Classifier blocks: scope escalation, untrusted infrastructure, mass file deletion, prompt injection attempts
- Recommended: run in isolated environments (containers, VMs, sandboxes)
- Available: Team plan (rolling out to Enterprise and API)
Config File Structure
~/.claude/ # Global / personal (never committed)
settings.json # Global permissions and defaults
CLAUDE.md # Global instructions (all projects)
keybindings.json # Custom keyboard shortcuts
commands/ # Personal slash commands
skills/ # Personal skills
agents/ # Personal subagent personas
projects/<project>/memory/ # AutoMemory files (MEMORY.md + topic files)
your-project/
CLAUDE.md # Team instructions (committed)
CLAUDE.local.md # Personal overrides (gitignored)
.mcp.json # MCP server configs
.claude/
settings.json # Project permissions (committed)
settings.local.json # Personal permission overrides (gitignored)
rules/ # Modular instruction files by condition
commands/ # Custom slash commands
skills/ # Auto-invoked workflows
agents/ # Specialized subagent personas
hooks/ # Event-driven automation scripts
Click to copy
Settings Precedence (highest to lowest)
Managed (org policy) > CLI args > Local settings > Project settings > User settings
Click to copy
settings.json Key Fields
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"model": "opus",
"effortLevel": "medium",
"defaultMode": "default",
"autoMemoryEnabled": true,
"autoMemoryDirectory": "~/.claude/memory/",
"permissions": {
"allow": [],
"ask": [],
"deny": []
},
"env": {
"CLAUDE_CODE_EFFORT_LEVEL": "medium",
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "80"
},
"attribution": {
"commit": "Co-Authored-By: Claude",
"pr": "Generated with Claude Code"
},
"sandbox": {
"enabled": true,
"filesystem": {
"allowWrite": [],
"denyRead": [],
"allowRead": []
}
},
"feedbackSurveyRate": 0,
"companyAnnouncements": []
}
Click to copy
CLAUDE.md Quick Reference
Location hierarchy:
~/.claude/CLAUDE.md — global, all projects
<project>/CLAUDE.md — project-level (committed, team-shared)
<project>/CLAUDE.local.md — personal overrides (gitignored)
Best practices:
- Keep under 200-300 lines; shorter is better
- Put build/test/lint commands at the top
- Reference detailed docs by path instead of inlining (
See docs/ARCHITECTURE.md)
- Use
.claude/rules/ for modular, condition-specific instructions
- Press
# during any session to open the memory prompt and update CLAUDE.md on the fly
Minimal starter:
# Project: my-app
# Commands
- Build: `npm run build`
- Test: `npm test`
- Lint: `npm run lint -- --fix`
# Conventions
- TypeScript strict mode
- No default exports
- Commits: feat/fix/chore(scope): description
# Key References
- Architecture: docs/ARCHITECTURE.md
- DB schema: docs/SCHEMA.md
Click to copy
MCP Integration
# Add an MCP server
claude mcp add --transport http github https://mcp.github.com
claude mcp add --transport stdio postgres npx @modelcontextprotocol/server-postgres
# Expose Claude Code as an MCP server
claude mcp serve
# Debug MCP connection
claude --debug "mcp"
Click to copy
.mcp.json example:
{
"mcpServers": {
"github": {
"type": "stdio",
"command": "npx",
"args": ["@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_TOKEN"
}
},
"postgres": {
"type": "stdio",
"command": "npx",
"args": ["@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
}
}
}
}
Click to copy
MCP tool search (lazy loading):
- Enabled by default since early 2026
- Reduces context usage ~95%; tools loaded on demand
- Set
ENABLE_TOOL_SEARCH=true when using ANTHROPIC_BASE_URL
MCP Elicitation:
- MCP servers can display interactive forms or open browser URLs mid-task to collect structured input
- Intercept with
Elicitation and ElicitationResult hooks
MCP channels (--channels):
- Research preview
- Allows MCP servers to push messages into your active session
- Channel servers with
permission capability can forward tool approval prompts to your phone
Plugin Marketplace
Available on Team and Enterprise plans.
Install and manage:
/plugin # Open marketplace browser
/plugin install owner/repo # Install from GitHub
/plugin validate # Validate frontmatter + hooks
/plugin uninstall <name> # Uninstall (prompts before deleting data)
Click to copy
Available plugin collections:
- Knowledge Work Plugins — 11 categories (productivity, research, writing, etc.)
- Financial Services Plugins — 41 skills with MCP data integrations
Inline plugin source (no marketplace entry needed):
{
"plugins": [
{
"source": "settings",
"name": "my-plugin",
"skills": [...]
}
]
}
Click to copy
Plugin persistent state:
${CLAUDE_PLUGIN_DATA} — data directory that survives plugin updates
- Ref-tracked plugins re-clone on every load to pick up upstream changes
Skills System (Custom)
File Structure
.claude/skills/<skill-name>/
SKILL.md # Required: frontmatter + instructions
support-file.md # Optional: templates, examples, reference docs
script.sh # Optional: supporting scripts
Click to copy
SKILL.md Frontmatter Reference
---
name: skill-name # becomes /skill-name
description: When to use this skill # Claude reads this to auto-invoke
argument-hint: "[arg1] [arg2]" # Shown in /help
allowed-tools: [Read, Bash(git *)] # Restrict tool access
model: sonnet # Override model for this skill
effort: low # Override effort level (low/medium/high)
disable-model-invocation: false # true = never auto-invoke
user-invocable: true # Show in /help listing
context: fork # Run in a subagent (keeps main context clean)
agent: Explore # Use a specific built-in agent type
initialPrompt: "Start by reading..." # Auto-submits first turn in agent
maxTurns: 20 # Limit agent turns
disallowedTools: [Bash] # Block specific tools in this skill
---
Click to copy
Variables in Skills
| Variable | Value |
|---|
$ARGUMENTS | Full argument string passed to the skill |
$ARGUMENTS[0], $ARGUMENTS[1] | Indexed arguments |
${CLAUDE_SKILL_DIR} | Path to the skill's directory |
${CLAUDE_SESSION_ID} | Current session ID |
!`` (backtick prefix) | Shell command output injected as dynamic context |
Scopes
| Location | Scope |
|---|
.claude/skills/ | Project-level; team-shared if committed |
~/.claude/skills/ | Personal; available in all projects |
Commands vs Skills (Unified since v2.1.3)
.claude/commands/*.md — legacy format; still works; single-file; manual invocation only
.claude/skills/*/SKILL.md — recommended format; supports auto-invocation, supporting files, full frontmatter
- Both invoke with
/name; skills support richer features
Quick Reference: Effort Levels
| Level | Symbol | Default For | Cost |
|---|
low | ○ | — | Lowest |
medium | ◐ | Opus 4.6 (Max/Team) | Moderate |
high | ● | — | High |
ultrathink keyword | — | One-turn override | Highest |
max effort level removed in March 2026. Use ultrathink keyword for single-turn max depth.
Quick Reference: Scheduling Decision Tree
Need to schedule a task?
├── In current terminal session only?
│ └── /loop [interval] <prompt>
│
├── Needs to survive session close but run locally?
│ └── Desktop Scheduled Tasks (Desktop sidebar)
│
├── Needs to run without your machine / laptop closed?
│ └── /schedule (cloud tasks on Anthropic infra)
│
└── Needs to run on every git event / CI trigger?
└── GitHub Actions with Claude Code SDK
Click to copy
Common Workflow Patterns
Start a new project
/init # interview-based CLAUDE.md generation
/plan # review approach before touching files
Click to copy
Long session hygiene
/context # check window usage
/compact # compress when > 80% full; add focus instructions
/clear # hard reset when switching tasks
Click to copy
Safe large-scale changes
/batch migrate all API calls to use the new fetch wrapper
# Review plan > approve > agents run in isolated worktrees > PRs created
Click to copy
Code cleanup before PR
/simplify # full 3-agent review
/simplify focus on memory leaks # targeted review
Click to copy
Monitor a deployment
/loop 2m check deploy status and notify me if it fails
Click to copy
Ask a side question without derailing Claude
/btw what was the config file path we used earlier?
Click to copy
Recover from a mistake
Esc + Esc # open rewind menu
# choose: Rewind code only (keep conversation)
# or: Rewind code and conversation
Click to copy
Multi-model cost optimization
/model sonnet # default; handles 80% of tasks
/model opus # switch for complex architecture or hard bugs
ultrathink # force max reasoning for one turn without switching models
/model sonnet # switch back after the hard part
Click to copy
Last updated: March 2026 | Covers Claude Code v2.1.63 through v2.1.81
Run claude --version to check your current version
Run /release-notes inside a session for the latest changes