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. 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 the files you’ll interact with most. A few things 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.

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.