| Key | Action |
|---|---|
| Shift+Tab | Cycle modes: Normal → Auto-Accept → Plan |
| Opt+T | Toggle extended thinking new |
| Ctrl+S | Stash current prompt new |
| Esc Esc | Rewind — undo code + conversation |
| Ctrl+C | Cancel current generation |
| Ctrl+D | Exit Claude Code session |
| Ctrl+B | Push running task to background |
| Ctrl+R | Reverse-search prompt history |
| Ctrl+T | Toggle task list view |
| Ctrl+L | Clear terminal screen |
| Ctrl+O | Toggle verbose output |
| Ctrl+V | Paste image from clipboard |
| Shift+Enter | New line (native since v2.1) |
Cmd+Esc toggle focus · Cmd+Opt+K insert @file? to see shortcuts for your terminal
| /clear | Reset context use between tasks! |
| /compact | Compress history (at ~70%) |
| /context | Visualize context usage grid |
| /resume | Resume a previous session |
| /rewind | Rewind conversation + code |
| /export | Export conversation to file |
| /init | Generate CLAUDE.md for project |
| /model | Switch model mid-session |
| /memory | Edit CLAUDE.md files directly |
| /permissions | Manage tool permissions |
| /config | Open settings UI |
| /doctor | Health check installation |
| /chrome | Connect Chrome for visual tests |
| /sandbox | Sandboxed bash (safer YOLO) |
| /review | Request code review |
| /security-review | Security audit of changes |
| /skills | List available skills |
| /mcp | Manage MCP server connections |
| /todos | List current task items |
| /cost | Show token usage stats |
| /usage | Plan limits & rate status |
| /hooks | Manage automation hooks |
| /plugin | Plugin marketplace |
| /agents | Manage custom subagents |
| /tasks | List & manage background tasks new |
| ! | Run bash directly (no AI interpretation) |
| @ | File path autocomplete & reference |
| / | Slash command |
/permissions or /sandbox over --dangerously-skip-permissions
Start almost every non-trivial task in Plan Mode.
Shift+Tab cycles: Normal → Auto-Accept → Plan Mode → Normal
A good plan includes: what to build, files affected, risks, and how to verify.
Auto-enabled by default. Toggle with Opt+T. Turn off for simple tasks to save tokens. Best for: architecture decisions, complex bugs, choosing between approaches.
Don't trust — measure. Always give Claude a way to check its own work.
| Method | How |
|---|---|
| Tests | pytest -v / npm test |
| Types | tsc --noEmit |
| Lint | eslint . / ruff check |
| Build | npm run build |
| Chrome | Visual check with extension |
| PRD | "Where are we vs the PRD?" |
Claude has 200K token context. Manage it or quality drops.
| <50% | All good, keep working |
| 50-70% | Consider /compact |
| >70% | /compact now or /clear |
/clear. Starting something new? /clear. Claude hallucinating? Check /context first.
@path/to/file.ts — include specific file
@docs/api-ref.md — include documentation
⚠️ Don't @-mention files inside CLAUDE.md — it bloats context permanently. Tell Claude to read them on demand instead.
| 1 | Create project folder + Claude project — create a folder and a Claude project on claude.ai with relevant docs. |
| 2 | Build PRD with Claude — describe your project in conversation. Claude asks questions, you answer. Save as PRD.md in your project folder. |
| 3 | Create a dedicated GitHub repo — git init + create remote repo. Add .gitignore and .env.example. |
| 4 | Prepare initial Claude Code prompt — in the same Claude chat that created the PRD, ask: "Write me a detailed first prompt for Claude Code." Claude already has full context. |
| 5 | Open VS Code → File → Open Folder — open your project folder in VS Code. |
| 6 | Open terminal → run claude — launch terminal, type claude (or --dangerously-skip-permissions). |
| 7 | Enter Plan Mode → paste prompt — Shift+Tab ×2 to enter Plan Mode. Paste the initial prompt you crafted in step 4. |
| 8 | Review plan carefully — 💡 Copy plan to your Claude project for a second opinion. Iterate until solid. |
| 9 | After implementation → /init — generate CLAUDE.md to capture project context for future sessions. |
| 1 | Plan — Plan Mode (Shift+Tab) for every significant step |
| 2 | Consult — discuss with Claude (desktop/web) in parallel |
| 3 | Verify — /verify-yourself |
| 4 | Commit — commit and push |
| 5 | Update memory — /update-claude-md |
| 6 | Security check — /security-review |
/clear between tasks · /compact mid-task · /clear on direction change
Use a research sub-agent: "Start an agent to research…" · Explore agent for codebase understanding
frontend-design skill for UI · Put API docs in docs/ folder for integrations
1. Be specific
File, function, expected vs actual.
2. Give context
Use @file refs, show patterns.
3. Break it down
One task at a time. Big = bad.
In CLAUDE.md: use "IMPORTANT", "YOU MUST", "NEVER" — emphasis words get more attention.
~/.claude/CLAUDE.md
Create once manually. Applies to ALL projects.
./CLAUDE.md
Create with /init. Commit to git & share with team!
Load order: Global → Project (project overrides) · Edit: /memory mid-conversation · Emphasis: "IMPORTANT", "YOU MUST", "NEVER"
| Model | Best for |
|---|---|
| Opus 4.5 | Complex, architecture Strongest |
| Sonnet 4.5 | Daily work, balanced Default |
| Haiku 4.5 | Search, simple tasks Fast |
Switch: /model or claude --model opus
| Plan | Price | Access |
|---|---|---|
| Pro | $20/mo | All models |
| Max 5x | $100/mo | More usage |
| Max 20x | $200/mo | Heavy usage |
Check limits: /cost (tokens) · /usage (rate limits)
| Explore | Search & read only (Haiku) |
| Plan | Planning mode (Sonnet) |
| Task | General-purpose sub-agent |
Claude auto-creates task lists for complex work. Ctrl+T to toggle. Tasks persist across /compact. Share across sessions with CLAUDE_CODE_TASK_LIST_ID=name claude
Create in .claude/agents/name.md with YAML frontmatter (name, description, model, tools). ⚠️ No nesting — subagents can't spawn subagents.
Code that runs automatically before/after Claude's actions. Configure in .claude/settings.json
PreToolUse Before · PostToolUse After · Notification Alerts
Ideas: auto-format · auto-lint · run tests on write · notify on complete
Debug: claude --debug to see hook execution
Skills = instruction folders loaded on-demand (Claude decides when). Plugins = packaged bundles. Since v2.1.3, commands & skills are unified.
| frontend-design | Anti-"AI slop" UI design |
| code-simplifier | Clean up after sessions |
| document-skills | docx, pdf, xlsx, pptx |
| superpowers | Battle-tested workflows |
Custom skills: .claude/skills/name/SKILL.md
Connect Claude to external tools via ~/.claude/mcp.json
| server-github | Repos, Issues, PRs |
| server-postgres | Query DB directly |
| server-slack | Read/write Slack |
| server-filesystem | Remote file access |
| server-puppeteer | Browser automation |
Manage: /mcp · MCP commands appear in /help
Claude can navigate, click, fill forms, screenshot, verify UI. Requires Chrome Extension v1.0.36+, Claude Code v2.0.73+, Pro/Max.
⚠️ Stops at logins/CAPTCHAs. Not supported: Brave, Arc, WSL.
Claude handles git natively — commits, pushes, creates PRs.
.claude/commands/name.md (project) or ~/.claude/commands/name.md (personal)
Syntax: !`cmd` = shell preprocessing (runs before prompt) · @file = include file · $ARGUMENTS = all args · $1 $2 = positional args