Learn how to write effective CLAUDE.md files for AI coding agents. Key principles include keeping instructions minimal (under 300 lines), ensuring universal applicability across sessions, using progressive disclosure to avoid context bloat, and avoiding auto-generation. The guide explains why LLMs are stateless, how Claude Code often ignores irrelevant instructions, and why you should use linters instead of relying on AI for code formatting. Proper configuration significantly impacts agent performance across all workflow phases.
Table of contents
## Principle: LLMs are (mostly) stateless## CLAUDE.md onboards Claude to your codebase## Claude often ignores CLAUDE.md## Creating a good CLAUDE.md file## In ConclusionSort: