Claude Code reads instructions hierarchically:
~/.claude/CLAUDE.md— User-global (highest personal priority)./CLAUDE.md— Project root (highest project priority)./.claude/rules/*.md— Modular project rules./subfolder/CLAUDE.md— Directory-specific (overrides parent)
- CLAUDE.md content is treated as immutable system rules
- Higher priority than user prompts
- Claude Code follows these instructions more strictly than chat input
- Keep directives concise — every line is treated as a strong directive
- Copy
CLAUDE.mdto your project root - Copy
.claude/rules/to your project root - Customize for your project
- Pure Markdown (no YAML frontmatter)
- No glob patterns (use directory-based CLAUDE.md files for scoping)
- Keep concise: aim for 800–1500 tokens in CLAUDE.md
- Use
.claude/rules/*.mdfor detailed topic-specific rules
~/.claude/CLAUDE.md ← User-global rules
├── ./CLAUDE.md ← Project root (main config)
├── ./.claude/rules/*.md ← Modular project rules
└── ./subfolder/CLAUDE.md ← Directory-specific overrides
- CLAUDE.md should be MORE CONCISE than other IDE configs
- Use
.claude/rules/for detailed rules that don't need to be in every prompt - Put "non-negotiable" rules in CLAUDE.md, detailed guidelines in
.claude/rules/ - Claude Code does not read AGENTS.md natively — use symlink if needed
See examples/ for a complete FocusFlow project configuration.
To use the same rules across IDEs, create an AGENTS.md and run:
../../scripts/symlink-setup.shThis creates a CLAUDE.md symlink pointing to AGENTS.md.