Working with Claude Code: 7. Summary
Here is your Quick Start Cheat Sheet for mastering Claude Code. Keep this handy as you work!
🚀 Claude Code Quick Start Guide
Phase 1: Starting a New Project
- Create the folder:
mkdir my-project && cd my-project
- Initialize Git (Crucial):
git init
- Launch Claude:
claude
- Scaffold the project:
- Prompt: "Initialize a project using [Tech Stack] for [Goal]. Create the folder structure, dependencies, and a basic entry point."
- Create
CLAUDE.md:
- Prompt: "Create a
CLAUDE.md file documenting the tech stack, project structure, commands to run/test, and coding conventions."
Phase 2: Managing Context & Memory
- Curate
CLAUDE.md: Keep it under ~100 lines. Include stack, commands, structure, and rules. Do not paste whole code files in it.
- Use
/clear religiously: Type /clear in the prompt whenever you finish a logical chunk of work and move to a new task. This wipes chat history but keeps project rules.
- Don't paste code: Tell Claude to read files (e.g., "Look at
src/app.js and..."). It saves context space.
- Use
.claudeignore: Ignore node_modules, package-lock.json, logs, and minified files so Claude doesn't read them.
Phase 3: Modes & Planning
- Cycle Modes: Press
Shift + Tab to switch between modes.
- Default: Asks for permission before every change (Standard).
- Auto-Accept: Executes automatically (Use for repetitive, low-risk fixes).
- Plan Mode: Read-only. Claude thinks but cannot touch files.
- Modifying Plans: If you are in Plan Mode and dislike the plan, do not exit. Just talk to Claude: "Modify the plan: use AWS S3 instead of local storage, and update Step 2." Once perfect, switch to Default Mode and say "Proceed with the plan."
Phase 4: Coding, Debugging & Iterating
- Plan First: For complex features, say: "Do not write code yet. Outline the architecture and steps."
- Test-Driven: Ask Claude to write tests first, run them to see failures, then write the code to pass the tests.
- Targeted Fixes: When fixing bugs, scope the request: "Update only the
validate_email function in utils.js. Do not touch the rest of the file."
- Let Claude Debug: Don't paste terminal errors. Say: "Run
npm start, look at the error, and fix the bug causing it."
- The Checkpoint Strategy:
- Get an "OK" working version.
- Commit it (
git commit -m "draft feature").
- Ask Claude for the improvements/fixes.
- Review with "Run
git diff and check for leftover debug logs or edge cases."
- Commit again, then
/clear.
Phase 5: Automation & "Skills"
- Custom Slash Commands: Create
.claude/commands/my-command.md.
- Inside, write a prompt template using
$ARGUMENTS.
- Run it in Claude Code via
/my-command src/file.js.
- MCP Servers (External Tools): Connect Claude to databases or APIs.
- Example:
claude mcp add postgres npx -y @modelcontextprotocol/server-postgres "postgres://..."
- Headless Mode: Use in scripts/CI-CD.
claude -p "Review code in src/ for security vulnerabilities."
🏆 The 4 Golden Rules
- Git is your Undo Button: Commit before asking Claude to do major refactors. If it breaks,
git checkout ..
- Context is King: A cluttered context causes hallucinations.
/clear often.
- Be the Architect: Use Plan Mode for big features. Don't let Claude blindly write code without a strategy.
- Pace Claude: For big tasks, say "Execute Step 1 only" instead of letting it try to build everything at once.
ai
Back