🎯 In one sentence: The commands, best practices, and token-saving strategies that separate casual Claude Code users from power users.


Complete command reference

Slash commands (type these in the Claude Code prompt)

Command What it does
/help Show all commands
/model Switch model (Opus, Sonnet, Haiku)
/compact Compress conversation context to save tokens
/clear Clear conversation completely
/cost Show token usage for current session
/status Show session info
/bug Report a bug to Anthropic
/config View or edit configuration
/permissions Manage what Claude Code can do
/memory View or edit project memory (CLAUDE.md)
/quit Exit Claude Code

Keyboard shortcuts

Shortcut What it does
Shift+Tab Cycle between Normal / Auto-accept / Plan mode
Ctrl+C Cancel current operation
Ctrl+D Exit Claude Code
Up arrow Recall previous prompt
Esc Cancel current input

CLI flags (when starting Claude Code)

Flag What it does
claude Start interactive session
claude "do something" Run a one-shot command
claude --model opus Start with a specific model
claude --resume Resume your last session
claude --continue Continue the most recent conversation
claude --verbose Show detailed output

CLAUDE.md — your project's memory file

This is one of the most important things to set up. A CLAUDE.md file in your project root acts as persistent instructions that Claude Code reads every time it starts.

What to put in it:

# Project: MyApp

## Build & Test
- Build: `npm run build`
- Test all: `npm test`
- Test single: `npm test -- path/to/test`
- Lint: `npm run lint`

## Architecture
- Frontend: React + TypeScript in /src
- Backend: Express in /server
- Database: PostgreSQL with Prisma ORM

## Code Standards
- Use functional components with hooks (no class components)
- All new code must have tests
- Use Tailwind for styling, no inline styles
- Prefer named exports over default exports

## Important Notes
- The auth module is being refactored — don't modify /src/auth/*
- Environment variables are in .env.local (not committed)

This prevents you from repeating the same context every session. Claude Code reads it automatically.


10 tips for getting better code from Claude Code

1. Start with a plan, not code.

Say "Create an implementation plan for [feature]. Don't write code yet." Review the plan, adjust it, then say "Go ahead and implement this."

2. Include tests and expected output.