Skip to main content
Claude Code reads instructions, settings, skills, subagents, and memory from your project directory and from ~/.claude in your home directory. Commit project files to git to share them with your team; files in ~/.claude are personal configuration that applies across all your projects. If you set CLAUDE_CONFIG_DIR, every ~/.claude path on this page lives under that directory instead. Most users only edit CLAUDE.md and settings.json. The rest of the directory is optional: add skills, rules, or subagents as you need them. This page is an interactive explorer: click files in the tree to see what each one does, when it loads, and an example. For a quick reference, see the file reference table below.

What’s not shown

The explorer covers files you author and edit. A few related files live elsewhere:
FileLocationPurpose
managed-settings.jsonSystem-level, varies by OSEnterprise-enforced settings that you can’t override. See server-managed settings.
CLAUDE.local.mdProject rootYour private preferences for this project, loaded alongside CLAUDE.md. Create it manually and add it to .gitignore.
Installed plugins~/.claude/plugins/Cloned marketplaces, installed plugin versions, and per-plugin data, managed by claude plugin commands. Orphaned versions are deleted 7 days after a plugin update or uninstall. See plugin caching.
~/.claude also holds data Claude Code writes as you work: transcripts, prompt history, file snapshots, caches, and logs. See application data below.

File reference

This table lists every file the explorer covers. Project-scope files live in your repo under .claude/ (or at the root for CLAUDE.md, .mcp.json, and .worktreeinclude). Global-scope files live in ~/.claude/ and apply across all projects.
Several things can override what you put in these files:
  • Managed settings deployed by your organization take precedence over everything
  • CLI flags like --permission-mode or --settings override settings.json for that session
  • Some environment variables take precedence over their equivalent setting, but this varies: check the environment variables reference for each one
See settings precedence for the full order.
Click a filename to open that node in the explorer above.
FileScopeCommitWhat it doesReference
CLAUDE.mdProject and globalInstructions loaded every sessionMemory
rules/*.mdProject and globalTopic-scoped instructions, optionally path-gatedRules
settings.jsonProject and globalPermissions, hooks, env vars, model defaultsSettings
settings.local.jsonProject onlyYour personal overrides, auto-gitignoredSettings scopes
.mcp.jsonProject onlyTeam-shared MCP serversMCP scopes
.worktreeincludeProject onlyGitignored files to copy into new worktreesWorktrees
skills/<name>/SKILL.mdProject and globalReusable prompts invoked with /name or auto-invokedSkills
commands/*.mdProject and globalSingle-file prompts; same mechanism as skillsSkills
output-styles/*.mdProject and globalCustom system-prompt sectionsOutput styles
agents/*.mdProject and globalSubagent definitions with their own prompt and toolsSubagents
agent-memory/<name>/Project and globalPersistent memory for subagentsPersistent memory
~/.claude.jsonGlobal onlyApp state, OAuth, UI toggles, personal MCP serversGlobal config
projects/<project>/memory/Global onlyAuto memory: Claude’s notes to itself across sessionsAuto memory
keybindings.jsonGlobal onlyCustom keyboard shortcutsKeybindings

Check what loaded

The explorer shows what files can exist. To see what actually loaded in your current session, use these commands:
CommandShows
/contextToken usage by category: system prompt, memory files, skills, MCP tools, and messages
/memoryWhich CLAUDE.md and rules files loaded, plus auto-memory entries
/agentsConfigured subagents and their settings
/hooksActive hook configurations
/mcpConnected MCP servers and their status
/skillsAvailable skills from project, user, and plugin sources
/permissionsCurrent allow and deny rules
/doctorInstallation and configuration diagnostics
Run /context first for the overview, then the specific command for the area you want to investigate.

Application data

Beyond the config you author, ~/.claude holds data Claude Code writes during sessions. These files are plaintext. Anything that passes through a tool lands in a transcript on disk: file contents, command output, pasted text.

Cleaned up automatically

Files in the paths below are deleted on startup once they’re older than cleanupPeriodDays. The default is 30 days.
Path under ~/.claude/Contents
projects/<project>/<session>.jsonlFull conversation transcript: every message, tool call, and tool result
projects/<project>/<session>/tool-results/Large tool outputs spilled to separate files
file-history/<session>/Pre-edit snapshots of files Claude changed, used for checkpoint restore
plans/Plan files written during plan mode
debug/Per-session debug logs, written only when you start with --debug or run /debug
paste-cache/, image-cache/Contents of large pastes and attached images
session-env/Per-session environment metadata

Kept until you delete them

The following paths are not covered by automatic cleanup and persist indefinitely.
Path under ~/.claude/Contents
history.jsonlEvery prompt you’ve typed, with timestamp and project path. Used for up-arrow recall.
stats-cache.jsonAggregated token and cost counts shown by /cost
backups/Timestamped copies of ~/.claude.json taken before config migrations
todos/Legacy per-session task lists. No longer written by current versions; safe to delete.
shell-snapshots/ holds runtime files removed when the session exits cleanly. Other small cache and lock files appear depending on which features you use and are safe to delete.

Plaintext storage

Transcripts and history are not encrypted at rest. OS file permissions are the only protection. If a tool reads a .env file or a command prints a credential, that value is written to projects/<project>/<session>.jsonl. To reduce exposure:
  • Lower cleanupPeriodDays to shorten how long transcripts are kept
  • Set the CLAUDE_CODE_SKIP_PROMPT_HISTORY environment variable to skip writing transcripts and prompt history in any mode. In non-interactive mode, you can instead pass --no-session-persistence alongside -p, or set persistSession: false in the Agent SDK.
  • Use permission rules to deny reads of credential files

Clear local data

You can delete any of the application-data paths above at any time. New sessions are unaffected. The table below shows what you lose for past sessions.
DeleteYou lose
~/.claude/projects/Resume, continue, and rewind for past sessions
~/.claude/history.jsonlUp-arrow prompt recall
~/.claude/file-history/Checkpoint restore for past sessions
~/.claude/stats-cache.jsonHistorical totals shown by /cost
~/.claude/backups/Rollback copies of ~/.claude.json from past config migrations
~/.claude/debug/, ~/.claude/plans/, ~/.claude/paste-cache/, ~/.claude/image-cache/, ~/.claude/session-env/Nothing user-facing
~/.claude/todos/Nothing. Legacy directory not written by current versions.
Don’t delete ~/.claude.json, ~/.claude/settings.json, or ~/.claude/plugins/: those hold your auth, preferences, and installed plugins.