Claude Code Cheat Sheet

Claude Code Cheat Sheet! Complete reference for slash commands, bundled skills, CLI flags, keyboard shortcuts, environment variables, hooks, config files, and scheduling. Updated through v2.1.81.

Version 1.0.0Updated 03/25/2026, 08:00 PM EST84 views

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.

SkillDescription
/simplify3 parallel review agents (reuse, quality, efficiency); auto-fixes issues in changed files
/batchPlans and executes large-scale migrations using isolated git worktrees; up to 30 parallel units; auto-creates PRs
/loopIn-session cron scheduler; fires prompts on interval; session-scoped
/btwSide-channel question mid-task; ephemeral, low-cost, no tools consumed
/reviewMulti-agent code review
/debugBundled debugging skill
/claude-apiAuto-invoked when code imports Anthropic SDK (anthropic, @anthropic-ai/sdk, claude_agent_sdk)

Slash Commands

Session Management

CommandDescription
/clearWipe conversation history and free all context (also /reset, /new)
/compact [focus]Compress history into dense summary; optional focus instruction to control what survives
/contextShow context window usage with actionable suggestions (bloat, heavy tools, capacity warnings)
/resumeDisplay session picker to resume a previous session
/branchCreate a conversation branch for safe experimentation (renamed from /fork; /fork still works)
/rewindRoll 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
/tagTag current session for retrieval
/export [filename]Export conversation as plain text
/forkAlias for /branch

Context and Files

CommandDescription
/diffInteractive 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
/todosShow outstanding tasks Claude is tracking

Model and Effort

CommandDescription
/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
/fastToggle Fast Mode (speed-optimized Opus 4.6; ~2.5x faster)

Permissions and Config

CommandDescription
/plan [description]Toggle plan mode; optional description immediately starts execution
/permissionsManage tool/permission rules with tab/arrow key navigation
/configOpen config menu; includes "Show turn duration" toggle
/keybindingsOpen and edit ~/.claude/keybindings.json; changes take effect immediately
/vimToggle vim keybinding mode for input

Scheduling

CommandDescription
/loop [interval] <prompt>Schedule recurring in-session prompt; e.g., /loop 5m check deploy status
/scheduleCreate cloud-based scheduled tasks that run on Anthropic infrastructure

Agentic / Multi-Agent

CommandDescription
/simplify [focus]Run 3 parallel review agents on changed files; optional focus text
/batch <description>Plan and execute large-scale parallel code migrations
/reviewMulti-agent code review

Voice and Remote

CommandDescription
/voiceToggle push-to-talk voice mode; hold spacebar to speak
/remote-controlBridge VS Code session to claude.ai/code to continue from browser or phone

Info and Diagnostics

CommandDescription
/helpShow all available commands and skills
/skillsList all available skills (built-in and custom)
/statusRead current config: model, permissions, MCP servers, tool state
/doctorRun environment diagnostics; reports failures with actionable errors
/costShow current session token cost (API billing users)
/usageShow plan-level limits and rate limit status
/statsShow usage progress against plan limits (Pro/Max users)
/release-notesView what changed in the current version
/insightsAnalyze your own usage patterns
/heapdumpMemory diagnostic tool

Plugin Management

CommandDescription
/pluginInstall, update, validate, and uninstall plugins
/plugin validateCheck skill/agent/command frontmatter and hooks/hooks.json

MCP

CommandDescription
/mcpManage MCP server connections interactively
/mcp__[server]__[prompt]Call a specific MCP server prompt directly

Init and Setup

CommandDescription
/initScan project and generate CLAUDE.md; v2 interviews you before generating
/terminal-setupInstall terminal keybindings (enables Shift+Enter for newlines, etc.)

Color and UX

CommandDescription
/color <color>Set prompt-bar color for the current session

Input Prefix Shortcuts

PrefixBehavior
!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

FlagDescription
claudeStart interactive session
claude "prompt"Start session with initial prompt
claude -p "prompt"One-time non-interactive query (print mode)
claude -cContinue 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

FlagDescription
--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

FlagDescription
--bareScripted -p calls; skips hooks, LSP, plugin sync, skill walks; requires ANTHROPIC_API_KEY
--dangerously-skip-permissionsSkip all permission prompts (use only in trusted containers)
--enable-auto-modeEnable Auto Mode (research preview); AI classifier approves/blocks actions
--channels(Research preview) Allow MCP servers to push messages into your session
--consoleUse claude auth login --console for Anthropic Console / API billing auth

Context and Directories

FlagDescription
--add-dir <path>Add additional working directory to session context
--worktreeStart 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

FlagDescription
--agents <JSON>Define agent team configuration at startup

MCP

FlagDescription
claude mcp addAdd an MCP server
claude mcp serveExpose Claude Code itself as an MCP server

Maintenance

FlagDescription
claude updateUpdate Claude Code to the latest version
claude --versionShow current version

Keyboard Shortcuts

macOS: Alt = Option. Configure Option as Meta in iTerm2: Settings > Profiles > Keys > Left Option = Esc+

Navigation and Control

ShortcutAction
Ctrl+CCancel current response / interrupt Claude
EscInterrupt Claude mid-response
Esc + EscOpen rewind menu (code-only or full rollback)
Ctrl+RSearch session input history
Ctrl+G / Ctrl+X Ctrl+EOpen external editor for current input
Shift+TabCycle permission modes: Default > Auto-accept > Plan Mode
TabToggle extended thinking on/off for next turn
Alt+T / Option+TToggle extended thinking
Alt+P / Option+POpen 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+KStop all background agents

Input Editing (Multi-line)

ShortcutAction
Shift+EnterInsert newline (run /terminal-setup to enable)
Option+EnterInsert newline (macOS)
Ctrl+JInsert newline
\ + EnterContinue on next line
Ctrl+SStash current input

Clipboard and Files

ShortcutAction
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:

KeywordThinking BudgetUse Case
think~4,000 tokensSimple reasoning tasks
think hard~10,000 tokensModerate complexity
think harder~16,000 tokensComplex logic, architecture
ultrathink~31,999 tokensMaximum 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

VariableDescription
ANTHROPIC_API_KEYAPI key for authentication
ANTHROPIC_BASE_URLOverride API base URL (proxy, Bedrock, Vertex)
ANTHROPIC_MODELSet default model
ANTHROPIC_DEFAULT_OPUS_MODELOverride Opus alias (useful for custom fine-tunes)
ANTHROPIC_DEFAULT_SONNET_MODELOverride Sonnet alias
ANTHROPIC_DEFAULT_HAIKU_MODELOverride Haiku alias
ANTHROPIC_CUSTOM_MODEL_OPTIONAdd a custom entry to the /model picker; use _NAME and _DESCRIPTION suffix variants for display
ANTHROPIC_BETASEnable beta features by name

Behavior Control

VariableDescription
CLAUDE_CODE_EFFORT_LEVELPersist effort level across sessions (low, medium, high)
CLAUDE_AUTOCOMPACT_PCT_OVERRIDEOverride auto-compaction threshold (default ~95%)
CLAUDE_CODE_DISABLE_AUTO_MEMORYTemporarily disable AutoMemory for a session
CLAUDE_CODE_DISABLE_1M_CONTEXTDisable 1M context window
CLAUDE_CODE_DISABLE_CRONDisable all scheduled cron jobs (/loop becomes unavailable)
ENABLE_TOOL_SEARCHEnable lazy MCP tool loading even when ANTHROPIC_BASE_URL is set
ENABLE_CLAUDEAI_MCP_SERVERSOpt out of claude.ai managed MCP servers (false to disable)

Security and Subprocesses

VariableDescription
CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1Strip Anthropic and cloud provider credentials from subprocess environments (Bash tool, hooks, MCP stdio)
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETASSuppress experimental beta headers (fixes 400 errors on proxy gateways / Bedrock / Vertex)

Plugins and Seeds

VariableDescription
CLAUDE_CODE_PLUGIN_SEED_DIRSeed directory for plugins; supports multiple dirs separated by : (Unix) or ; (Windows)

Hooks and Sessions

VariableDescription
CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MSOverride SessionEnd hook timeout in milliseconds

Scheduling

VariableDescription
CLAUDE_CODE_DISABLE_CRON=1Disable 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

EventFires When
PreToolUseBefore any tool call executes
PostToolUseAfter a tool call completes
StopWhen Claude ends a turn normally
StopFailureWhen a turn ends due to API error (rate limit, auth failure)
PostCompactAfter context compaction completes
SessionEndWhen the session closes
ElicitationWhen an MCP server requests structured input
ElicitationResultAfter an MCP elicitation response is given

Hook Types

TypeDescription
Shell command hookRuns a local script; receives JSON on stdin; exit code 0 = success, exit code 2 = block action
JSON-output hookPOSTs 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)

ModeBehavior
DefaultClaude asks approval for each file edit and bash command
Auto-acceptAutomatically approves all actions (use with caution)
Plan ModeClaude proposes each action and waits for your approval before executing
Auto ModeAI 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:

  1. ~/.claude/CLAUDE.md — global, all projects
  2. <project>/CLAUDE.md — project-level (committed, team-shared)
  3. <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

VariableValue
$ARGUMENTSFull 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

LocationScope
.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

LevelSymbolDefault ForCost
lowLowest
mediumOpus 4.6 (Max/Team)Moderate
highHigh
ultrathink keywordOne-turn overrideHighest

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