OmniscioGuidesThe .claude directory
The .claude directory: what Claude Code reads and where
Claude Code reads instructions, settings, skills, subagents and memory from two places: your project directory and ~/.claude in your home directory. Commit the project files to share them with a team; the home files are yours alone and apply across every project.
This page is a map of both folders: which file to reach for when you want a change, what each one does and when it loads, which to commit, the files that live outside them, and what can override what.
Last checked against Anthropic's Claude Code documentation on November 21, 2026. By the Omniscio team. Updated .
The two folders
The project folder is .claude/ in your repository, with three files beside it rather than inside it: CLAUDE.md, .mcp.json and .worktreeinclude. Files there are configuration for that repository, and you commit most of them so your team shares them.
The home folder is ~/.claude/. Its contents apply to you in every project on that machine, so instructions you want nowhere else, personal skills and your own keybindings belong there. On Windows it is %USERPROFILE%\.claude, which means your own user folder, for example C:\Users\YourName\.claude. If you set CLAUDE_CONFIG_DIR, every ~/.claude path moves under that directory instead, and so does .claude.json, which otherwise sits at ~/.claude.json.
Most users only edit CLAUDE.md and settings.json. Anthropic describes the rest of the directory as optional: add skills, rules or subagents as you need them.
Sources: the introduction and opening paragraphs of Explore the .claude directory, read November 21, 2026.
Which file do I want?
Anthropic's own map from an intention to a file:
- Give Claude project context and conventions:
CLAUDE.md. - Allow or block tool calls, or run a script before or after them:
settings.json, inpermissionsorhooks. - Set environment variables for the session:
settings.json, inenv. - Keep personal overrides out of git:
settings.local.json. - Add a prompt or capability you invoke with
/name:skills/<name>/SKILL.md. - Define a specialized subagent with its own tools:
agents/*.md. - Orchestrate many subagents from a script:
workflows/*.js. - Connect external tools over MCP:
.mcp.json, project only. - Change how Claude formats responses:
output-styles/*.md.
Each of these has a guide of its own: CLAUDE.md, settings.json, hooks, skills, subagents, workflows, output styles and MCP servers.
Source: "Choose the right file" in Explore the .claude directory, read November 21, 2026.
The project folder, file by file
What each project file does, and when Claude Code reads it:
CLAUDE.mdloads into context at session start. It holds the conventions and context that shape how Claude works in this repository.settings.jsonis read at session start, and most edits apply to the running session. It carries permissions, hooks and environment. UnlikeCLAUDE.md, it is enforced whether Claude follows it or not.settings.local.jsonis your personal settings for the project, in the same format, and Claude Code gitignores it when it saves a setting to it..mcp.jsonholds the project-scoped MCP servers the whole team uses; personal servers go in~/.claude.json. Tool schemas are deferred by default and load on demand through tool search..worktreeincludelists gitignored files to copy into each new worktree, using.gitignoresyntax. Only files that match a pattern and are also gitignored get copied.rules/splits project instructions into topic files. Rules withoutpaths:frontmatter load at session start; rules with it load when Claude reads, writes or edits a matching file. LikeCLAUDE.md, rules are guidance Claude Code does not enforce.skills/holds one folder per skill, each with aSKILL.md, invoked with/skill-nameor when Claude matches the task. Frontmatter can stop Claude invoking it on its own, or stop you invoking it at all.commands/holds single-file commands:commands/deploy.mdruns as/deploy. Anthropic now points new commands at skills, which can bundle reference files alongside the prompt.output-styles/is read at startup in the terminal, so restart Claude Code after adding or editing a style.agents/holds subagent definitions, each withnameanddescriptionfrontmatter and optionally its own model and tools. Each runs in its own context window when invoked.workflows/holds dynamic workflow scripts, loaded at startup when workflows are on, and each saved workflow runs as a/<name>command.agent-memory/gives a subagent its own memory: the first 200 lines of itsMEMORY.md, capped at 25KB, load into its system prompt when it runs, while auto memory is on.
Sources: the file entries under "Explore the directory" in Explore the .claude directory, read November 21, 2026.
The home folder, file by file
The home folder is the global counterpart: the same file names, applied to every project on the machine.
CLAUDE.mdloads at session start in every project, alongside the project's own file. If the two conflict, Claude may follow either, so keep this one to preferences that apply everywhere.settings.jsonhas the same format as the project's and ranks below it. For most single-value keys the highest-ranked value wins; most lists, such aspermissions.allow, merge across files.keybindings.jsonis read at session start and hot-reloaded when you edit it./keybindingscreates or opens it.themes/holds custom colour themes as JSON, read at startup and hot-reloaded when files change, and listed in/theme.projects/holds auto memory, the notes Claude keeps across sessions. Each project gets a directory keyed by its repository path, whosememory/MEMORY.mdloads at session start while auto memory is on; the topic files it lists are read on demand.rules/,skills/,commands/,output-styles/,agents/andworkflows/take the same formats as their project counterparts and apply to every project. A project workflow with the same name takes precedence over a home one, and a project output style with the same name is used instead of yours.agent-memory/serves subagents declared withmemory: user, and its knowledge persists across projects.~/.claude.jsonis a single file, not in the folder: account details, per-project trust decisions, your personal MCP servers and UI toggles. Claude Code writes back to it when you change a global option in/configor trust a folder.
Sources: the entries under "`~/.claude/`" in Explore the .claude directory, read November 21, 2026.
What lives outside both
Four things you would expect in the folders are somewhere else, and Anthropic lists them separately:
managed-settings.jsonsits at a system-level location that varies by OS. It is enterprise-enforced settings that your own files and--settingsvalues cannot override, apart from narrow exceptions.CLAUDE.local.mdstays in the project root, besideCLAUDE.md, and loads alongside it. You create it by hand and add it to.gitignore.AGENTS.mdcan sit at the project root, in.claude/, or in any directory, as the instructions you write for any AI coding agent. Claude Code can load it in place of aCLAUDE.md.- Installed plugins live in
~/.claude/plugins, managed byclaude plugincommands: cloned marketplaces, installed versions, theinstalled_plugins.jsonrecord, and plugins synced from your claude.ai account underplugins/synced/.
Managed settings and their delivery are their own topic; the managed settings guide covers them, and the plugins guide covers installation.
Source: "What's not shown" in Explore the .claude directory, read November 21, 2026.
What can override what
Three things outrank the files you write: managed settings deployed by your organization, which take precedence over every settings file and --settings value apart from the documented exceptions; CLI flags such as --permission-mode or --settings, which override settings.json for that session; and some environment variables, which take precedence over their equivalent setting but vary from one to the next.
Inside the settings files themselves the order is documented and worth knowing before you debug a value that will not change. The settings.json guide covers the four paths and which one wins.
Source: the note above "File reference" in Explore the .claude directory, read November 21, 2026.
What to commit
Anthropic's file table marks what belongs in git. Commit CLAUDE.md, .mcp.json, .worktreeinclude, settings.json, rules/, skills/, commands/, output-styles/, agents/, workflows/ and agent-memory/.
Two stay out. settings.local.json is your personal override file and is gitignored when Claude Code saves to it, and CLAUDE.local.md is yours to create by hand and add to .gitignore. Nothing in ~/.claude is committed: it is personal configuration, and it also holds data Claude Code writes as you work, such as transcripts, prompt history, file snapshots, caches and logs.
Sources: the "File" table's Commit column and the Application data section in Explore the .claude directory, read November 21, 2026.
When a file seems ignored
Start with when the file is supposed to load, because three of the common surprises are timing rather than errors. Output styles are read at startup, so a new one needs a restart. Rules with paths: frontmatter only load when Claude touches a matching file. Workflows load at startup only when workflows are on.
For the rest, Anthropic's debug-your-configuration page has the inspection commands and a symptom-first lookup table for a setting, hook or file that is not taking effect.
Sources: the "When it loads" notes in Explore the .claude directory and its "Troubleshoot configuration" section, read November 21, 2026.
Where these answers come from
- Everything on this page: Explore the .claude directory, read November 21, 2026.
Every claim is quoted from Anthropic's documentation for the page, which describes each file's purpose and the moment it loads; nothing here was inferred from a local installation.
Common questions
Is .claude created automatically?
Claude Code creates ~/.claude.json when it needs it, starting a session or running a subcommand such as claude auth status. The other files are yours to create when you want them.
What is the difference between a skill and a command?
A command is one Markdown file that runs as /name. A skill is a folder with a SKILL.md plus any supporting files, so Anthropic points new commands at skills.
Does a project rule beat a home rule?
They are both guidance, loaded together, and Claude may follow either when they conflict. For enforced behaviour, use hooks or permissions in settings instead.
Where does auto memory live?
Under ~/.claude/projects/, one directory per project keyed by its repository path, with a MEMORY.md index and one topic file per note.