Two places: a folder and a file
Claude Code keeps your user-level data in ~/.claude/ and its app state in a single file next to it, ~/.claude.json. Each project can also have its own .claude/ folder and a .mcp.json. Set CLAUDE_CONFIG_DIR and Claude Code uses that folder instead of ~/.claude/. Anthropic's .claude directory reference documents each file in depth; this page is the map.
What's in ~/.claude/
| Path | What it holds | Safe to edit? | Shown in |
|---|---|---|---|
settings.json | Your settings: permissions, hooks, model, environment variables, statusline. | Yes | Settings, Hooks |
CLAUDE.md | Instructions loaded in every session, in every project. | Yes | — |
projects/<project>/*.jsonl | Session transcripts, one folder per working directory. Deleted after cleanupPeriodDays (30 by default). | Read only | Sessions, Usage |
projects/<project>/memory/ | Auto memory: Claude's own notes per project, indexed by MEMORY.md. | Yes, carefully | Memory |
history.jsonl | Every prompt you've typed, with its project. | Read only | Prompts |
file-history/<session>/ | Copies of files saved before Claude edited them, used by /rewind. | Read only | Checkpoints |
skills/, commands/ | Your skills and custom slash commands. | Yes | Skills, Commands |
agents/ | Your subagent definitions. | Yes | Agents |
plugins/ | Installed plugins, cloned marketplaces and the install record. | Use /plugin | Plugins |
sessions/ | State for sessions that are running now. | No | Sessions (live status) |
stats-cache.json | Cached usage statistics. | No | Usage |
.credentials.json | Your login on Linux and Windows (macOS uses the Keychain). | No — use /login | Accounts |
keybindings.json, themes/ | Custom shortcuts and colour themes. | Yes | — |
What's in ~/.claude.json
App state rather than settings: your signed-in account, UI toggles, MCP servers you added at user or local scope, and per-project state such as which MCP servers you've switched off. Claude Code rewrites it often, so close Claude Code before editing it by hand.
A project's own files
| Path | What it holds | Commit it? |
|---|---|---|
CLAUDE.md | Project instructions. | Yes |
.claude/settings.json | Shared project settings. | Yes |
.claude/settings.local.json | Your personal overrides for the project. | No |
.mcp.json | MCP servers shared with the team. | Yes |
.claude/skills/, commands/, agents/ | Project skills, commands and subagents. | Yes |
Which settings file wins
From highest to lowest: managed settings set by your organisation, command-line --settings, .claude/settings.local.json, .claude/settings.json, then ~/.claude/settings.json. A value set higher up overrides the same key lower down. (Anthropic: settings)
Back it up or move it
Copying ~/.claude/ and ~/.claude.json moves your whole setup, transcripts included — but not a macOS Keychain login. Claude Code Manager's Export Brain packs the parts you write yourself (CLAUDE.md, settings, skills, commands, agents, memory, user-level MCP servers) into one zip, and Import Brain shows conflicts before writing. See settings.