Keyboard Shortcuts
15 shortcutsInterrupt current response or cancel a running tool. Hit twice to clear input.
Submit your message. Use Shift+Enter for a newline without submitting.
Navigate message history. Up recalls your previous prompt.
Clear terminal display. Context is preserved — different from /clear.
Open current input in your $EDITOR (vim, nano, VS Code). Great for long prompts.
Cancel the current operation mid-stream. Claude stops generating immediately.
Toggle Fast Mode — same Opus model, faster output. Useful for quick iterations.
Approve a tool use request. n to deny. a to approve all remaining.
Slash Commands
25+ commandsWipe conversation context. Use between unrelated tasks to avoid context bleed.
Summarize conversation history to free context window. Keeps key facts, drops noise.
Show all available commands and current configuration.
Switch Claude model mid-session. /model opus, /model sonnet.
Review a GitHub PR. Pass the PR number: /review-pr 123
Auto-generate a commit message from staged changes and commit.
Check Claude Code setup health: API key, permissions, MCP status, config.
Show current git status, model, context usage, and active MCP connections.
Open the interactive settings panel — permissions, model, theme, hooks.
List connected MCP servers and their available tools.
Exit Claude Code cleanly. Also works: /exit
Toggle Fast Mode. Faster responses, same Opus model — no quality loss.
CLI Flags & Launch Options
Non-interactive mode. Pipe output to files or other tools.
Auto-approve all tool calls. Use only in trusted automation scripts — never on prod.
Start with a specific model.
Resume the most recent conversation. Picks up exactly where you left off.
Resume a specific past session by ID. IDs visible in /status.
Add extra directories to Claude's context beyond the current working directory.
Hooks — Automate Anything
PowerfulHooks run shell commands on specific Claude Code events. Configured in settings.json under hooks.
Fires before Claude calls any tool. Env: $CLAUDE_TOOL_NAME, $CLAUDE_TOOL_INPUT. Exit code 2 to block the tool.
Fires after tool completes. Env: $CLAUDE_TOOL_RESULT. Great for logging, notifications.
Fires when Claude needs your attention. Env: $CLAUDE_NOTIFICATION. Use to push alerts to Slack, phone, etc.
Fires when Claude finishes a response. Play a sound, send a webhook, run tests.
Fires when you submit a message. Env: $CLAUDE_USER_PROMPT. Use to log every prompt or enforce rules.
Fires when a spawned sub-agent finishes. Useful in multi-agent orchestration flows.
Practical Hook Recipes
Auto-run tests after every file edit
Slack alert when Claude finishes
Block writes to production files
Log every prompt to a file
CLAUDE.md — Your AI Instruction File
Most impactfulClaude reads CLAUDE.md at the start of every session. It's how you give Claude project-specific rules, context, and constraints — permanently, without repeating yourself.
Project-level
/your-repo/CLAUDE.md
Checked in. Shared with team. Git-tracked.
User-level
~/.claude/CLAUDE.md
Personal preferences. Applies to all projects.
Sub-dir level
src/api/CLAUDE.md
Scoped to a subdirectory. Overrides parent.
Power Tips
Import other files
Use @path/to/file.md inside CLAUDE.md to pull in other docs dynamically.
Override mid-session
Tell Claude to "ignore the rule about X for this task" — it respects inline overrides.
Memory files
Claude can write to ~/.claude/memory/ to persist facts across sessions automatically.
Git worktrees
Run Claude with isolation: "worktree" in agent calls to work on a clean copy safely.
MCP Servers — Supercharge Claude's Tools
Game changerMCP (Model Context Protocol) lets Claude talk to external services as native tools. Add servers in ~/.claude/settings.json.
GitHub
@modelcontextprotocol/server-github
PRs, issues, repos, commits — Claude can read and write directly.
PostgreSQL
@modelcontextprotocol/server-postgres
Query your DB in natural language. Great for debugging.
Filesystem
@modelcontextprotocol/server-filesystem
Read/write files outside your project directory safely.
Slack
@modelcontextprotocol/server-slack
Read Slack channels, post messages, search history.
Puppeteer
@modelcontextprotocol/server-puppeteer
Control a headless browser. Scrape, test, automate.
Memory
@modelcontextprotocol/server-memory
Persistent knowledge graph across sessions.
Vibe Coding Workflows
Ship faster🏗️ New Feature in 30 min
- 1Describe feature + constraints to Claude
- 2/compact after planning, before coding
- 3Let Claude implement, review diffs not full files
- 4Hook: auto-run tests on every edit
- 5/commit → done
🐛 Debug Unknown Bug
- 1Paste error + stack trace, say "don't fix yet"
- 2Ask Claude to hypothesize 3 root causes first
- 3Pick most likely, ask for minimal repro
- 4Fix + add regression test
- 5/commit with "fix:" prefix
🔍 Explore Unfamiliar Codebase
- 1"Give me a high-level map of this repo"
- 2"Trace the request from API entry to DB"
- 3"What would break if I change X?"
- 4Add what you learned to CLAUDE.md
🤖 Automate with Agents
- 1Use
claude -p "task"in cron/CI pipelines - 2Add
--dangerously-skip-permissionsfor headless - 3Hook on Stop to post results to Slack
- 4Use tmux sessions for persistent agents
More dev tools, cheat sheets & how-tos
Weekly. No noise. Unsubscribe any time.