Claude Code Best Practices: A Quick Reference Guide

A curated collection of tips for getting the most out of Claude Code. ## Setup Your CLAUDE.md Create a CLAUDE.md file at your project root. Include: - Build and test commands - Code style guidelines - Repository conventions and patterns Treat CLAUDE.md like a prompt—refine it iteratively. Use emphasis keywords like "IMPORTANT" or "YOU MUST" to improve adherence. ## The Explore-Plan-Code-Commit Workflow 1. **Explore**: Have Claude read relevant files first 2. **Plan**: Ask for a detailed plan before coding (use Shift+Tab twice for Plan Mode) 3. **Code**: Let Claude implement with your approval 4. **Commit**: Have Claude create clear commit messages ## Key Tips **Be specific upfront.** Instead of "add tests," specify which edge cases to cover. Clear instructions reduce course corrections. **Use tab completion.** Reference specific file paths to guide Claude to the right context. **Course correct early.** Press Escape to interrupt. Double-tap Escape to edit previous prompts. Don't let Claude go down rabbit holes. **Clear context between tasks.** Use `/clear` to prevent irrelevant conversation from filling the context window. **Provide visuals.** Paste screenshots or drag images—Claude excels with visual context. ## Advanced: Run Multiple Instances Use `git worktree add` to create separate working directories, then run multiple Claude instances in parallel for independent tasks. ## Advanced: MCP Servers Configure Model Context Protocol servers to extend Claude's reach beyond your terminal—connect to external APIs, databases, or custom tools. --- *Curated from Anthropic's official documentation and community best practices.*