CLAUDE.md is a Markdown file you place at the root of your project. Claurst discovers it automatically and injects its contents into the system prompt as project context before every session.
How it works
When Claurst starts, theContextBuilder in cc-core walks upward from the current working directory to the filesystem root, collecting every CLAUDE.md file it encounters. It also reads ~/.claude/CLAUDE.md for user-level preferences. All discovered files are concatenated and injected into the system prompt.
What to put in CLAUDE.md
A usefulCLAUDE.md gives Claude the context a new contributor would need to work effectively on your project.
Project overview
A short description of what the project does, its goals, and its architecture.
Coding conventions
Style rules, naming conventions, formatting standards, and linting requirements.
Key files
A map of important files and directories and what each one does.
Commands
How to build, test, lint, and run the project.
Example: Rust project
CLAUDE.md
Coding conventions
- No
unwrap()in production paths — use?andanyhow::Result - All public functions must have doc comments
- SQL queries live in
src/db/only; no inline SQL in handlers - Use
tracing::instrumenton async functions that make DB calls - New endpoints need integration tests in
tests/
Environment variables
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL connection string |
PORT | No | HTTP port (default: 8080) |
LOG_LEVEL | No | Tracing filter (default: info) |
Token budget considerations
CLAUDE.md content is injected on every turn. Long files reduce the context window available for your actual conversation and tool results.
Practical guidelines:
- Keep your project
CLAUDE.mdunder 500 lines - Move rarely-needed reference material to separate files and mention where they live
- Avoid embedding large code samples directly in
CLAUDE.md
Disabling CLAUDE.md
Pass--no-claude-md at the command line, or set no_claude_md: true in your Config, to skip CLAUDE.md discovery entirely:
Config struct in cc-core:
Initializing CLAUDE.md
The/init slash command generates a starter CLAUDE.md for your current project by inspecting the directory structure, build files, and recent git history:
.claude/CLAUDE.md (or CLAUDE.md at the project root) pre-populated with inferred project context.
Discovery behavior
The full discovery algorithm incc-core::context::build_user_context:
Start at the working directory
Claurst begins in the current working directory passed to the session.