-
Managed policy — organization-wide, set by IT/DevOps, cannot be excluded
- Windows:
C:\Program Files\ClaudeCode\CLAUDE.md - macOS:
/Library/Application Support/ClaudeCode/CLAUDE.md - Linux/WSL:
/etc/claude-code/CLAUDE.md
- Windows:
-
Project —
./CLAUDE.mdor./.claude/CLAUDE.md- Committed to git → shared with team
- Use for: build commands, architecture, team standards
-
User (global) —
~/.claude/CLAUDE.md- Applies to ALL your projects
- Use for: universal personal preferences
-
CLAUDE.local.md⚠️ DEPRECATED — use~/.claude/CLAUDE.mdinstead
Loading Order: Managed → User (global) → Project → Subdirectories (hierarchical)
- Team conventions? →
./CLAUDE.md(commit it) - Personal project preferences? →
~/.claude/CLAUDE.md(global) - Universal personal style? →
~/.claude/CLAUDE.md(same file, applies everywhere)
For larger projects, organize rules into separate files in .claude/rules/ with YAML frontmatter so they only load when Claude is editing matching files:
---
paths:
- "src/api/**/*.ts"
---
# API Development Rules
- Use OpenAPI documentation
- Include input validationThis reduces context overhead — rules load on demand, not at every request.
Bonus: You can also create CLAUDE.md files in subdirectories for module-specific instructions. Claude recursively loads all relevant files when working in that area.