Shortcuts, commands, memory system, prompt tips — everything you need
| Shortcut | Function |
|---|---|
Esc + Esc | Undo menu — revert code changes |
Shift+Tab | Toggle permission mode (Normal / Auto / Plan) |
Ctrl+C | Interrupt current execution |
Ctrl+R | Search prompt history |
Ctrl+O | Show detailed conversation log (thinking process) |
| Command | Purpose |
|---|---|
/memory | View loaded memories |
/resume | Resume a previous conversation |
/clear | Clear conversation, start fresh |
/cost | Check session token usage and cost |
/context | View remaining context window space |
/compact | Compress history to free up space |
/init | Auto-generate project CLAUDE.md |
/diff | View code changes |
/rename name | Name the session for easy resume later |
/plan | Enter/exit Plan mode (discuss without executing) |
/model sonnet | Switch model (cheaper) |
claude # Normal start
claude --continue # Continue last conversation
claude --resume # Choose which session to resume
claude -n "my-project" # Named session for easy resume
claude -p "check SPY price" # One-shot question, no interactive mode
claude --dangerously-skip-permissions # Skip permission prompts
claude -n "session-name", then use claude --resume next time. Saves you from repeating context.
Memory is the only bridge between conversations. Each conversation is completely independent — anything discussed but not saved to memory is lost next time.
~/.claude/CLAUDE.md → User-level, loaded in ALL conversations
~/project/CLAUDE.md → Project-level, only in that directory
~/.claude/projects/.../memory/ → Global memory
~/.claude/projects/...-project/memory/ → Project memory
| Type | Auto-loaded | Best For |
|---|---|---|
| CLAUDE.md | Every conversation | Rules, workflows, coding standards |
| MEMORY.md | First 200 lines | Memory index (pointers to files) |
| Memory files | Must be read manually | Specific info (server configs, API keys) |
# Bad
Analyze NVDA
# Good
Check NVDA latest price, compare 3-month trend, give buy/sell
recommendation considering my moderate-conservative risk profile,
save results to log.md
# Deployment
Deploy and test if Telegram messages send correctly
# Development
Run tests after modifying the code
/plan # Enter Plan mode, discuss approach
(confirm the plan)
/plan # Exit Plan mode, start executing
@filepath to reference files instead of copy-pasting| Method | Savings |
|---|---|
Use /clear between different tasks | 30-50% tokens |
Switch to /model sonnet for simple tasks | Much cheaper & faster |
| Keep CLAUDE.md concise | Loaded every time, shorter = cheaper |
/compact to compress long conversations | Free up context space |
Use -p for one-shot questions | Most efficient for non-interactive use |
claude -n "website" # Project 1
claude -n "trading-bot" # Project 2
claude -n "stock-analysis" # Project 3
# Later
claude --resume # List all sessions, pick one
Open different terminal windows for different project directories, each running its own claude instance independently.
Configure hooks in .claude/settings.json to auto-run scripts before/after tool calls.
{
"hooks": {
"Stop": [{
"hooks": [{
"type": "command",
"command": "osascript -e 'display notification \"Claude finished\" with title \"Claude Code\"'"
}]
}]
}
}
Each conversation is independent. Make sure important info is saved to memory files. Use /memory to check.
/context to check usage → /compact to compress → or /clear to start fresh.
Check if it was saved to memory. Cross-project info must be in global memory.
Write it in CLAUDE.md, not just in conversation. CLAUDE.md is loaded every time.