Guide · Claude Code
How to Use CLAUDE.md with Claude Code
CLAUDE.md is the system prompt Claude Code reads on startup. Drop a well-written file at your repo root and every Claude Code session inherits the same persona, conventions, and guardrails.
What CLAUDE.md does
When Claude Code launches in a project, it scans for a CLAUDE.md file and loads its contents as persistent system instructions. Anything you put there — coding style, architectural rules, "never do X" constraints, preferred libraries — biases every response in that workspace. It's the cleanest way to add a custom system prompt without wrapping the CLI.
1. Generate your CLAUDE.md
Open the generator, pick Anthropic Claude as the target platform, describe your agent, and download the resulting CLAUDE.md.
2. Place it at your project root
Save the file at the top of your repo, next to package.json:
your-project/ ├── CLAUDE.md ← here ├── package.json └── src/
Claude Code auto-detects the file on launch — no flags, no config. Commit it to git so the whole team gets the same agent behavior.
3. Verify it loaded
Start Claude Code in the project directory and run:
/memory
Your CLAUDE.md should appear in the listed memory sources. If it doesn't, confirm you launched Claude Code from the directory that contains the file.
Tips
- Keep CLAUDE.md focused — rules, conventions, and constraints, not full documentation.
- Use nested
CLAUDE.mdfiles in subdirectories to scope instructions to a module. - Treat it like code: review changes in PRs so agent behavior shifts are intentional.
Need a prompt for another platform?
The same generator exports for OpenAI, Gemini, Mistral, and custom LLMs.