Most developers using Claude Code only scratch the surface. They type prompts, hit Enter, and wait. But Claude Code ships with 80+ slash commands, 60+ CLI flags, full vim mode, customizable keybindings, and keyboard shortcuts that make every interaction faster.
This is the complete reference. Every shortcut, every command, every flag, pulled from official Anthropic documentation and verified against the latest Claude Code release. Bookmark it, open it in a second tab, and come back every time someone mentions a command you've never heard of.
Learn How to build FullStack APP With Claude Code here.
Key Takeaways
Shift+Tab, which cycles through permission modes (Default, AcceptEdits, Plan, and Auto) so you can control how much Claude does without asking.Esc interrupts Claude mid-response without losing work; double Esc opens the rewind menu to roll back to a previous checkpoint.--worktree, --bare, and --output-format stream-json unlock automation and isolated parallel sessions that most developers never use./config) brings full NORMAL and VISUAL mode editing to the Claude Code input, including text objects and operator-motion combinations.~/.claude/keybindings.json and hot-reload without restarting Claude Code.claude-code-cheatsheet-promptslove.pdf
83 KB
Part 1: Interactive Mode Keyboard Shortcuts
These shortcuts work inside any active Claude Code session. No configuration needed for most of them.
Official reference: code.claude.com/docs/en/interactive-mode
Session and Navigation Controls
| Shortcut | What It Does |
|---|---|
| Shift+Tab | Cycle permission modes: Default > AcceptEdits > Plan > Auto > BypassPermissions |
| Esc | Interrupt Claude mid-response. Keeps work done so far |
| Esc + Esc (double) | When input has text: clear it, save draft to history. When input is empty: open rewind/checkpoint menu |
| Ctrl+C | Cancel current operation. Second press exits Claude Code. Cannot be rebound |
| Ctrl+D | Exit Claude Code (EOF signal). Cannot be rebound |
| Ctrl+O | Toggle verbose transcript viewer (shows tool usage, MCP calls) |
| Ctrl+R | Reverse search through command history |
| Ctrl+T | Toggle the task list in the status area |
| Ctrl+B | Background running tasks or bash commands. Tmux users press twice |
| Ctrl+X Ctrl+K | Stop all running background subagents. Press twice within 3 seconds to confirm |
| Ctrl+L | Redraw the screen. Keeps input and history. Use if display becomes garbled |
| Ctrl+G or Ctrl+X Ctrl+E | Open current prompt in your default external text editor |
| Alt+P (Win/Linux) or Option+P (Mac) | Switch model without clearing your current prompt |
| Alt+T (Win/Linux) or Option+T (Mac) | Toggle extended thinking mode |
| Alt+O (Win/Linux) or Option+O (Mac) | Toggle fast mode |
| Left/Right arrows | Cycle between tabs in permission dialogs and menus |
| Up/Down arrows | Navigate command history (or move cursor in multiline input first) |
| Ctrl+V | Paste image from clipboard (use Alt+V on Windows/WSL) |
| Ctrl+S (in history search) | Cycle history scope: this session > this project > all projects |
Text Editing Shortcuts (Readline-Style)
| Shortcut | What It Does |
|---|---|
| Ctrl+A | Move cursor to start of current line |
| Ctrl+E | Move cursor to end of current line |
| Ctrl+K | Delete from cursor to end of line (stores text for paste) |
| Ctrl+U | Delete from cursor to line start (stores text for paste) |
| Ctrl+W | Delete previous word (stores text for paste) |
| Ctrl+Y | Paste previously deleted text |
| Alt+Y (after Ctrl+Y) | Cycle through paste history |
| Alt+B | Move cursor back one word |
| Alt+F | Move cursor forward one word |
Mac note: Alt shortcuts require Option configured as Meta in your terminal. In iTerm2: Profiles > Keys > set Left/Right Option to "Esc+". In Apple Terminal: Settings > Profiles > Keyboard > check "Use Option as Meta Key". In VS Code: add "terminal.integrated.macOptionIsMeta": true.
Multiline Input Methods
| Method | Shortcut | Works In |
|---|---|---|
| Backslash + Enter | \ + Enter | All terminals |
| Ctrl+J | Ctrl+J | All terminals |
| Shift+Enter | Shift+Enter | iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal. Run /terminal-setup for VS Code, Cursor, Alacritty, Zed |
| Option+Enter | Option+Enter | Mac with Option configured as Meta |
Quick Input Prefixes
| Prefix | What It Does |
|---|---|
| / at start of input | Opens command/skill menu. Type letters to filter |
| ! at start of input | Shell mode. Runs command directly and adds output to session context |
| @ anywhere | Triggers file path autocomplete |
Part 2: Transcript Viewer and Overlay Shortcuts
Transcript Viewer (open with Ctrl+O)
| Shortcut | What It Does |
|---|---|
| ? | Toggle keyboard shortcut help panel |
| { / } | Jump to previous/next user prompt |
| Ctrl+E | Toggle "show all content" |
| [ | Write full conversation to terminal scrollback |
| v | Write conversation to temp file and open in $VISUAL or $EDITOR |
| q, Ctrl+C, or Esc | Exit transcript view |
/btw Side Question Overlay
The /btw command lets you ask a quick question without adding it to the main conversation. These keys control the overlay.
| Key | What It Does |
|---|---|
| Space, Enter, or Esc | Dismiss the answer and return to prompt |
| Up / Down | Scroll the answer |
| Left / Right | Step between this and earlier /btw answers |
| c | Copy answer to clipboard as raw Markdown |
| f | Fork into a new session (inherits full context and this Q&A) |
| x | Clear the earlier /btw exchange list |
History Search (Ctrl+R Mode)
Ctrl+R to activateCtrl+R again to cycle to older matchesCtrl+S to cycle scope: this session > this project > all projectsTab or Esc to accept and keep editing; Enter to accept and executeCtrl+C to cancel; Backspace on empty search to cancelPart 3: Vim Mode Shortcuts
Enable vim mode with /config > Editor mode, or set "editorMode": "vim" in ~/.claude/settings.json.
Official reference: code.claude.com/docs/en/keybindings.md
Mode Switching
| Key | Action | From Mode |
|---|---|---|
| Esc | Enter NORMAL mode | INSERT, VISUAL |
| i | Insert before cursor | NORMAL |
| I | Insert at beginning of line | NORMAL |
| a | Insert after cursor | NORMAL |
| A | Insert at end of line | NORMAL |
| o | Open new line below | NORMAL |
| O | Open new line above | NORMAL |
| v | Character-wise visual selection | NORMAL |
| V | Line-wise visual selection | NORMAL |
Navigation (NORMAL Mode)
| Key | Action |
|---|---|
| h/j/k/l | Left/down/up/right |
| w / e / b | Next word / end of word / previous word |
| 0 / $ / ^ | Line start / end / first non-blank |
| gg / G | Beginning / end of input |
| f{char} / F{char} | Jump to next/previous occurrence of a character |
| t{char} / T{char} | Jump to just before/after next occurrence |
| ; / , | Repeat last f/F/t/T motion / in reverse |
| / | Open reverse history search (same as Ctrl+R) |
Editing (NORMAL Mode)
| Key | Action |
|---|---|
| x | Delete character |
| dd / D | Delete line / delete to end of line |
| dw/de/db | Delete word/to end/back |
| cc / C | Change line / change to end of line |
| cw/ce/cb | Change word/to end/back |
| yy/Y | Yank (copy) line |
| yw/ye/yb | Yank word/to end/back |
| p / P | Paste after / before cursor |
| >> / << | Indent / dedent line |
| J | Join lines |
| u | Undo |
| . | Repeat last change |
Text Objects (with operators d, c, y)
| Object | Selects |
|---|---|
| iw/aw | Inner/around word |
| iW/aW | Inner/around WORD (whitespace-delimited) |
| i"/a" | Inner/around double quotes |
| i'/a' | Inner/around single quotes |
| i(/a( | Inner/around parentheses |
| i[/a[ | Inner/around brackets |
| i{/a{ | Inner/around braces |
Note: Block-wise visual mode with Ctrl+V is not supported in Claude Code's vim mode.
Part 4: Complete Slash Commands Reference
Official reference: code.claude.com/docs/en/commands
Session and Context Management
| Command | What It Does |
|---|---|
| /clear | Clear conversation history. Aliases: /reset, /new |
| /compact [instructions] | Summarize conversation to free up context window |
| /context | Visualize context window usage with optimization suggestions |
| /cost | Show token usage and session spend |
| /usage | Show plan limits, rate-limit status, and activity stats |
| /btw | Ask a quick side question without adding it to conversation history |
| /resume [session] | Reopen a previous session by ID or name. Alias: /continue |
| /rewind | Roll back conversation and code to a previous checkpoint. Aliases: /checkpoint, /undo |
| /export [filename] | Export current conversation as plain text |
| /copy [N] | Copy last assistant response to clipboard |
| /rename [name] | Rename the current session |
| /branch [name] | Fork current conversation into a new branch. Alias: /fork |
| /compact [focus] | Summarize conversation with optional focus instructions |
Planning and Execution
| Command | What It Does |
|---|---|
| /plan [description] | Enter plan mode directly from the prompt |
| /effort [level] | Set model effort level: low, medium, high, xhigh, max, auto |
| /model [model] | Switch the active model and save as default |
| /diff | Open interactive diff viewer showing uncommitted changes and per-turn diffs |
| /fast [on/off] | Toggle fast mode |
| /advisor [model/off] | Enable a second model that advises at key decision moments |
Project Setup and Memory
| Command | What It Does |
|---|---|
| /init | Initialize project with a CLAUDE.md guide |
| /memory | Edit CLAUDE.md files, enable/disable auto-memory, view auto-memory entries |
| /permissions | Manage allow/ask/deny rules for tool permissions. Alias: /allowed-tools |
| /config | Open configuration interface. Alias: /settings |
| /add-dir | Grant Claude access to an additional directory for the current session |
| /keybindings | Open or create your custom keybindings file |
Code Quality and Review
| Command | What It Does |
|---|---|
| /code-review [effort] [--fix] [--comment] [target] | Review diff for bugs. --fix applies findings; --comment posts GitHub PR comments |
| /review [PR] | Read-only review of a GitHub pull request |
| /security-review | Analyze pending changes for security vulnerabilities |
| /simplify [target] | Parallel agents review changed code for cleanup opportunities |
| /ultrareview [PR] | Alias for /code-review ultra - deep multi-agent cloud review |
GitHub and CI Integration
| Command | What It Does |
|---|---|
| /install-github-app | Walk through installing the Claude GitHub App and Actions workflow |
| /install-slack-app | Install the Claude Slack app via OAuth flow |
| /pr-comments [PR] | Fetch and display GitHub PR comments (requires gh CLI) |
| /autofix-pr [prompt] | Spawn a Claude Code session to watch your PR and push fixes when CI fails |
Parallel Agents and Background Work
| Command | What It Does |
|---|---|
| /batch | Decompose large changes across parallel worktree agents |
| /agents | List and manage agent configurations |
| /tasks | View and manage everything running in the background. Alias: /bashes |
| /background [prompt] | Detach current session to run as a background agent. Alias: /bg |
| /loop [interval] [prompt] | Run a prompt repeatedly while the session stays open. Alias: /proactive |
| /schedule [description] | Create, update, list, or run cloud scheduled tasks. Alias: /routines |
| /fork | Spawn a subagent that inherits full conversation and works on the directive |
| /goal [condition] | Set a goal and let Claude keep working until the condition is met |
Tooling and Environment
| Command | What It Does |
|---|---|
| /mcp | Manage MCP server connections and OAuth authentication |
| /hooks | View hook configurations for tool lifecycle events |
| /skills | List available skills in this session |
| /plugin | Install and manage Claude Code plugins |
| /vim | Toggle vim editing mode. Note: removed in v2.1.92; use /config > Editor mode instead |
| /voice [hold/tap/off] | Toggle voice dictation or set the input mode |
| /statusline | Configure Claude Code's status line |
| /color [color] | Set prompt bar color: red, blue, green, yellow, purple, orange, pink, cyan |
| /terminal-setup | Configure Shift+Enter in terminals that need it (VS Code, Cursor, Alacritty, Zed) |
| /theme | Change color theme (light, dark, daltonized, ANSI variants) |
| /sandbox | Toggle sandbox mode |
| /ide | Manage IDE integrations and show connection status |
| /remote-control | Make this session available for remote control from claude.ai. Alias: /rc |
| /teleport | Pull a cloud session into your local terminal. Alias: /tp |
Diagnostics and Help
| Command | What It Does |
|---|---|
| /help | Show all available commands |
| /doctor | Diagnose installation and settings issues. Press f to fix reported problems |
| /feedback | Submit feedback or report a bug with session context attached. Alias: /bug |
| /status | Show account, model, working directory, and version (opens while Claude responds) |
| /release-notes | View full changelog in an interactive version picker |
| /insights | Generate a report analyzing your Claude Code sessions |
| /stats | Visualize daily usage, session history, and model preferences |
Authentication and Account
| Command | What It Does |
|---|---|
| /login | Sign in to your Anthropic account |
| /logout | Sign out from your Anthropic account |
| /upgrade | Open the upgrade page to switch to a higher plan tier |
| /usage-credits | Configure usage credits to keep working when rate limits are hit |
| /privacy-settings | View and update privacy settings (Pro and Max plans only) |
| /mobile | Show QR code to download the Claude mobile app. Aliases: /ios, /android |
| /desktop | Continue the current session in the Claude Code Desktop app. Alias: /app |
Command Aliases Reference
| Alias | Points To |
|---|---|
| /allowed-tools | /permissions |
| /android, /ios | /mobile |
| /app | /desktop |
| /bashes | /tasks |
| /bg | /background |
| /bug | /feedback |
| /checkpoint, /undo | /rewind |
| /continue | /resume |
| /cost, /stats | /usage |
| /new, /reset | /clear |
| /proactive | /loop |
| /quit | /exit |
| /rc | /remote-control |
| /routines | /schedule |
| /settings | /config |
| /share | /feedback |
| /tp | /teleport |
Part 5: CLI Flags Reference
These flags launch at the command line when starting Claude Code. All flags work with claude followed by the flag.
Official reference: code.claude.com/docs/en/cli-reference
Core Launch Commands
| Command | What It Does |
|---|---|
| claude | Start an interactive session |
| claude "query" | Start with an initial prompt |
| claude -p "query" | Print mode: send query and exit without interactive session |
| cat file.txt | claude -p "query" | Process piped content |
| claude -c | Continue the most recent conversation in the current directory |
| claude -r "session-id" "query" | Resume a session by ID or name |
| claude update | Update to the latest version |
Model and Output Flags
| Flag | What It Does | Example |
|---|---|---|
| --model / -m | Set the model: sonnet, opus, haiku, or full model ID | claude --model opus |
| --fallback-model | Fallback model when primary is unavailable | claude --fallback-model haiku |
| --print / -p | Non-interactive print mode | claude -p "query" |
| --output-format | Output format: text, json, stream-json | claude -p --output-format json "query" |
| --input-format | Input format: text or stream-json | claude -p --input-format stream-json |
| --verbose | Enable verbose logging with full turn-by-turn output | claude --verbose |
| --version / -v | Print the current version | claude -v |
Session Flags
| Flag | What It Does | Example |
|---|---|---|
| --continue / -c | Load most recent conversation | claude -c |
| --resume / -r | Resume a session by ID or name | claude -r "auth-refactor" |
| --fork-session | Create a new session from an existing one instead of resuming it | claude -r abc123 --fork-session |
| --name / -n | Set a display name for the session | claude -n "my-feature" |
| --session-id | Use a specific session ID (must be valid UUID) | claude --session-id "550e8400..." |
| --no-session-persistence | Disable saving the session (print mode only) | claude -p --no-session-persistence "query" |
| --from-pr | Load context from a pull request URL or number | claude --from-pr 123 |
System Prompt Flags
| Flag | What It Does | Example |
|---|---|---|
| --system-prompt | Replace the entire system prompt | claude --system-prompt "You are a Python expert" |
| --system-prompt-file | Load system prompt from file | claude --system-prompt-file ./prompt.txt |
| --append-system-prompt | Add text on top of the default system prompt | claude --append-system-prompt "Always suggest tests" |
| --append-system-prompt-file | Append file contents to default prompt | claude --append-system-prompt-file ./extra.md |
Note: --system-prompt and --system-prompt-file are mutually exclusive. Append flags combine with either.
Tool and Permission Flags
| Flag | What It Does | Example |
|---|---|---|
| --allowedTools | Pre-approve specific tools without prompts. Supports glob patterns | claude --allowedTools "Bash(git:*)" "Read" |
| --disallowedTools | Block specific tools for the session | claude --disallowedTools "Bash(rm:*)" |
| --permission-mode | Set permission mode at launch: default, plan, acceptEdits, dontAsk, bypassPermissions, auto | claude --permission-mode plan |
| --dangerously-skip-permissions | Skip all permission prompts. Use only in sandboxed environments | claude --dangerously-skip-permissions |
| --permission-prompt-tool | Use an MCP tool to handle permission prompts programmatically | claude -p --permission-prompt-tool mcp_auth "query" |
Context and Directory Flags
| Flag | What It Does | Example |
|---|---|---|
| --add-dir | Add additional working directories for file access | claude --add-dir ../lib ../apps |
| --mcp-config | Load MCP server configurations from a JSON file or string | claude --mcp-config ./mcp.json |
| --strict-mcp-config | Only use MCP servers from --mcp-config, ignore all others | claude --mcp-config ./mcp.json --strict-mcp-config |
Automation and Limits Flags
| Flag | What It Does | Example |
|---|---|---|
| --max-turns | Limit the number of agentic turns (print mode only) | claude -p --max-turns 3 "query" |
| --max-budget-usd | Cap the cost budget in USD | claude --max-budget-usd 0.50 |
| --json-schema | Enforce a JSON schema on the output | claude -p --json-schema '{"type":"object"}' "query" |
| --bare | Skip auto-discovery of CLAUDE.md, hooks, skills, plugins, and MCP. ~10x faster for CI | claude --bare -p "query" |
| --include-partial-messages | Include partial streaming events (stream-json mode) | claude -p --output-format stream-json --include-partial-messages "query" |
Parallel Work Flags
| Flag | What It Does | Example |
|---|---|---|
| --worktree / -w | Start session in an isolated git worktree | claude -w feature-auth |
| --tmux | Create a tmux session for the worktree | claude -w feature-auth --tmux |
| --background / --bg | Start as a background agent and return immediately | claude --bg "investigate the flaky test" |
| --agent | Specify a custom agent for the session | claude --agent code-reviewer |
| --teammate-mode | Set how team agent teammates display | claude --teammate-mode auto |
Debugging Flags
| Flag | What It Does | Example |
|---|---|---|
| --debug | Enable debug-level logging | claude --debug |
| --debug-file | Write debug logs to a file (implicitly enables debug) | claude --debug-file ./debug.log |
| --safe-mode | Start with all customizations disabled for troubleshooting (v2.1.169+) | claude --safe-mode |
| --no-color | Disable colored output for log files or pipes | claude --no-color |
Short-Form Flag Summary
| Short | Long | Purpose |
|---|---|---|
| -p | Non-interactive print mode | |
| -c | --continue | Continue last session |
| -r | --resume | Resume session by ID |
| -m | --model | Set model |
| -v | --version | Print version |
| -w | --worktree | Git worktree session |
| -n | --name | Name the session |
Part 6: Customizable Keybindings
Claude Code lets you remap almost every action. Run /keybindings to create or open ~/.claude/keybindings.json. Changes hot-reload without restarting.
Official reference: code.claude.com/docs/en/keybindings
Actions That Cannot Be Rebound
These three are hardcoded at the OS level:
Ctrl+C: interrupt/cancelCtrl+D: exitCtrl+M: identical to Enter in all terminalsExample Keybindings JSON
{
"chat:newline": ["Ctrl+J"],
"chat:externalEditor": ["Ctrl+G"],
"app:toggleTranscript": ["Ctrl+O"],
"history:search": ["Ctrl+R"],
"chat:cycleMode": ["Shift+Tab"],
"transcript:exit": ["q", "Ctrl+C", "Escape"]
}Key Bindable Actions by Category
| Action | Default | What It Does |
|---|---|---|
| app:interrupt | Ctrl+C | Cancel current operation |
| app:exit | Ctrl+D | Exit Claude Code |
| app:toggleTodos | Ctrl+T | Toggle task list visibility |
| app:toggleTranscript | Ctrl+O | Toggle verbose transcript |
| chat:cancel | Escape | Cancel current input |
| chat:submit | Enter | Submit message |
| chat:newline | Ctrl+J | Insert newline without submitting |
| chat:cycleMode | Shift+Tab | Cycle permission modes |
| chat:externalEditor | Ctrl+G | Open in external editor |
| chat:imagePaste | Ctrl+V | Paste image |
| chat:thinkingToggle | Cmd+T / Meta+T | Toggle extended thinking |
| chat:fastMode | Meta+O | Toggle fast mode |
| history:search | Ctrl+R | Open history search |
| history:previous | Up | Previous history item |
| history:next | Down | Next history item |
| task:background | Ctrl+B | Background current task |
| transcript:toggleShowAll | Ctrl+E | Toggle show all content |
| transcript:exit | q, Ctrl+C, Escape | Exit transcript view |
| voice:pushToTalk | Space | Hold to dictate a prompt |
Part 7: CLAUDE.md and Memory System
The CLAUDE.md file is not a shortcut in the traditional sense, but understanding it speeds up every session.
Official reference: code.claude.com/docs/en/memory
File Load Order (Broadest to Most Specific)
| Scope | Location |
|---|---|
| Organization policy | /Library/Application Support/ClaudeCode/CLAUDE.md (macOS) |
| User (all projects) | ~/.claude/CLAUDE.md |
| Project (team-shared) | ./CLAUDE.md or ./.claude/CLAUDE.md |
| Local (gitignored) | ./CLAUDE.local.md |
| User-level rules | ~/.claude/rules/*.md |
| Project rules | ./.claude/rules/*.md |
Memory Shortcuts
/init to auto-generate CLAUDE.md from your codebase@path/to/file inside CLAUDE.md to import other files (max 4 hops deep)) get stripped from Claude's context; use them for maintainer notes/compact; your project rules stay intact after context summarization~/.claude/projects//memory/MEMORY.md Part 8: Hooks Reference
Hooks run shell commands at specific lifecycle points. Set them up in /config or ~/.claude/settings.json.
Official reference: code.claude.com/docs/en/hooks
| Hook Event | Best Use Case |
|---|---|
| SessionStart | Load dynamic context at session start |
| PreToolUse | Log bash commands before execution; validate inputs |
| PostToolUse | Auto-format files after Write/Edit; lint after edits |
| PermissionRequest | Route permission prompts to Slack or another review system |
| Stop | Run checks after long tasks; nudge Claude to continue |
| PostCompact | Re-inject critical instructions after compaction |
| InstructionsLoaded | Log which CLAUDE.md files loaded |
| SubagentStop | Run when a subagent completes |
Example: Sound on Completion (macOS)
{
"hooks": {
"Stop": [{
"hooks": [{
"type": "command",
"command": "afplay /System/Library/Sounds/Pop.aiff"
}]
}]
}
}Example: Auto-Lint After Edits
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "bun run format || true"
}]
}]
}
}Part 9: Power User Workflows
Parallel Sessions with Worktrees
Run claude --worktree feature-auth --tmux to start an isolated session in its own tmux pane. Changes happen in a separate git worktree, not your main branch. Color-code sessions with /color and name them with /rename so you know which pane does what.
Use /batch for large-scale changes. It decomposes the task into independent units, sends each to a separate worktree agent, and merges results. Useful for renaming variables across 50 files or updating an API contract everywhere it appears.
CI and Automation
Use --bare -p --output-format stream-json as your standard CI pattern. The --bare flag skips CLAUDE.md, skills, plugins, and MCP auto-discovery, which makes startup roughly 10 times faster. The --output-format stream-json flag gives you newline-delimited JSON events for pipeline integration.
Add --json-schema with a strict schema to get structured output without brittle text parsing.
claude -p --bare --output-format json \
--json-schema '{"type":"object","properties":{"risk":{"type":"string"}}}' \
"Analyze this diff for security issues"Context Hygiene
Use /clear between unrelated tasks. Context bleed from an earlier conversation can cause Claude to make wrong assumptions in the next one.
Use /compact "keep only the authentication changes" with a specific focus instruction rather than plain /compact. The focus instruction tells Claude what to preserve in the summary, so important context survives the compression.
Use /context before starting a long task to see how much budget you have left. If the window is nearly full, compact before you start, not after you run into limits mid-task.
Verification Loop
Give Claude a feedback mechanism and tell it to verify its own work. Browser automation via the Chrome extension, test suites via bash, and screenshot diffing all work as verification tools.
Prompts that push Claude to self-verify: "Prove to me this works", "Run the tests and fix any failures", "Knowing everything you know now, is this the right implementation?"
Frequently Asked Questions (FAQs)
What does Shift+Tab do in Claude Code?
Shift+Tab cycles through permission modes: Default, AcceptEdits, Plan, and (if enabled) Auto and BypassPermissions. Default mode asks before every action. AcceptEdits approves file edits but asks for shell commands. Plan mode lets Claude explore and propose changes but never executes anything. Cycling between them mid-session lets you tighten or loosen control without restarting.
How do I interrupt Claude Code without losing the work it did?
Press Esc once. Claude stops the current response or tool call but keeps everything it completed before you interrupted. This is different from Ctrl+C, which cancels the current input, and double Esc, which opens the rewind menu to roll back to a checkpoint.
What is the fastest way to run Claude Code in a CI pipeline?
Use claude -p --bare --output-format stream-json "your query". The -p flag runs non-interactively and exits after the response. The --bare flag skips CLAUDE.md, skills, plugins, hooks, and MCP auto-discovery, making startup roughly 10 times faster. The --output-format stream-json flag gives you parseable newline-delimited JSON events.
How do I use multiple directories in one Claude Code session?
Use --add-dir at launch: claude --add-dir ../backend ../frontend. You can also run /add-dir inside a session to add a directory without restarting. This tells Claude Code which directories it can read and write during the session.
What is the difference between /compact and /clear?
/compact summarizes the current conversation and replaces it with a condensed version. Your project memory (CLAUDE.md) stays intact and the session continues. /clear wipes all conversation history and starts fresh while keeping you in the same session. Use /compact when you want to free context but keep going. Use /clear when you're starting a completely different task.
How do I create a custom slash command?
Create a SKILL.md file in .claude/skills/ (new format) or a .md file in .claude/commands/ (legacy format). The filename becomes your /name command. Skills support frontmatter to control invocation, supporting files in the same directory, inline shell execution, and subagent delegation. Run /reload-skills to pick up changes without restarting.
How do I stop Claude from asking for permissions on every action?
Three options depending on your trust level. First: use Shift+Tab to switch to AcceptEdits mode (approves file edits automatically, still asks for shell commands). Second: use --allowedTools "Bash(git:*)" "Read" "Write" at launch to pre-approve specific tools by glob pattern. Third: use --permission-mode dontAsk or --dangerously-skip-permissions for fully automated environments where you accept the risk of unrestricted execution.
Final Thoughts
Claude Code's keyboard shortcuts, slash commands, and CLI flags are not just convenience features. They change how you work at a fundamental level. Knowing that Shift+Tab cycles permission modes means you can switch from careful to fast without touching the keyboard more than once. Knowing that --bare -p makes Claude Code 10 times faster in CI means your pipelines don't have to wait.
The official documentation gets updated regularly as new versions ship. Run /release-notes inside any session to see what changed. Set up a ~/.claude/CLAUDE.md with your personal preferences so every project starts exactly the way you like it. And if something is not working the way you expect, /doctor usually tells you why.





