memory-hierarchy
Installation
SKILL.md
Claude Code Memory Hierarchy
Complete reference for Claude Code's memory management system.
Memory Locations (Highest to Lowest Priority)
| Memory Type | Location | Purpose | Shared With |
|---|---|---|---|
| Enterprise policy | macOS: /Library/Application Support/ClaudeCode/CLAUDE.mdLinux: /etc/claude-code/CLAUDE.mdWindows: C:\Program Files\ClaudeCode\CLAUDE.md |
Organization-wide standards (IT/DevOps managed) | All org users |
| Project memory | ./CLAUDE.md or ./.claude/CLAUDE.md |
Team-shared project instructions | Team via git |
| Project rules | ./.claude/rules/*.md |
Modular, topic-specific instructions | Team via git |
| User memory | ~/.claude/CLAUDE.md |
Personal preferences for all projects | Just you |
| User rules | ~/.claude/rules/*.md |
Personal modular rules | Just you |
| Project local | ./CLAUDE.local.md |
Personal project-specific preferences | Just you (gitignored) |
Key: Files higher in hierarchy load first; more specific memories take precedence.