Skip to main content

Files on Disk

Claude Code keeps its state in plain files. Some you write, such as settings and CLAUDE.md. Others Claude Code writes, such as transcripts and caches. This page lists them by place, says what each one is, and links to the page with the details.

At a Glance​

QuestionAnswer
Can you use it?✅ Yes. Open any file listed here in an editor. Most are plain JSON, Markdown, or JSONL.
Can you change it?You edit the files marked "You write". Do not edit the files that Claude Code writes.
Can you turn it on or off?CLAUDE_CONFIG_DIR moves ~/.claude. cleanupPeriodDays sets the cleanup age.
Where does it live?~/.claude/, ~/.claude.json, .claude/ in a project, and managed folders.
StatusDocumented Undocumented

Source: Explore the .claude Directory and the program.

warning

The files are not encrypted. A secret that a tool prints goes into the transcript, and every prompt you type goes into history.jsonl.

The Big Picture​

Files in a Project​

You usually commit these files, except the ones marked local.

PathStatusYou write?What it isPage
.claude/settings.jsonDocumented✅Shared project settings.Settings Files and Scopes
.claude/settings.local.jsonDocumented✅Your private project settings. Claude Code adds it to your global git excludes.Settings Files and Scopes
CLAUDE.md or .claude/CLAUDE.mdDocumented✅Project instructions. Files in the working folder and each folder above it load at launch.Memory and Rules
CLAUDE.local.mdDocumented✅Private project notes. Add it to .gitignore.Memory and Rules
AGENTS.md or .claude/AGENTS.mdDocumented✅Read when no CLAUDE.md or CLAUDE.local.md is in or above the working folder.Memory and Rules
.claude/rules/**/*.mdDocumented✅Rules. A paths key limits a rule to matching files.Memory and Rules
<subfolder>/CLAUDE.mdDocumented✅Loads after Claude reads or edits a file in that subfolder.Memory and Rules
.claude/skills/<name>/SKILL.mdDocumented✅A project skill.Skills and Commands
.claude/commands/<name>.mdDocumented✅A project slash command. Skills replace this form, but it still loads.Slash Commands
.claude/agents/*.mdDocumented✅A project subagent. The closest definition wins.Subagents
.claude/agent-memory/Documented❌Memory of subagents that set memory: project. memory: local uses .claude/agent-memory-local/.Subagent Frontmatter
.claude/output-styles/*.mdDocumented✅A project output style.Output Styles
.mcp.jsonDocumented✅Project MCP servers. Claude Code asks you to approve them first.MCP Config

Files in Your Home Folder​

CLAUDE_CONFIG_DIR moves ~/.claude. It does not move ~/.claude.json unless you set the variable.

PathStatusYou write?What it isPage
~/.claude.jsonDocumentedMostly noApp state, sign-in data, personal and local MCP servers, and per-project state. Claude Code writes it.Extra Keys and Global Config
~/.claude/settings.jsonDocumented✅Your user settings.Settings Files and Scopes
~/.claude/CLAUDE.mdDocumented✅Your personal instructions for every project.Memory and Rules
~/.claude/rules/*.mdDocumented✅Your personal rules. They load before project rules.Memory and Rules
~/.claude/skills/<name>/SKILL.mdDocumented✅Your personal skills.Skills and Commands
~/.claude/skills/synced/Documented❌Skills from your claude.ai account.Skills and Commands
~/.claude/skills/.trash/, ~/.claude/plugins/.trash/Documented❌Synced items that were removed. Kept so you can recover them until the retention sweep deletes them. The sweep uses cleanupPeriodDays, which is 30 days by default.Skills and Commands
~/.claude/commands/Documented✅Your personal slash commands.Slash Commands
~/.claude/agents/*.mdDocumented✅Your personal subagents.Subagents
~/.claude/output-styles/*.mdDocumented✅Your personal output styles.Output Styles
~/.claude/keybindings.jsonDocumented✅Your keyboard shortcuts. Run /keybindings to open it.Slash Commands
~/.claude/agent-memory/Documented❌Memory of subagents that set memory: user.Subagent Frontmatter

Plugins and Marketplaces​

Source: Plugin Loading Reference.

PathStatusWhat it isPage
~/.claude/plugins/DocumentedThe plugin root. CLAUDE_CODE_PLUGIN_CACHE_DIR sets this parent folder.Plugin Loading
plugins/cache/<marketplace>/<plugin>/<version>/UndocumentedOne copy of each installed version.Plugin Loading
plugins/data/<id>/DocumentedThe folder behind ${CLAUDE_PLUGIN_DATA}. It survives updates.Plugin Loading
plugins/installed_plugins.jsonUndocumentedThe install records. Claude Code may keep dated set-aside or unreadable copies.Plugin Loading
plugins/known_marketplaces.jsonDocumentedThe marketplace records.Plugin Loading
plugins/marketplaces/<name>DocumentedA clone of each marketplace.Marketplaces
plugins/syncedDocumentedPlugins synced from claude.ai. The id is <name>@synced.Plugin Loading
<plugin>/.claude-plugin/plugin.jsonDocumentedThe manifest inside a plugin.Plugin Manifest
.claude-plugin/marketplace.jsonDocumentedThe catalog inside a marketplace repository.Marketplaces
<plugin>/hooks/hooks.jsonDocumentedHooks and mod modules that a plugin ships.Hooks Configuration
.claude-plugin/types/DocumentedType files that Claude Code writes for a mod that you load from a folder.Files, Nouns, and Gates

Sessions and Transcripts​

All paths here are under ~/.claude/. <project> is the project folder path with every character other than a letter or digit turned into -. Source: Explore the .claude Directory.

PathStatusWhat it isCleaned by age?
projects/<project>/<session>.jsonlDocumentedThe transcript of one session.✅
projects/<project>/<session>/subagents/DocumentedSubagent transcripts.✅
projects/<project>/<session>/tool-results/DocumentedLarge tool outputs and MCP images.✅
projects/<project>/memory/DocumentedAuto memory. MEMORY.md is the index.❌
file-history/<session>/DocumentedSnapshots from before edits, for rewind.✅
plans/DocumentedPlan files from plan mode.✅
tasks/DocumentedTask lists.✅
dev-mods/<session>/DocumentedMods that Claude wrote during a session.✅
uploads/<session>/DocumentedFiles attached from the web or mobile app.✅
debug/DocumentedDebug logs, written while debug logging is on.✅
paste-cache/DocumentedLarge pastes.✅
shell-snapshots/, session-env/DocumentedShell setup and per-session metadata.✅
backups/DocumentedCopies of ~/.claude.json. The five newest stay.✅
sessions/DocumentedOne small file for each running session.❌
history.jsonlDocumentedEvery prompt you typed, for up-arrow and Ctrl+R.Entries age out
feedback-bundles/, feedback/drafts/DocumentedFeedback archives and drafts that you have not sent.Drafts age out
usage-data/DocumentedReports from /insights and their cached data.❌

The full list, the retention rules, and the controls are on Sessions and Storage. The line format of a transcript is on Transcript Format.

Caches and Account Files​

PathStatusWhat it isPage
~/.claude/.credentials.jsonDocumentedYour login credentials. On macOS, the Keychain holds them, and Claude Code falls back to this file when the Keychain rejects the write. On Linux and Windows, Claude Code uses this file (mode 0600 on Linux). Keep it private and do not delete it.Sessions and Storage
~/.claude/stats-cache.jsonDocumentedTotals shown by /usage.Sessions and Storage
~/.claude/remote-settings.jsonDocumentedCached server-managed settings, or {}.Enterprise Settings
~/.claude/policy-limits.jsonDocumentedCached organization limits. Some account types only.Enterprise Settings
~/.claude/cache/changelog.mdDocumentedA cached copy of the changelog for /release-notes.What Changed
~/.claude/daemon/roster.json, ~/.claude/jobs/<id>/state.json, ~/.claude/jobs/<id>/tmp/DocumentedThe list of running background sessions, the state of each session, and its scratch folder. Keep them. The official "Agent View" page describes them.Sessions and Storage
state/, mods/, bridge-spawn/, seed-admin/, downloads/, cache/model-catalog/UndocumentedSeen on a 2.1.304 machine or named in the program. No docs page describes them.Sessions and Storage

Managed Files​

An administrator puts these on the machine. A user cannot override them.

PathStatusWhat it isPage
managed-settings.json and managed-settings.d/*.jsonDocumentedOrganization settings. The folder is next to the file and merges in alphabetical order.Settings Files and Scopes
Managed CLAUDE.mdDocumentedOrganization instructions. A user cannot exclude it.Memory and Rules
managed-mcp.jsonDocumentedA fixed set of MCP servers. It gives the organization exclusive control.MCP Settings and Policy
Managed skills <managed dir>/.claude/skills/DocumentedSkills for all users on a machine. They win over personal and project skills.Skills and Commands

The folder is /Library/Application Support/ClaudeCode/ on macOS, /etc/claude-code/ on Linux and WSL, and C:\Program Files\ClaudeCode\ on Windows.

Settings Precedence​

When two settings files set the same key, the higher one wins.

1. Managed settings
2. --settings (command line)
3. .claude/settings.local.json
4. .claude/settings.json
5. ~/.claude/settings.json

List keys such as permissions.allow merge across files. The exceptions and the merge rules are on Settings Files and Scopes.

Example​

You want to find where Claude Code kept the last session in /work/app, and then remove old ones.

ls ~/.claude/projects/-work-app/
claude purge --dry-run

The first command lists the transcripts of that project. The second shows what claude purge would delete, without deleting it.