loading
loading
A markdown file Claude Code auto-loads into context so the agent knows your project's conventions, commands, and rules.
On startup Claude Code reads CLAUDE.md files (global at ~/.claude/, project root, and nested dirs) and injects them into the system context, so the instructions apply to every turn without you repeating them. Use it for build/test commands, code style, architecture notes, and hard rules the agent must follow. Concrete example: a root CLAUDE.md saying 'run tests with pnpm test, never edit files in /generated' steers the agent on every task. Keep it tight — it costs tokens on every request, so it's a budget, not a dumping ground.
Plainly
Think of CLAUDE.md as a tool from the builder toolbox. A markdown file Claude Code auto-loads into context so the agent knows your project's conventions, commands, and rules.
In practice
Use it when you are installing, editing, testing, reviewing, or shipping code. In practice, define the owner, input, output, and failure mode before you rely on it.