CC-101 · Module 1
Getting Started
4 min read
Always launch Claude Code from the root directory of your project so it can load CLAUDE.md and build the right initial context.
Claude zips up context from the root directory into the first token. If you start from a subdirectory, it may miss your rule files and project structure. This is also why you see tokens used immediately upon opening — Claude is bootstrapping your project context.
Use /init to let Claude analyze your codebase and generate an initial CLAUDE.md file automatically.
The /init command scans your codebase architecture, identifies frameworks, patterns, and project structure, then creates a .claude/CLAUDE.md file. This gives Claude foundational knowledge about your project from the start. Highly recommended for new projects.
CLAUDE.md files are sourced from multiple locations: project root, .claude directory, and your global user config (~/.claude).
There's a checked-in project-level memory (root directory CLAUDE.md) and a user-level global memory (~/.claude/CLAUDE.md). Use /memory to see which rules are active. This hierarchy lets you have personal preferences globally while keeping project-specific rules in the repo.
Aim for around 300 lines. Larger files eat tokens and dilute Claude's attention, causing worse output.
Every time Claude starts, it loads CLAUDE.md into context. A bloated file means higher token usage and more "noise" that can confuse the AI. Keep rules focused and relevant — quality over quantity.
Organize your CLAUDE.md with three key sections: what the project is, domain context, and validation/build commands.
Start with high-level technical architecture and requirements (what is the project). Add domain context — frameworks, design patterns, file paths. Finally, include your build/validation flow so Claude can self-verify its work. The validation loop is the single most important factor for good AI-generated code.