Every Claude Code Command and Shortcut in One Place
Stop reading about it. Build something.
Bookmark this page. It covers every major Claude Code command, shortcut, CLAUDE.md directive, and workflow pattern you need for productive daily development.
Slash Commands
Type these inside an active Claude Code session. Press Tab to autocomplete.
/helpShow all available slash commands/clearClear conversation history and start fresh/compactCompress conversation to save context window space/memoryView and manage memory files Claude is tracking/modelSwitch between Claude models (opus, sonnet, haiku)/costShow token usage and cost for the current session/doctorDiagnose Claude Code configuration issues/initInitialize a new CLAUDE.md in the current directory/reviewRun a code review on staged or specified files/commitGenerate a commit message and stage changesCLI Flags
Flags you pass to the claude command at startup.
--print / -pPrint Claude's response to stdout without interactive mode--modelSpecify model: claude-opus-4-5, claude-sonnet-4-5, claude-haiku-4-5--no-waitFor Vercel deploys — avoids hanging log streams--dangerously-skip-permissionsSkip all permission prompts (CI/CD pipelines only)--add-dirAdd a directory to Claude's allowed read paths--max-turnsCap agentic turns for automated runsCLAUDE.md Sections
Recommended sections for your CLAUDE.md. Claude reads this file at session start — make every line count.
## CommandsBuild, test, lint, and deploy commands Claude should know## Style GuideCode formatting, naming conventions, preferred libraries## ArchitectureTech stack, database patterns, auth setup## ContextWho is the developer, what is the project, what matters most## Don'tsExplicit constraints — never select("*"), never shell=True, etc.@path/to/file.mdImport another Markdown file into CLAUDE.md scopeKeyboard Shortcuts
Power User Patterns
Check what Claude remembers before diving in. Stale memory entries cause bad output. Delete outdated entries before they corrupt your session.
Context window pressure is real. Running /compact mid-session compresses history without losing the important bits. Cheaper and faster than starting over.
claude -p 'review this diff for security issues' < git.diff pipes cleanly into shell scripts. Use it in pre-commit hooks, CI checks, or batch review pipelines.
Root CLAUDE.md for project-wide rules. Subdirectory CLAUDE.md for module-specific context. Claude reads both — narrower files override broader ones.
Switch to Haiku for rename, format, or boilerplate tasks. Faster, cheaper, and frees Sonnet/Opus quota for complex reasoning work.
Learn ChatGPT Code hands-on
Free interactive lessons. No credit card required.