The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 2
22
33> Where Claude Code reads CLAUDE.md, settings.json, hooks, skills, commands, subagents, workflows, rules, and auto memory. Explore the .claude directory in your project and ~/.claude in your home directory.
44
5export const ClaudeExplorer = () => {
6 const A = useMemo(() => ({href, children}) => <a href={href} style={{
7 color: 'var(--ce-accent)',
8 textDecoration: 'none',
9 borderBottom: '1px dotted var(--ce-accent)'
10 }}>{children}</a>, []);
11 const C = useMemo(() => ({children}) => <code style={{
12 fontFamily: 'var(--ce-mono)',
13 fontSize: '0.92em',
14 padding: '1px 4px',
15 borderRadius: '3px',
16 background: 'var(--ce-surface)',
17 border: '0.5px solid var(--ce-border-subtle)'
18 }}>{children}</code>, []);
19 const commandsNote = useMemo(() => <>Commands and skills are now the same mechanism. For new workflows, use <A href="/docs/en/skills">skills/</A> instead: same <C>/name</C> invocation, plus you can bundle supporting files.</>, []);
20 const FILE_TREE = useMemo(() => ({
21 project: {
22 label: 'your-project/',
23 children: [{
24 id: 'claude-md',
25 label: 'CLAUDE.md',
26 type: 'file',
27 icon: 'md',
28 color: '#6A9BCC',
29 badge: 'committed',
30 oneLiner: 'Project instructions Claude reads every session',
31 when: 'Loaded into context at the start of every session',
32 description: 'Project-specific instructions that shape how Claude works in this repository. Put your conventions, common commands, and architectural context here so Claude operates with the same assumptions your team does.',
33 tips: ['Target under 200 lines. Longer files still load in full but may reduce adherence', <>CLAUDE.md loads into every session. If something only matters for specific tasks, move it to a <A href="/docs/en/skills">skill</A> or a path-scoped <A href="/docs/en/memory#organize-rules-with-claude/rules/">rule</A> so it loads only when needed</>, 'List the commands you run most, like build, test, and format, so Claude knows them without you spelling them out each time', <>Run <C>/memory</C> to open and edit CLAUDE.md from within a session</>, <>Also works at <C>.claude/CLAUDE.md</C> if you prefer to keep the project root clean</>, <>If your repo already has an <C>AGENTS.md</C> for other coding agents, Claude Code <A href="/docs/en/memory#agents-md">can read that</A> in place of a <C>CLAUDE.md</C></>],
34 exampleIntro: 'This example is for a TypeScript and React project. It lists the build and test commands, the framework conventions Claude should follow, and project-specific rules like export style and file layout.',
35 example: `# Project conventions
36
37## Commands
38- Build: \`npm run build\`
39- Test: \`npm test\`
40- Lint: \`npm run lint\`
41
42## Stack
43- TypeScript with strict mode
44- React 19, functional components only
45
46## Rules
47- Named exports, never default exports
48- Tests live next to source: \`foo.ts\` -> \`foo.test.ts\`
49- All API routes return \`{ data, error }\` shape`,
50 docsLink: '/en/memory'
51 }, {
52 id: 'mcp-json',
53 label: '.mcp.json',
54 type: 'file',
55 icon: 'json',
56 color: '#9B7BC4',
57 badge: 'committed',
58 oneLiner: 'Project-scoped MCP servers, shared with your team',
59 when: <>Servers connect when the session begins. Tool schemas are deferred by default and load on demand via <A href="/docs/en/mcp#scale-with-mcp-tool-search">tool search</A></>,
60 description: <>Configures Model Context Protocol (MCP) servers that give Claude access to external tools: databases, APIs, browsers, and more. This file holds the project-scoped servers your whole team uses. Personal servers you want to keep to yourself go in <C>~/.claude.json</C> instead.</>,
61 tips: [<>Use environment variable references for secrets: <C>{'${NOTION_TOKEN}'}</C></>, <>Lives at the project root, not inside <C>.claude/</C></>, <>For servers only you need, run <C>claude mcp add --scope user</C>. This writes to <C>~/.claude.json</C> instead of <C>.mcp.json</C></>],
62 exampleIntro: <>This example configures the Notion MCP server so Claude can read and update pages in your workspace. The <C>{'${NOTION_TOKEN}'}</C> reference is read from your shell environment when Claude Code starts the server, so the token never lands in the file.</>,
63 example: `{
64 "mcpServers": {
65 "notion": {
66 "command": "npx",
67 "args": ["-y", "@notionhq/notion-mcp-server"],
68 "env": {
69 "NOTION_TOKEN": "\${NOTION_TOKEN}"
70 }
71 }
72 }
73}`,
74 docsLink: '/en/mcp'
75 }, {
76 id: 'worktreeinclude',
77 label: '.worktreeinclude',
78 type: 'file',
79 icon: 'md',
80 color: '#8FA876',
81 badge: 'committed',
82 oneLiner: 'Gitignored files to copy into new worktrees',
83 when: <>Read when Claude creates a git worktree via <C>--worktree</C>, the <C>EnterWorktree</C> tool, or subagent <C>isolation: worktree</C></>,
84 description: <>Lists gitignored files to copy from your main repository into each new worktree. Worktrees are fresh checkouts, so untracked files like <C>.env</C> are missing by default. Patterns here use <C>.gitignore</C> syntax. Only files that match a pattern and are also gitignored get copied, so tracked files are never duplicated.</>,
85 tips: [<>Lives at the project root, not inside <C>.claude/</C></>, <>Git-only: if you configure a <A href="/docs/en/hooks#worktreecreate">WorktreeCreate hook</A> for a different VCS, this file is not read. Copy files inside your hook script instead</>, <>Also applies to parallel sessions in the <A href="/docs/en/desktop#work-in-parallel-with-sessions">desktop app</A></>],
86 exampleIntro: 'This example copies your local environment files and a secrets config into every worktree Claude creates. Comments start with # and blank lines are ignored, same as .gitignore.',
87 example: `# Local environment
88.env
89.env.local
90
91# API credentials
92config/secrets.json`,
93 docsLink: '/en/worktrees#copy-gitignored-files-into-worktrees'
94 }, {
95 id: 'dot-claude',
96 label: '.claude/',
97 type: 'folder',
98 icon: 'folder',
99 color: 'var(--ce-accent)',
100 oneLiner: 'Project-level configuration, rules, and extensions',
101 description: 'Everything Claude Code reads that is specific to this project. If you use git, commit most files here so your team shares them; a few, like settings.local.json, are gitignored when Claude Code saves settings to them. Each file badge shows which.',
102 children: [{
103 id: 'settings-json',
104 label: 'settings.json',
105 type: 'file',
106 icon: 'json',
107 color: 'var(--ce-text-3)',
108 badge: 'committed',
109 oneLiner: 'Permissions, hooks, and configuration',
110 when: <>Overrides global <C>~/.claude/settings.json</C>. Local settings, CLI flags, and managed settings override this</>,
111 description: 'Settings that Claude Code applies directly. Permissions control which commands and tools Claude can use; hooks run your scripts at specific points in a session. Unlike CLAUDE.md, which Claude reads as guidance, these are enforced whether Claude follows them or not.',
112 contains: [<><A href="/docs/en/permissions">permissions</A>: allow, deny, or prompt before Claude uses specific tools or commands</>, <><A href="/docs/en/hooks">hooks</A>: run your own scripts on events like before a tool call or after a file edit</>, <><A href="/docs/en/statusline">statusLine</A>: customize the line shown at the bottom while Claude works</>, <><A href="/docs/en/settings-reference#available-settings">model</A>: pick a default model for this project</>, <><A href="/docs/en/settings-reference#environment-variables">env</A>: environment variables set in every session</>, <><A href="/docs/en/output-styles">outputStyle</A>: select a custom output style from output-styles/</>],
113 tips: [<>Bash permission patterns support wildcards: <C>Bash(npm test *)</C> matches any command starting with <C>npm test</C></>, <>Array settings like <C>permissions.allow</C> combine across all scopes; scalar settings like <C>model</C> use the most specific value</>],
114 exampleIntro: <>This example allows <C>npm test</C> and <C>npm run</C> commands without prompting, blocks <C>rm -rf</C>, and runs Prettier on files after Claude edits or writes them.</>,
115 example: `{
116 "permissions": {
117 "allow": [
118 "Bash(npm test *)",
119 "Bash(npm run *)"
120 ],
121 "deny": [
122 "Bash(rm -rf *)"
123 ]
124 },
125 "hooks": {
126 "PostToolUse": [{
127 "matcher": "Edit|Write",
128 "hooks": [{
129 "type": "command",
130 "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
131 }]
132 }]
133 }
134}`,
135 docsLink: '/en/settings'
136 }, {
137 id: 'settings-local-json',
138 label: 'settings.local.json',
139 type: 'file',
140 icon: 'json',
141 color: 'var(--ce-text-3)',
142 badge: 'gitignored',
143 oneLiner: 'Your personal settings overrides for this project',
144 when: 'Highest of the user-editable settings files; CLI flags and managed settings still take precedence',
145 description: 'Personal settings that take precedence over the project defaults. Same JSON format as settings.json, gitignored when Claude Code saves a setting to it. Use this when you need different permissions or defaults than the team config.',
146 tips: [<>Same schema as settings.json. Array settings like <C>permissions.allow</C> combine across scopes; scalar settings like <C>model</C> use the local value</>, <>When Claude Code saves a setting to this file in a repository that doesn't already ignore it, it adds <C>**/.claude/settings.local.json</C> to your global git excludes file: <C>core.excludesFile</C> from your global git config when it's set to an absolute or <C>~</C>-prefixed path, otherwise <C>$XDG_CONFIG_HOME/git/ignore</C>, or <C>~/.config/git/ignore</C>. To share the ignore rule with your team, also add it to the project <C>.gitignore</C></>],
147 exampleIntro: 'This example adds Docker permissions on top of whatever the team settings.json allows.',
148 example: `{
149 "permissions": {
150 "allow": [
151 "Bash(docker *)"
152 ]
153 }
154}`,
155 docsLink: '/en/settings'
156 }, {
157 id: 'rules',
158 label: 'rules/',
159 type: 'folder',
160 icon: 'folder',
161 color: '#9B7BC4',
162 oneLiner: 'Topic-scoped instructions, optionally gated by file paths',
163 when: <>Rules without <C>paths:</C> load at session start. Rules with <C>paths:</C> load when Claude reads, writes, or edits a matching file</>,
164 description: [<>Project instructions split into topic files that can load conditionally based on file paths. A rule without <C>paths:</C> frontmatter loads at session start like CLAUDE.md; a rule with <C>paths:</C> loads only when Claude reads, writes, or edits a matching file.</>, <>Like CLAUDE.md, rules are guidance Claude reads, not configuration Claude Code enforces. For guaranteed behavior use <A href="/docs/en/hooks">hooks</A> or <A href="/docs/en/permissions">permissions</A>.</>],
165 tips: [<>Use <C>paths:</C> frontmatter with globs to scope rules to directories or file types</>, <>Subdirectories work: <C>.claude/rules/frontend/react.md</C> is discovered automatically</>, 'When CLAUDE.md approaches 200 lines, start splitting into rules'],
166 docsLink: '/en/memory#organize-rules-with-claude/rules/',
167 children: [{
168 id: 'rule-testing',
169 label: 'testing.md',
170 type: 'file',
171 icon: 'md',
172 color: '#9B7BC4',
173 badge: 'committed',
174 oneLiner: 'Test conventions scoped to test files',
175 when: <>Loaded when Claude reads, writes, or edits a file matching the <C>paths:</C> globs below</>,
176 description: <>An example rule that only loads when Claude is working on test files. The <C>paths:</C> globs in the frontmatter define which files trigger it; here, anything ending in .test.ts or .test.tsx. For other files, this rule is not loaded into context.</>,
177 example: `---
178paths:
179 - "**/*.test.ts"
180 - "**/*.test.tsx"
181---
182
183# Testing Rules
184
185- Use descriptive test names: "should [expected] when [condition]"
186- Mock external dependencies, not internal modules
187- Clean up side effects in afterEach`
188 }, {
189 id: 'rule-api',
190 label: 'api-design.md',
191 type: 'file',
192 icon: 'md',
193 color: '#9B7BC4',
194 badge: 'committed',
195 oneLiner: 'API conventions scoped to backend code',
196 when: <>Loaded when Claude reads, writes, or edits a file matching the <C>paths:</C> glob below</>,
197 description: <>A second example showing a rule scoped to backend code. The <C>paths:</C> glob matches files under src/api/, so these conventions load only when Claude is working on API routes.</>,
198 example: `---
199paths:
200 - "src/api/**/*.ts"
201---
202
203# API Design Rules
204
205- All endpoints must validate input with Zod schemas
206- Return shape: { data: T } | { error: string }
207- Rate limit all public endpoints`
208 }]
209 }, {
210 id: 'skills',
211 label: 'skills/',
212 type: 'folder',
213 icon: 'folder',
214 color: '#D4A843',
215 oneLiner: 'Reusable prompts you or Claude invoke by name',
216 when: <>Invoked with <C>/skill-name</C> or when Claude matches the task to a skill</>,
217 description: <>Each skill is a folder with a SKILL.md file plus any supporting files it needs. By default, both you and Claude can invoke a skill. Use frontmatter to control that: <C>disable-model-invocation: true</C> for user-only workflows like <C>/deploy</C>, or <C>user-invocable: false</C> to hide from the <C>/</C> menu while Claude can still invoke it.</>,
218 tips: [<>Skills accept arguments: <C>/deploy staging</C> passes "staging" as <C>$ARGUMENTS</C>. Use <C>$0</C>, <C>$1</C>, and so on for positional access</>, <>The <C>description</C> frontmatter determines when Claude auto-invokes the skill</>, 'Bundle reference docs alongside SKILL.md. Claude knows the skill directory path and can read supporting files when you mention them'],
219 docsLink: '/en/skills',
220 children: [{
221 id: 'skill-review',
222 label: 'security-review/',
223 type: 'folder',
224 icon: 'folder',
225 color: '#D4A843',
226 oneLiner: 'A skill bundling SKILL.md with supporting files',
227 children: [{
228 id: 'skill-review-md',
229 label: 'SKILL.md',
230 type: 'file',
231 icon: 'md',
232 color: '#D4A843',
233 badge: 'committed',
234 oneLiner: 'Entrypoint: trigger, invocability, instructions',
235 when: <>User types <C>/security-review <target></C>; Claude cannot auto-invoke this skill</>,
236 description: [<>This skill uses <C>disable-model-invocation: true</C> so only you can trigger it; Claude never invokes it on its own.</>, <>The <C>!`...`</C> line runs a shell command and injects its output into the prompt. <C>$ARGUMENTS</C> substitutes whatever you typed after the skill name. Claude sees the skill directory path, so mentioning a bundled file like checklist.md lets Claude read it.</>],
237 example: `---
238description: Reviews code changes for security vulnerabilities, authentication gaps, and injection risks
239disable-model-invocation: true
240argument-hint: <branch-or-path>
241---
242
243## Diff to review
244
245!\`git diff $ARGUMENTS\`
246
247Audit the changes above for:
248
2491. Injection vulnerabilities (SQL, XSS, command)
2502. Authentication and authorization gaps
2513. Hardcoded secrets or credentials
252
253Use checklist.md in this skill directory for the full review checklist.
254
255Report findings with severity ratings and remediation steps.`
256 }, {
257 id: 'skill-checklist',
258 label: 'checklist.md',
259 type: 'file',
260 icon: 'md',
261 color: '#D4A843',
262 badge: 'committed',
263 oneLiner: 'Supporting file bundled with the skill',
264 when: 'Claude reads it on demand while running the skill',
265 description: <>Skills can bundle any supporting files: reference docs, templates, scripts. The skill directory path is prepended to SKILL.md, so Claude can read bundled files by name. For scripts in bash injection commands, use the <C>{'${CLAUDE_SKILL_DIR}'}</C> placeholder.</>,
266 example: `# Security Review Checklist
267
268## Input Validation
269- [ ] All user input sanitized before DB queries
270- [ ] File upload MIME types validated
271- [ ] Path traversal prevented on file operations
272
273## Authentication
274- [ ] JWT tokens expire after 24 hours
275- [ ] API keys stored in environment variables
276- [ ] Passwords hashed with bcrypt or argon2`
277 }]
278 }]
279 }, {
280 id: 'commands',
281 label: 'commands/',
282 type: 'folder',
283 icon: 'folder',
284 color: '#788C5D',
285 oneLiner: <>Single-file prompts invoked with <C>/name</C></>,
286 note: commandsNote,
287 when: <>User types <C>/command-name</C></>,
288 description: <>A file at <C>commands/deploy.md</C> creates <C>/deploy</C> the same way a skill at <C>skills/deploy/SKILL.md</C> does, and both can be auto-invoked by Claude. Skills use a directory with SKILL.md, letting you bundle reference docs, templates, or scripts alongside the prompt.</>,
289 tips: [<>Use <C>$ARGUMENTS</C> in the file to accept parameters: <C>/fix-issue 123</C></>, 'If a skill and command share a name, the skill takes precedence', 'New commands should usually be skills instead; command files still work'],
290 docsLink: '/en/skills',
291 children: [{
292 id: 'cmd-example',
293 label: 'fix-issue.md',
294 type: 'file',
295 icon: 'md',
296 color: '#788C5D',
297 badge: 'committed',
298 oneLiner: <>Invoked as <C>/fix-issue <number></C></>,
299 note: commandsNote,
300 description: [<>An example command for fixing a GitHub issue. Type <C>/fix-issue 123</C> and the <C>!`...`</C> line runs <C>gh issue view 123</C> in your shell, injecting the output into the prompt before Claude sees it.</>, <><C>$ARGUMENTS</C> substitutes whatever you typed after the command name. For positional access, use <C>$0</C> <C>$1</C> and so on.</>],
301 example: `---
302argument-hint: <issue-number>
303---
304
305!\`gh issue view $ARGUMENTS\`
306
307Investigate and fix the issue above.
308
3091. Trace the bug to its root cause
3102. Implement the fix
3113. Write or update tests
3124. Summarize what you changed and why`
313 }]
314 }, {
315 id: 'output-styles',
316 label: 'output-styles/',
317 type: 'folder',
318 icon: 'folder',
319 color: '#5AA7A7',
320 oneLiner: 'Project-scoped output styles, if your team shares any',
321 when: 'Files read at startup; the style you select with outputStyle applies to every response',
322 description: <>Output styles are usually personal, so most live in <C>~/.claude/output-styles/</C>. Put one here if your team shares a style, like a review mode everyone uses. See <A href="#ce-global-output-styles">the Global tab</A> for the full explanation and example.</>,
323 docsLink: '/en/output-styles',
324 children: []
325 }, {
326 id: 'agents',
327 label: 'agents/',
328 type: 'folder',
329 icon: 'folder',
330 color: '#C46686',
331 oneLiner: 'Specialized subagents with their own context window',
332 when: 'Runs in its own context window when you or Claude invoke it',
333 description: 'Each markdown file defines a subagent with its own system prompt, tool access, and optionally its own model. Subagents run in a fresh context window, keeping the main conversation clean. Useful for parallel work or isolated tasks.',
334 tips: ['Each agent gets a fresh context window, separate from your main session', <>Restrict tool access per agent with the <C>tools:</C> frontmatter field</>, 'Type @ and pick an agent from the autocomplete to delegate directly'],
335 docsLink: '/en/sub-agents',
336 children: [{
337 id: 'agent-reviewer',
338 label: 'code-reviewer.md',
339 type: 'file',
340 icon: 'md',
341 color: '#C46686',
342 badge: 'committed',
343 oneLiner: 'Subagent for isolated code review',
344 when: 'Claude spawns it for review tasks, or you @-mention it from the autocomplete',
345 description: <>An example subagent restricted to read-only tools. The <C>description</C> frontmatter tells Claude when to delegate to it automatically; <C>tools:</C> limits it to Read, Grep, and Glob so it can inspect code but never edit. The body becomes the subagent's system prompt.</>,
346 example: `---
347name: code-reviewer
348description: Reviews code for correctness, security, and maintainability
349tools: Read, Grep, Glob
350---
351
352You are a senior code reviewer. Review for:
353
3541. Correctness: logic errors, edge cases, null handling
3552. Security: injection, auth bypass, data exposure
3563. Maintainability: naming, complexity, duplication
357
358Every finding must include a concrete fix.`
359 }]
360 }, {
361 id: 'workflows',
362 label: 'workflows/',
363 type: 'folder',
364 icon: 'folder',
365 color: '#C46686',
366 oneLiner: 'Dynamic workflow scripts that orchestrate many subagents',
367 when: 'Loaded at startup; each file becomes a /<name> command',
368 description: <>Each <C>.js</C> file is a <A href="/docs/en/workflows">dynamic workflow</A>: a script the runtime executes to spawn and coordinate many subagents. Workflows are written by Claude and saved here from <C>/workflows</C> rather than authored from scratch.</>,
369 tips: [<>Save a run from <C>/workflows</C> with <C>s</C> to create one of these</>, <>A project workflow takes precedence over a personal one in <C>~/.claude/workflows/</C> with the same name</>],
370 docsLink: '/en/workflows'
371 }, {
372 id: 'agent-memory',
373 label: 'agent-memory/',
374 type: 'folder',
375 icon: 'folder',
376 color: '#C46686',
377 badge: 'committed',
378 autogen: true,
379 oneLiner: 'Subagent persistent memory, separate from your main session auto memory',
380 when: 'First 200 lines (capped at 25KB) of MEMORY.md loaded into the subagent system prompt when it runs',
381 description: <>Subagents with <C>memory: project</C> in their frontmatter get a dedicated memory directory here. This is distinct from your <A href="/docs/en/memory#auto-memory">main session auto memory</A> at <C>~/.claude/projects/</C>: each subagent reads and writes its own MEMORY.md, not yours.</>,
382 tips: [<>Only created for subagents that set the <C>memory:</C> frontmatter field</>, <>This directory holds project-scoped subagent memory, meant to be shared with your team. To keep memory out of version control use <C>memory: local</C>, which writes to <C>.claude/agent-memory-local/</C> instead. For cross-project memory use <C>memory: user</C>, which writes to <C>~/.claude/agent-memory/</C></>, <>The main session auto memory is a different feature; see <C>~/.claude/projects/</C> in the Global tab</>],
383 docsLink: '/en/sub-agents#enable-persistent-memory',
384 children: [{
385 id: 'agent-memory-sub',
386 label: '<agent-name>/',
387 type: 'folder',
388 icon: 'folder',
389 color: '#C46686',
390 autogen: true,
391 children: [{
392 id: 'agent-memory-md',
393 label: 'MEMORY.md',
394 type: 'file',
395 icon: 'md',
396 color: '#C46686',
397 badge: 'committed',
398 autogen: true,
399 oneLiner: 'The subagent writes and maintains this file automatically',
400 when: 'Loaded into the subagent system prompt when the subagent starts',
401 description: <>Works the same as your <A href="/docs/en/memory#auto-memory">main auto memory</A>: the subagent creates and updates this file itself. You do not write it. The subagent reads it at the start of each task and writes back what it learns.</>,
402 example: `# code-reviewer memory
403
404## Patterns seen
405- Project uses custom Result<T, E> type, not exceptions
406- Auth middleware expects Bearer token in Authorization header
407- Tests use factory functions in test/factories/
408
409## Recurring issues
410- Missing null checks on API responses (src/api/*)
411- Unhandled promise rejections in background jobs`
412 }]
413 }]
414 }]
415 }]
416 },
417 global: {
418 label: '~/',
419 children: [{
420 id: 'claude-json',
421 label: '.claude.json',
422 type: 'file',
423 icon: 'json',
424 color: 'var(--ce-text-3)',
425 badge: 'local',
426 oneLiner: 'App state and UI preferences',
427 when: <>Read at session start for your preferences and MCP servers. Claude Code writes back to it when you change settings in <C>/config</C> or approve trust prompts</>,
428 description: <>Holds state that does not belong in settings.json: OAuth session, per-project trust decisions, your personal MCP servers, and UI toggles. Mostly managed through <C>/config</C> rather than editing directly.</>,
429 tips: [<>IDE toggles like <C>autoConnectIde</C> and <C>externalEditorContext</C> live here, not in settings.json</>, <>The <C>projects</C> key tracks per-project state like trust-dialog acceptance and last-session metrics. Permission rules you approve in-session go to <C>.claude/settings.local.json</C> instead</>, <>MCP servers here are yours only: user scope applies across all projects, local scope is per-project but not committed. Team-shared servers go in <C>.mcp.json</C> at the project root instead</>],
430 example: `{
431 "autoConnectIde": true,
432 "externalEditorContext": true,
433 "mcpServers": {
434 "my-tools": {
435 "command": "npx",
436 "args": ["-y", "@example/mcp-server"]
437 }
438 }
439}`,
440 docsLink: '/en/settings-reference#global-config-settings'
441 }, {
442 id: 'global-dot-claude',
443 label: '.claude/',
444 type: 'folder',
445 icon: 'folder',
446 color: 'var(--ce-accent)',
447 oneLiner: 'Your personal configuration across all projects',
448 description: 'The global counterpart to your project .claude/ directory. Files here apply to every project you work in and are never committed to any repository.',
449 children: [{
450 id: 'global-claude-md',
451 label: 'CLAUDE.md',
452 type: 'file',
453 icon: 'md',
454 color: '#6A9BCC',
455 badge: 'local',
456 oneLiner: 'Personal preferences across every project',
457 when: 'Loaded at the start of every session, in every project',
458 description: 'Your global instruction file. Loaded alongside the project CLAUDE.md at session start, so both are in context together. When instructions conflict, project-level instructions take priority. Keep this to preferences that apply everywhere: response style, commit format, personal conventions.',
459 tips: ['Keep it short since it loads into context for every project, alongside that project\'s own CLAUDE.md', 'Good for response style, commit format, and personal conventions'],
460 example: `# Global preferences
461
462- Keep explanations concise
463- Use conventional commit format
464- Show the terminal command to verify changes
465- Prefer composition over inheritance`,
466 docsLink: '/en/memory'
467 }, {
468 id: 'global-settings',
469 label: 'settings.json',
470 type: 'file',
471 icon: 'json',
472 color: 'var(--ce-text-3)',
473 badge: 'local',
474 oneLiner: 'Default settings for all projects',
475 when: 'Your defaults. Project and local settings.json override any keys you also set there',
476 description: [<>Same keys as project <C>settings.json</C>: permissions, hooks, model, environment variables, and the rest. Put settings here that you want in every project, like permissions you always allow, a preferred model, or a notification hook that runs regardless of which project you're in.</>, <>Settings follow a precedence order: project <C>settings.json</C> overrides any matching keys you set here. This is different from CLAUDE.md, where global and project files are both loaded into context rather than merged key by key.</>],
477 example: `{
478 "permissions": {
479 "allow": [
480 "Bash(git log *)",
481 "Bash(git diff *)"
482 ]
483 }
484}`,
485 docsLink: '/en/settings'
486 }, {
487 id: 'keybindings',
488 label: 'keybindings.json',
489 type: 'file',
490 icon: 'json',
491 color: 'var(--ce-text-3)',
492 badge: 'local',
493 oneLiner: 'Custom keyboard shortcuts',
494 when: 'Read at session start and hot-reloaded when you edit the file',
495 description: <>Rebind keyboard shortcuts in the interactive CLI. Run <C>/keybindings</C> to create or open this file with a schema reference. Ctrl+C, Ctrl+D, Ctrl+M, and Caps Lock are reserved and cannot be rebound.</>,
496 exampleIntro: <>This example binds <C>Ctrl+E</C> to open your external editor and unbinds <C>Ctrl+S</C> by setting it to <C>null</C>. The <C>context</C> field scopes bindings to a specific part of the CLI, here the main chat input.</>,
497 example: `{
498 "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
499 "$docs": "https://code.claude.com/docs/en/keybindings",
500 "bindings": [
501 {
502 "context": "Chat",
503 "bindings": {
504 "ctrl+e": "chat:externalEditor",
505 "ctrl+s": null
506 }
507 }
508 ]
509}`,
510 docsLink: '/en/keybindings'
511 }, {
512 id: 'themes',
513 label: 'themes/',
514 type: 'folder',
515 icon: 'folder',
516 color: '#5AA7A7',
517 oneLiner: 'Custom color themes',
518 when: <>Read at session start and hot-reloaded when files change. Listed in <C>/theme</C></>,
519 description: <>Each <C>.json</C> file defines a custom color theme: a built-in <C>base</C> preset plus an <C>overrides</C> map of color tokens. Create one interactively with <C>/theme</C> or write the JSON by hand. Selecting a custom theme stores <C>custom:<slug></C> as your theme preference.</>,
520 example: `{
521 "name": "Dracula",
522 "base": "dark",
523 "overrides": {
524 "claude": "#bd93f9",
525 "error": "#ff5555",
526 "success": "#50fa7b"
527 }
528}`,
529 docsLink: '/en/terminal-config#create-a-custom-theme',
530 children: []
531 }, {
532 id: 'global-projects',
533 label: 'projects/',
534 type: 'folder',
535 icon: 'folder',
536 color: '#E8A45C',
537 autogen: true,
538 oneLiner: "Auto memory: Claude's notes to itself, per project",
539 when: 'MEMORY.md loaded at session start; topic files read on demand',
540 description: 'Auto memory lets Claude accumulate knowledge across sessions without you writing anything. Claude saves notes as it works: build commands, debugging insights, architecture notes. Each project gets its own memory directory keyed by the repository path.',
541 tips: [<>On by default. Toggle with <C>/memory</C> or <C>autoMemoryEnabled</C> in settings</>, 'MEMORY.md is the index loaded each session. The first 200 lines, or 25KB, whichever comes first, are read', 'Topic files like debugging.md are read on demand, not at startup', 'These are plain markdown. Edit or delete them anytime'],
542 docsLink: '/en/memory#auto-memory',
543 children: [{
544 id: 'memory-dir',
545 label: '<project>/memory/',
546 type: 'folder',
547 icon: 'folder',
548 color: '#E8A45C',
549 autogen: true,
550 oneLiner: "Claude's accumulated knowledge for one project",
551 children: [{
552 id: 'memory-md',
553 label: 'MEMORY.md',
554 type: 'file',
555 icon: 'md',
556 color: '#E8A45C',
557 badge: 'local',
558 autogen: true,
559 oneLiner: 'Claude writes and maintains this file automatically',
560 when: 'First 200 lines (capped at 25KB) loaded at session start',
561 description: 'Claude creates and updates this file as it works; you do not write it yourself. It acts as an index that Claude reads at the start of every session, pointing to topic files for detail. You can edit or delete it, but Claude will keep updating it.',
562 example: `# Memory Index
563
564## Project
565- [build-and-test.md](build-and-test.md): npm run build (~45s), Vitest, dev server on 3001
566- [architecture.md](architecture.md): API client singleton, refresh-token auth
567
568## Reference
569- [debugging.md](debugging.md): auth token rotation and DB connection troubleshooting`,
570 docsLink: '/en/memory'
571 }, {
572 id: 'memory-topic',
573 label: 'debugging.md',
574 type: 'file',
575 icon: 'md',
576 color: '#E8A45C',
577 badge: 'local',
578 autogen: true,
579 oneLiner: 'Topic notes Claude writes when MEMORY.md gets long',
580 when: 'Claude reads this when a related task comes up',
581 description: 'An example of a topic file Claude creates when MEMORY.md grows too long. Claude picks the filename based on what it splits out: debugging.md, architecture.md, build-commands.md, or similar. You never create these yourself. Claude reads a topic file back only when the current task relates to it.',
582 example: `---
583name: Debugging patterns
584description: Auth token rotation and database connection troubleshooting for this project
585type: reference
586---
587
588## Auth Token Issues
589- Refresh token rotation: old token invalidated immediately
590- If 401 after refresh: check clock skew between client and server
591
592## Database Connection Drops
593- Connection pool: max 10 in dev, 50 in prod
594- Always check \`docker compose ps\` first`
595 }]
596 }]
597 }, {
598 id: 'global-rules',
599 label: 'rules/',
600 type: 'folder',
601 icon: 'folder',
602 color: '#9B7BC4',
603 oneLiner: 'User-level rules that apply to every project',
604 when: <>Rules without <C>paths:</C> load at session start. Rules with <C>paths:</C> load when Claude reads, writes, or edits a matching file</>,
605 description: 'Same as project .claude/rules/ but applies everywhere. Use this for conventions you want across all your work, like personal code style or commit message format.',
606 docsLink: '/en/memory#organize-rules-with-claude/rules/',
607 children: []
608 }, {
609 id: 'global-skills',
610 label: 'skills/',
611 type: 'folder',
612 icon: 'folder',
613 color: '#D4A843',
614 oneLiner: 'Personal skills available in every project',
615 when: <>Invoked with <C>/skill-name</C> in any project</>,
616 description: 'Skills you built for yourself that work everywhere. Same structure as project skills: each is a folder with SKILL.md, scoped to your user account instead of a single project.',
617 docsLink: '/en/skills',
618 children: []
619 }, {
620 id: 'global-commands',
621 label: 'commands/',
622 type: 'folder',
623 icon: 'folder',
624 color: '#788C5D',
625 oneLiner: 'Personal single-file commands available in every project',
626 note: commandsNote,
627 when: <>User types <C>/command-name</C> in any project</>,
628 description: 'Same as project commands/ but scoped to your user account. Each markdown file becomes a command available everywhere.',
629 docsLink: '/en/skills',
630 children: []
631 }, {
632 id: 'global-output-styles',
633 label: 'output-styles/',
634 type: 'folder',
635 icon: 'folder',
636 color: '#5AA7A7',
637 oneLiner: 'Custom instruction sets that adjust how Claude works',
638 when: 'Files read at startup; the style you select with outputStyle applies to every response',
639 description: [<>Each markdown file defines an output style: a set of instructions for Claude that, by default, also replaces the built-in software-engineering task instructions. Use this to adapt Claude Code for uses beyond coding, or to add teaching or review modes.</>, <>Select a built-in or custom style with <C>/output-style</C>, <C>/config</C>, or the <C>outputStyle</C> key in settings. Styles here are available in every project; project-level styles with the same name take precedence.</>],
640 tips: ['Built-in styles Default, Proactive, Concise, Explanatory, and Learning are included with Claude Code; custom styles go here', <>Set <C>keep-coding-instructions: true</C> in frontmatter to keep the default task instructions alongside your additions</>, 'Switching styles mid-session applies from your next message; in the terminal, a style file you create or edit mid-session is picked up after a restart'],
641 docsLink: '/en/output-styles',
642 children: [{
643 id: 'output-style-example',
644 label: 'teaching.md',
645 type: 'file',
646 icon: 'md',
647 color: '#5AA7A7',
648 badge: 'local',
649 oneLiner: 'Example style that adds explanations and leaves small changes for you',
650 when: <>Active when <C>outputStyle</C> in settings is set to <C>teaching</C></>,
651 description: <>With this style, Claude adds a "Why this approach" note after each task and leaves TODO(human) markers for changes under 10 lines instead of writing them itself. Select it by setting <C>outputStyle</C> to the filename without .md, or to the <C>name</C> field if you set one in frontmatter.</>,
652 example: `---
653description: Explains reasoning and asks you to implement small pieces
654keep-coding-instructions: true
655---
656
657After completing each task, add a brief "Why this approach" note
658explaining the key design decision.
659
660When a change is under 10 lines, ask the user to implement it
661themselves by leaving a TODO(human) marker instead of writing it.`
662 }]
663 }, {
664 id: 'global-agents',
665 label: 'agents/',
666 type: 'folder',
667 icon: 'folder',
668 color: '#C46686',
669 oneLiner: 'Personal subagents available in every project',
670 when: 'Claude delegates or you @-mention in any project',
671 description: 'Subagents defined here are available across all your projects. Same format as project agents.',
672 docsLink: '/en/sub-agents',
673 children: []
674 }, {
675 id: 'global-workflows',
676 label: 'workflows/',
677 type: 'folder',
678 icon: 'folder',
679 color: '#C46686',
680 oneLiner: 'Personal dynamic workflows available in every project',
681 when: 'Loaded at startup; each file becomes a /<name> command',
682 description: <>Workflow scripts saved here are available across all your projects. A project workflow with the same name in <C>.claude/workflows/</C> takes precedence.</>,
683 docsLink: '/en/workflows',
684 children: []
685 }, {
686 id: 'global-agent-memory',
687 label: 'agent-memory/',
688 type: 'folder',
689 icon: 'folder',
690 color: '#C46686',
691 autogen: true,
692 oneLiner: <>Persistent memory for subagents with <C>memory: user</C></>,
693 when: 'Loaded into the subagent system prompt when the subagent starts',
694 description: <>Subagents with <C>memory: user</C> in their frontmatter store knowledge here that persists across all projects. For project-scoped subagent memory, see <C>.claude/agent-memory/</C> instead.</>,
695 docsLink: '/en/sub-agents#enable-persistent-memory',
696 children: []
697 }]
698 }]
699 }
700 }), []);
701 const BADGE_STYLES = useMemo(() => ({
702 committed: {
703 bg: 'rgba(85,138,66,0.08)',
704 color: 'var(--ce-badge-committed)',
705 border: 'rgba(85,138,66,0.15)',
706 label: 'committed'
707 },
708 gitignored: {
709 bg: 'rgba(217,119,87,0.06)',
710 color: 'var(--ce-badge-gitignored)',
711 border: 'rgba(217,119,87,0.15)',
712 label: 'gitignored'
713 },
714 local: {
715 bg: 'rgba(115,114,108,0.06)',
716 color: 'var(--ce-badge-local)',
717 border: 'rgba(115,114,108,0.12)',
718 label: 'local only'
719 },
720 autogen: {
721 bg: 'rgba(232,164,92,0.1)',
722 color: 'var(--ce-badge-autogen)',
723 border: 'rgba(232,164,92,0.2)',
724 label: 'Claude writes'
725 }
726 }), []);
727 const allNodes = useMemo(() => {
728 const flatten = (nodes, acc, path, parentId) => {
729 for (const node of nodes) {
730 const nextPath = [...path, node.label];
731 acc[node.id] = {
732 ...node,
733 path: nextPath,
734 parentId
735 };
736 if (node.children) flatten(node.children, acc, nextPath, node.id);
737 }
738 return acc;
739 };
740 const project = flatten(FILE_TREE.project.children, {}, [FILE_TREE.project.label]);
741 const global = flatten(FILE_TREE.global.children, {}, [FILE_TREE.global.label]);
742 for (const id in project) project[id].root = 'project';
743 for (const id in global) global[id].root = 'global';
744 return {
745 ...project,
746 ...global
747 };
748 }, [FILE_TREE]);
749 const allFolderIds = useMemo(() => Object.keys(allNodes).filter(id => allNodes[id].type === 'folder'), [allNodes]);
750 const DEFAULT_EXPANDED = ['dot-claude', 'rules', 'skills', 'skill-review', 'commands', 'agents', 'agent-memory', 'agent-memory-sub', 'global-dot-claude', 'global-output-styles', 'global-projects', 'memory-dir'];
751 const [mounted, setMounted] = useState(false);
752 const [activeRoot, setActiveRoot] = useState('project');
753 const [selectedId, setSelectedId] = useState('claude-md');
754 const [expandedFolders, setExpandedFolders] = useState(() => new Set(DEFAULT_EXPANDED));
755 const [forceMobile, setForceMobile] = useState(false);
756 const [copiedId, setCopiedId] = useState(null);
757 const [isFullscreen, setIsFullscreen] = useState(false);
758 const copyTimeoutRef = useRef(null);
759 const rootRef = useRef(null);
760 useEffect(() => {
761 setMounted(true);
762 const applyHash = scroll => {
763 const hash = window.location.hash.slice(1);
764 if (!hash.startsWith('ce-')) return;
765 const id = hash.slice(3);
766 const node = allNodes[id];
767 if (!node) return;
768 setActiveRoot(node.root);
769 setSelectedId(id);
770 setExpandedFolders(new Set(allFolderIds));
771 if (scroll && rootRef.current) rootRef.current.scrollIntoView({
772 behavior: 'smooth',
773 block: 'start'
774 });
775 };
776 applyHash(false);
777 const onHashChange = () => applyHash(true);
778 const onFsChange = () => setIsFullscreen(!!document.fullscreenElement);
779 window.addEventListener('hashchange', onHashChange);
780 document.addEventListener('fullscreenchange', onFsChange);
781 return () => {
782 if (copyTimeoutRef.current) clearTimeout(copyTimeoutRef.current);
783 window.removeEventListener('hashchange', onHashChange);
784 document.removeEventListener('fullscreenchange', onFsChange);
785 };
786 }, []);
787 useEffect(() => {
788 if (!mounted || !rootRef.current) return;
789 const hash = window.location.hash.slice(1);
790 if (hash.startsWith('ce-') && allNodes[hash.slice(3)]) {
791 rootRef.current.scrollIntoView({
792 behavior: 'smooth',
793 block: 'start'
794 });
795 }
796 }, [mounted]);
797 if (!mounted) return null;
798 const selected = allNodes[selectedId];
799 const tree = FILE_TREE[activeRoot];
800 const isCopied = copiedId === selected.id;
801 const toggleFolder = id => {
802 const next = new Set(expandedFolders);
803 next.has(id) ? next.delete(id) : next.add(id);
804 setExpandedFolders(next);
805 };
806 const switchRoot = root => {
807 if (root === activeRoot) return;
808 setActiveRoot(root);
809 const firstId = FILE_TREE[root].children[0].id;
810 setSelectedId(firstId);
811 try {
812 history.replaceState(null, '', '#ce-' + firstId);
813 } catch (e) {}
814 };
815 const toggleFullscreen = () => {
816 if (!rootRef.current) return;
817 if (document.fullscreenElement) document.exitFullscreen(); else rootRef.current.requestFullscreen().catch(() => {});
818 };
819 const selectNode = n => {
820 setSelectedId(n.id);
821 if (n.type === 'folder' && !expandedFolders.has(n.id)) toggleFolder(n.id);
822 try {
823 history.replaceState(null, '', '#ce-' + n.id);
824 } catch (e) {}
825 };
826 const iconBtn = {
827 width: 28,
828 flexShrink: 0,
829 borderRadius: '6px',
830 border: 'none',
831 cursor: 'pointer',
832 background: 'transparent',
833 color: 'var(--ce-text-4)',
834 display: 'flex',
835 alignItems: 'center',
836 justifyContent: 'center'
837 };
838 const visibleFolderIds = allFolderIds.filter(id => allNodes[id].root === activeRoot);
839 const allExpanded = visibleFolderIds.every(id => expandedFolders.has(id));
840 const toggleAllFolders = () => {
841 const next = new Set(expandedFolders);
842 visibleFolderIds.forEach(id => allExpanded ? next.delete(id) : next.add(id));
843 setExpandedFolders(next);
844 };
845 const onTreeKeyDown = e => {
846 if (!['ArrowDown', 'ArrowUp', 'ArrowRight', 'ArrowLeft'].includes(e.key)) return;
847 const visible = [];
848 const walk = nodes => {
849 for (const n of nodes) {
850 visible.push(n.id);
851 if (n.children && expandedFolders.has(n.id)) walk(n.children);
852 }
853 };
854 walk(tree.children);
855 const i = visible.indexOf(selectedId);
856 if (i === -1) return;
857 e.preventDefault();
858 if (e.key === 'ArrowDown' && i < visible.length - 1) selectNode(allNodes[visible[i + 1]]); else if (e.key === 'ArrowUp' && i > 0) selectNode(allNodes[visible[i - 1]]); else if (e.key === 'ArrowRight' && selected.type === 'folder') {
859 if (!expandedFolders.has(selectedId)) toggleFolder(selectedId); else if (selected.children && selected.children.length) selectNode(allNodes[selected.children[0].id]);
860 } else if (e.key === 'ArrowLeft') {
861 if (selected.type === 'folder' && expandedFolders.has(selectedId)) toggleFolder(selectedId); else if (selected.parentId) selectNode(allNodes[selected.parentId]);
862 }
863 };
864 const copyExample = (id, text) => {
865 const done = () => {
866 setCopiedId(id);
867 if (copyTimeoutRef.current) clearTimeout(copyTimeoutRef.current);
868 copyTimeoutRef.current = setTimeout(() => setCopiedId(null), 2000);
869 };
870 const fallback = () => {
871 const ta = document.createElement('textarea');
872 ta.value = text;
873 ta.style.position = 'fixed';
874 ta.style.opacity = '0';
875 document.body.appendChild(ta);
876 ta.select();
877 try {
878 if (document.execCommand('copy')) done();
879 } catch (e) {}
880 document.body.removeChild(ta);
881 };
882 if (navigator.clipboard) {
883 navigator.clipboard.writeText(text).then(done, fallback);
884 } else {
885 fallback();
886 }
887 };
888 const renderIcon = (icon, color, size) => {
889 const sz = size || 14;
890 if (icon === 'folder') {
891 return <svg width={sz} height={sz} viewBox="0 0 14 14" fill="none">
892 <path d="M1.5 3.5a1 1 0 0 1 1-1h2.6l1 1.2h5.4a1 1 0 0 1 1 1v5.8a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1V3.5z" fill={color} fillOpacity="0.15" stroke={color} strokeWidth="1" />
893 </svg>;
894 }
895 if (icon === 'json') {
896 return <svg width={sz} height={sz} viewBox="0 0 14 14" fill="none">
897 <rect x="2" y="1.5" width="10" height="11" rx="1.5" fill={color} fillOpacity="0.15" stroke={color} strokeWidth="1" />
898 <text x="7" y="9" fontSize="6" fontFamily="monospace" fill={color} textAnchor="middle" fontWeight="700">{'{}'}</text>
899 </svg>;
900 }
901 return <svg width={sz} height={sz} viewBox="0 0 14 14" fill="none">
902 <rect x="2" y="1.5" width="10" height="11" rx="1.5" fill={color} fillOpacity="0.15" stroke={color} strokeWidth="1" />
903 <line x1="4.5" y1="5" x2="9.5" y2="5" stroke={color} strokeWidth="1" />
904 <line x1="4.5" y1="7" x2="9.5" y2="7" stroke={color} strokeWidth="1" />
905 <line x1="4.5" y1="9" x2="8" y2="9" stroke={color} strokeWidth="1" />
906 </svg>;
907 };
908 const renderNode = (node, depth) => {
909 const isFolder = node.type === 'folder';
910 const isExpanded = expandedFolders.has(node.id);
911 const isSelected = selectedId === node.id;
912 return <div key={node.id}>
913 <button role="treeitem" tabIndex={-1} onClick={() => selectNode(node)} aria-selected={isSelected} aria-expanded={isFolder ? isExpanded : undefined} style={{
914 display: 'flex',
915 alignItems: 'center',
916 gap: '5px',
917 width: '100%',
918 padding: `4px 8px 4px ${8 + depth * 16}px`,
919 background: isSelected ? 'var(--ce-accent-bg)' : 'transparent',
920 borderTop: 'none',
921 borderRight: 'none',
922 borderBottom: 'none',
923 borderLeft: isSelected ? '2px solid var(--ce-accent)' : '2px solid transparent',
924 outline: 'none',
925 cursor: 'pointer',
926 textAlign: 'left',
927 fontFamily: 'var(--ce-mono)',
928 fontSize: '13.5px',
929 color: isSelected ? 'var(--ce-accent)' : 'var(--ce-text-2)',
930 fontWeight: isSelected ? 550 : 400,
931 transition: 'all 0.1s'
932 }}>
933 {isFolder ? <span onClick={e => {
934 e.stopPropagation();
935 toggleFolder(node.id);
936 }} style={{
937 fontSize: '14px',
938 color: 'var(--ce-text-4)',
939 width: '20px',
940 height: '20px',
941 display: 'inline-flex',
942 alignItems: 'center',
943 justifyContent: 'center',
944 cursor: 'pointer',
945 borderRadius: '4px',
946 marginLeft: '-6px',
947 flexShrink: 0
948 }} onMouseEnter={e => {
949 e.currentTarget.style.background = 'var(--ce-arrow-hover)';
950 e.currentTarget.style.color = 'var(--ce-text-2)';
951 }} onMouseLeave={e => {
952 e.currentTarget.style.background = 'transparent';
953 e.currentTarget.style.color = 'var(--ce-text-4)';
954 }}>{isExpanded ? '▾' : '▸'}</span> : <span style={{
955 width: '14px',
956 flexShrink: 0
957 }} />}
958 {renderIcon(node.icon, node.color)}
959 <span style={{
960 flex: 1,
961 overflow: 'hidden',
962 textOverflow: 'ellipsis',
963 whiteSpace: 'nowrap'
964 }}>{node.label}</span>
965 {node.badge && BADGE_STYLES[node.badge] && <span title={BADGE_STYLES[node.badge].label} style={{
966 width: 6,
967 height: 6,
968 borderRadius: '50%',
969 background: BADGE_STYLES[node.badge].color,
970 flexShrink: 0,
971 opacity: 0.7
972 }} />}
973 </button>
974 {isFolder && isExpanded && node.children && <div role="group">{node.children.map(child => renderNode(child, depth + 1))}</div>}
975 </div>;
976 };
977 return <>
978 <style>{`
979 .ce-root {
980 --ce-mono: var(--font-mono, ui-monospace, monospace);
981 --ce-accent: #D97757;
982 --ce-accent-bg: rgba(217,119,87,0.06);
983 --ce-accent-border: rgba(217,119,87,0.12);
984 --ce-bg: #fff;
985 --ce-surface: #FAFAF7;
986 --ce-surface-hover: #F0EEE6;
987 --ce-border: #E8E6DC;
988 --ce-border-subtle: #F0EEE6;
989 --ce-text: #141413;
990 --ce-text-2: #5E5D59;
991 --ce-text-3: #73726C;
992 --ce-text-4: #9C9A92;
993 --ce-text-5: #B8B6AE;
994 --ce-sep: #D1CFC5;
995 --ce-code-header: #F5F4ED;
996 --ce-code-bg: #1A1918;
997 --ce-arrow-hover: rgba(0,0,0,0.08);
998 --ce-badge-committed: #3d6b2e;
999 --ce-badge-gitignored: #b85c3a;
1000 --ce-badge-local: #5e5d59;
1001 --ce-badge-autogen: #b07520;
1002 --ce-when-text: #4a7fb5;
1003 }
1004 .dark .ce-root {
1005 --ce-bg: #1a1918;
1006 --ce-surface: #232221;
1007 --ce-surface-hover: #2e2d2b;
1008 --ce-border: #3a3936;
1009 --ce-border-subtle: #2e2d2b;
1010 --ce-text: #e8e6dc;
1011 --ce-text-2: #c4c2b8;
1012 --ce-text-3: #9c9a92;
1013 --ce-text-4: #73726c;
1014 --ce-text-5: #5e5d59;
1015 --ce-sep: #4a4946;
1016 --ce-code-header: #2e2d2b;
1017 --ce-code-bg: #0d0d0c;
1018 --ce-arrow-hover: rgba(255,255,255,0.08);
1019 --ce-badge-committed: #6fa85c;
1020 --ce-badge-gitignored: #e08a60;
1021 --ce-badge-local: #9c9a92;
1022 --ce-badge-autogen: #e8a45c;
1023 --ce-when-text: #8bb4e0;
1024 }
1025 .ce-mobile-fallback { display: none; border: 1px solid rgba(0,0,0,0.1); background: rgba(0,0,0,0.03); }
1026 .dark .ce-mobile-fallback { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); }
1027 @media (max-width: 700px) {
1028 .ce-root:not(.ce-force) { display: none !important; }
1029 .ce-mobile-fallback { display: block; }
1030 }
1031 `}</style>
1032 {!forceMobile && <div className="ce-mobile-fallback" style={{
1033 padding: '14px 16px',
1034 borderRadius: '8px',
1035 fontSize: '14px'
1036 }}>
1037 The interactive explorer works best on a larger screen. See the <a href="#file-reference" style={{
1038 color: '#D97757'
1039 }}>file reference table</a> below, or <button onClick={() => setForceMobile(true)} style={{
1040 border: 'none',
1041 background: 'none',
1042 padding: 0,
1043 color: '#D97757',
1044 textDecoration: 'underline',
1045 cursor: 'pointer',
1046 font: 'inherit'
1047 }}>show the explorer anyway</button>.
1048 </div>}
1049 <div ref={rootRef} className={forceMobile ? 'ce-root ce-force' : 'ce-root'} style={{
1050 borderRadius: isFullscreen ? 0 : '12px',
1051 border: '1px solid var(--ce-border)',
1052 background: 'var(--ce-bg)',
1053 display: 'flex',
1054 alignItems: 'stretch',
1055 overflow: 'hidden',
1056 fontFamily: 'var(--font-sans, -apple-system, sans-serif)',
1057 ...isFullscreen && ({
1058 height: '100vh'
1059 })
1060 }}>
1061 {}
1062 <div style={{
1063 width: 'min(240px, 35%)',
1064 minWidth: '180px',
1065 flexShrink: 0,
1066 borderRight: '1px solid var(--ce-border-subtle)',
1067 background: 'var(--ce-surface)',
1068 display: 'flex',
1069 flexDirection: 'column'
1070 }}>
1071 <div style={{
1072 padding: '8px 8px 4px',
1073 borderBottom: '1px solid var(--ce-border-subtle)',
1074 display: 'flex',
1075 gap: '4px'
1076 }}>
1077 {['project', 'global'].map(root => <button key={root} onClick={() => switchRoot(root)} style={{
1078 flex: 1,
1079 padding: '6px 0',
1080 borderRadius: '6px',
1081 border: 'none',
1082 cursor: 'pointer',
1083 fontFamily: 'var(--ce-mono)',
1084 fontSize: '11.5px',
1085 background: activeRoot === root ? 'var(--ce-accent-bg)' : 'transparent',
1086 color: activeRoot === root ? 'var(--ce-accent)' : 'var(--ce-text-4)',
1087 fontWeight: activeRoot === root ? 600 : 430
1088 }}>
1089 {root === 'project' ? 'Project' : 'Global (~/)'}
1090 </button>)}
1091 <button onClick={toggleAllFolders} title={allExpanded ? 'Collapse all' : 'Expand all'} style={{
1092 ...iconBtn,
1093 fontSize: 11
1094 }}>
1095 {allExpanded ? '⊟' : '⊞'}
1096 </button>
1097 <button onClick={toggleFullscreen} title={isFullscreen ? 'Exit fullscreen' : 'Fullscreen'} style={{
1098 ...iconBtn,
1099 fontSize: 13
1100 }}>
1101 {isFullscreen ? '⤡' : '⛶'}
1102 </button>
1103 </div>
1104 <div role="tree" aria-label="Configuration files" tabIndex={0} onKeyDown={onTreeKeyDown} style={{
1105 padding: '6px 0',
1106 overflowY: 'auto',
1107 flex: 1,
1108 outline: 'none'
1109 }}>
1110 {tree.children.map(node => renderNode(node, 0))}
1111 </div>
1112 </div>
1113
1114 {}
1115 <div style={{
1116 flex: 1,
1117 minWidth: 0,
1118 padding: '20px 24px',
1119 minHeight: '400px',
1120 overflowY: 'auto'
1121 }}>
1122 <span aria-live="polite" style={{
1123 position: 'absolute',
1124 width: 1,
1125 height: 1,
1126 overflow: 'hidden',
1127 clip: 'rect(0 0 0 0)'
1128 }}>{selected.label} selected</span>
1129 {}
1130 <div style={{
1131 fontFamily: 'var(--ce-mono)',
1132 fontSize: '11px',
1133 color: 'var(--ce-text-4)',
1134 marginBottom: '10px',
1135 cursor: 'default'
1136 }}>
1137 {selected.path.map((seg, i) => <span key={i}>
1138 <span style={{
1139 color: i === selected.path.length - 1 ? 'var(--ce-accent)' : 'var(--ce-text-4)'
1140 }}>{seg.replace(/\/$/, '')}</span>
1141 {i < selected.path.length - 1 && <span style={{
1142 color: 'var(--ce-sep)'
1143 }}> / </span>}
1144 </span>)}
1145 </div>
1146
1147 {}
1148 <div style={{
1149 display: 'flex',
1150 alignItems: 'flex-start',
1151 gap: '10px',
1152 marginBottom: '10px'
1153 }}>
1154 <span style={{
1155 flexShrink: 0,
1156 display: 'flex'
1157 }}>{renderIcon(selected.icon, selected.color, 24)}</span>
1158 <div style={{
1159 flex: 1,
1160 minWidth: 0
1161 }}>
1162 <div style={{
1163 fontSize: '22px',
1164 fontWeight: 600,
1165 color: 'var(--ce-text)',
1166 letterSpacing: '-0.3px',
1167 lineHeight: '26px'
1168 }}>{selected.label}</div>
1169 {selected.oneLiner && <div style={{
1170 fontSize: '15px',
1171 color: 'var(--ce-text-3)',
1172 marginTop: '3px'
1173 }}>{selected.oneLiner}</div>}
1174 </div>
1175 <div style={{
1176 display: 'flex',
1177 gap: '4px',
1178 flexShrink: 0
1179 }}>
1180 {[selected.autogen && 'autogen', selected.badge].filter(Boolean).map(k => {
1181 const s = BADGE_STYLES[k];
1182 if (!s) return null;
1183 return <span key={k} style={{
1184 fontFamily: 'var(--ce-mono)',
1185 fontSize: '10px',
1186 fontWeight: 600,
1187 textTransform: 'uppercase',
1188 letterSpacing: '0.3px',
1189 padding: '2px 6px',
1190 borderRadius: '4px',
1191 background: s.bg,
1192 color: s.color,
1193 border: `0.5px solid ${s.border}`
1194 }}>{s.label}</span>;
1195 })}
1196 </div>
1197 </div>
1198
1199 {}
1200 {selected.note && <div style={{
1201 padding: '10px 12px',
1202 borderRadius: '8px',
1203 marginBottom: '14px',
1204 background: 'rgba(217,119,87,0.06)',
1205 border: '1px solid rgba(217,119,87,0.2)',
1206 borderLeft: '3px solid var(--ce-accent)',
1207 fontSize: '15px',
1208 color: 'var(--ce-text-2)',
1209 lineHeight: 1.6
1210 }}>
1211 {selected.note}
1212 </div>}
1213
1214 {}
1215 {selected.when && <div style={{
1216 padding: '8px 12px',
1217 borderRadius: '6px',
1218 background: 'rgba(106,155,204,0.06)',
1219 border: '0.5px solid rgba(106,155,204,0.12)',
1220 fontSize: '15px',
1221 color: 'var(--ce-when-text)',
1222 marginBottom: '16px'
1223 }}>
1224 <div style={{
1225 fontSize: '10px',
1226 fontWeight: 700,
1227 textTransform: 'uppercase',
1228 letterSpacing: '0.4px',
1229 opacity: 0.65,
1230 marginBottom: '3px'
1231 }}>When it loads</div>
1232 <div style={{
1233 fontWeight: 500
1234 }}>{selected.when}</div>
1235 </div>}
1236
1237 {}
1238 {selected.description && <div style={{
1239 fontSize: '16px',
1240 color: 'var(--ce-text-2)',
1241 lineHeight: 1.65,
1242 marginBottom: '16px'
1243 }}>
1244 {Array.isArray(selected.description) ? selected.description.map((para, i) => <div key={i} style={{
1245 marginBottom: i < selected.description.length - 1 ? '12px' : 0
1246 }}>{para}</div>) : selected.description}
1247 </div>}
1248
1249 {}
1250 {selected.contains && selected.contains.length > 0 && <div style={{
1251 marginBottom: '16px'
1252 }}>
1253 <div style={{
1254 fontSize: '11px',
1255 fontWeight: 700,
1256 color: 'var(--ce-text-4)',
1257 textTransform: 'uppercase',
1258 letterSpacing: '0.4px',
1259 marginBottom: '8px'
1260 }}>Common keys</div>
1261 {selected.contains.map((item, i) => <div key={i} style={{
1262 display: 'flex',
1263 gap: '7px',
1264 fontSize: '15px',
1265 color: 'var(--ce-text-2)',
1266 lineHeight: 1.5,
1267 marginBottom: '5px'
1268 }}>
1269 <span style={{
1270 fontSize: '7px',
1271 color: 'var(--ce-text-4)',
1272 marginTop: '6px'
1273 }}>●</span>
1274 <span>{item}</span>
1275 </div>)}
1276 </div>}
1277
1278 {}
1279 {selected.tips && selected.tips.length > 0 && <div style={{
1280 padding: '12px 14px',
1281 borderRadius: '8px',
1282 background: 'var(--ce-surface)',
1283 border: '1px solid var(--ce-border-subtle)',
1284 marginBottom: '16px'
1285 }}>
1286 <div style={{
1287 fontSize: '11px',
1288 fontWeight: 700,
1289 color: 'var(--ce-accent)',
1290 textTransform: 'uppercase',
1291 letterSpacing: '0.4px',
1292 marginBottom: '6px'
1293 }}>Tips</div>
1294 {selected.tips.map((tip, i) => <div key={i} style={{
1295 display: 'flex',
1296 gap: '7px',
1297 fontSize: '14.5px',
1298 color: 'var(--ce-text-2)',
1299 marginBottom: i < selected.tips.length - 1 ? '5px' : 0
1300 }}>
1301 <span style={{
1302 fontSize: '7px',
1303 color: 'var(--ce-accent)',
1304 marginTop: '6px'
1305 }}>●</span>
1306 <span>{tip}</span>
1307 </div>)}
1308 </div>}
1309
1310 {}
1311 {selected.example && <div style={{
1312 marginBottom: '16px'
1313 }}>
1314 {selected.exampleIntro && <div style={{
1315 fontSize: '15px',
1316 color: 'var(--ce-text-2)',
1317 lineHeight: 1.6,
1318 marginBottom: '10px'
1319 }}>
1320 {selected.exampleIntro}
1321 </div>}
1322 <div style={{
1323 display: 'flex',
1324 justifyContent: 'space-between',
1325 alignItems: 'center',
1326 padding: '6px 10px',
1327 background: 'var(--ce-code-header)',
1328 border: '1px solid var(--ce-border)',
1329 borderRadius: '8px 8px 0 0'
1330 }}>
1331 <span style={{
1332 fontFamily: 'var(--ce-mono)',
1333 fontSize: '11px',
1334 fontWeight: 600,
1335 color: 'var(--ce-text-3)'
1336 }}>{selected.label}</span>
1337 <button onClick={() => copyExample(selected.id, selected.example)} style={{
1338 padding: '3px 8px',
1339 borderRadius: '4px',
1340 fontSize: '11px',
1341 fontWeight: 600,
1342 cursor: 'pointer',
1343 transition: 'all 0.15s',
1344 background: isCopied ? 'rgba(85,138,66,0.08)' : 'var(--ce-code-header)',
1345 border: isCopied ? '0.5px solid rgba(85,138,66,0.2)' : '0.5px solid var(--ce-border)',
1346 color: isCopied ? '#558A42' : 'var(--ce-text-3)'
1347 }}>
1348 {isCopied ? '✓ Copied' : 'Copy'}
1349 </button>
1350 </div>
1351 <pre style={{
1352 margin: 0,
1353 padding: '12px 14px',
1354 background: 'var(--ce-code-bg)',
1355 color: '#E8E6DC',
1356 fontFamily: 'var(--ce-mono)',
1357 fontSize: '13px',
1358 lineHeight: 1.65,
1359 borderRadius: '0 0 8px 8px',
1360 overflowX: 'auto',
1361 whiteSpace: 'pre'
1362 }}>{selected.example}</pre>
1363 </div>}
1364
1365 {}
1366 {selected.docsLink && <a href={selected.docsLink} style={{
1367 display: 'inline-flex',
1368 padding: '5px 12px',
1369 borderRadius: '6px',
1370 background: 'var(--ce-accent-bg)',
1371 border: '1px solid var(--ce-accent-border)',
1372 color: 'var(--ce-accent)',
1373 fontSize: '12px',
1374 fontWeight: 600,
1375 textDecoration: 'none'
1376 }}>Full docs →</a>}
1377
1378 {}
1379 {selected.children && selected.children.length > 0 && <div style={{
1380 marginTop: '20px'
1381 }}>
1382 <div style={{
1383 fontSize: '11px',
1384 fontWeight: 700,
1385 color: 'var(--ce-text-4)',
1386 textTransform: 'uppercase',
1387 letterSpacing: '0.4px',
1388 marginBottom: '8px'
1389 }}>Contents</div>
1390 <div style={{
1391 display: 'flex',
1392 flexDirection: 'column',
1393 gap: '4px'
1394 }}>
1395 {selected.children.map(child => <button key={child.id} onClick={() => selectNode(child)} style={{
1396 display: 'flex',
1397 alignItems: 'center',
1398 gap: '8px',
1399 padding: '6px 8px',
1400 width: '100%',
1401 background: 'var(--ce-surface)',
1402 borderRadius: '6px',
1403 border: 'none',
1404 cursor: 'pointer',
1405 textAlign: 'left',
1406 transition: 'background 0.1s'
1407 }} onMouseEnter={e => e.currentTarget.style.background = 'var(--ce-surface-hover)'} onMouseLeave={e => e.currentTarget.style.background = 'var(--ce-surface)'}>
1408 {renderIcon(child.icon, child.color, 13)}
1409 <span style={{
1410 fontFamily: 'var(--ce-mono)',
1411 fontSize: '12px',
1412 color: 'var(--ce-text-2)'
1413 }}>{child.label}</span>
1414 {child.oneLiner && <span style={{
1415 fontSize: '11px',
1416 color: 'var(--ce-text-4)',
1417 overflow: 'hidden',
1418 textOverflow: 'ellipsis',
1419 whiteSpace: 'nowrap'
1420 }}>{child.oneLiner}</span>}
1421 </button>)}
1422 </div>
1423 </div>}
1424 </div>
1425 </div>
1426 </>;
1427};
1428
14295Claude 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.
14306
1431On Windows, `~/.claude` resolves to `%USERPROFILE%\.claude`. If you set [`CLAUDE_CONFIG_DIR`](/docs/en/env-vars), every `~/.claude` path on this page lives under that directory instead.
1432
1433Most users only edit `CLAUDE.md` and `settings.json`. If your repository already has an `AGENTS.md` for other coding agents, Claude Code [can read that](/docs/en/memory#agents-md) in place of a `CLAUDE.md`. The rest of the directory is optional: add skills, rules, or subagents as you need them.
7On Windows, `~/.claude` resolves to `%USERPROFILE%\.claude`. If you set [`CLAUDE_CONFIG_DIR`](https://code.claude.com/docs/en/env-vars), every `~/.claude` path on this page lives under that directory instead. The same applies to `.claude.json`, which otherwise sits at `~/.claude.json`.
8
9Most users only edit `CLAUDE.md` and `settings.json`. If your repository already has an `AGENTS.md` for other coding agents, Claude Code [can read that](https://code.claude.com/docs/en/memory.md#agents-md) in place of a `CLAUDE.md`. The rest of the directory is optional: add skills, rules, or subagents as you need them.
143410
143511## Explore the directory
143612
143713Click files in the tree to see what each one does, when it loads, and an example.
143814
1439<ClaudeExplorer />
15Configuration files
16
17**`CLAUDE.md`**
18
19**When it loads**: Loaded into context at session start
20
21Project-specific instructions that shape how Claude works in this repository. Put your conventions, common commands, and architectural context here.
22
23**`.mcp.json`**
24
25**When it loads**: In interactive sessions, MCP servers you've [approved](https://code.claude.com/docs/en/mcp.md#project-scope) load when the session begins. Tool schemas are deferred by default and load on demand via [tool search](https://code.claude.com/docs/en/mcp.md#scale-with-mcp-tool-search)
26
27Configures Model Context Protocol (MCP) servers that give Claude access to external tools: databases, APIs, browsers, and more. This file holds the project-scoped servers your whole team uses. Personal servers you want to keep to yourself go in `~/.claude.json`.
28
29**`.worktreeinclude`**
30
31**When it loads**: Read when Claude creates a [git worktree](https://code.claude.com/docs/en/worktrees.md) via `--worktree`, the `EnterWorktree` tool, or subagent `isolation: worktree`
32
33Lists gitignored files to copy from your main repository into each new worktree. Worktrees are fresh checkouts, so untracked files like `.env` are missing by default. Patterns here use `.gitignore` syntax. Only files that match a pattern and are also gitignored get copied.
34
35**`.claude/`**
36
37Project settings, rules, skills, subagents, and other configuration. If you use git, commit most of these files so your team shares them, and keep personal ones such as `settings.local.json` out of your commits.
38
39**`.claude/settings.json`**
40
41**When it loads**: Read at session start. Most edits [apply to the running session](https://code.claude.com/docs/en/settings.md#when-edits-take-effect)
42
43Settings that Claude Code applies directly. Permissions control which commands and tools Claude can use; hooks run your scripts at specific points in a session. Unlike CLAUDE.md, which Claude reads as guidance, these are enforced whether Claude follows them or not.
44
45This file ranks above `~/.claude/settings.json` and below `.claude/settings.local.json`, the `--settings` flag, and managed settings in [settings precedence](https://code.claude.com/docs/en/settings.md#settings-precedence). For most single-value keys, such as `model`, Claude Code uses the highest-ranked value. Most lists, such as `permissions.allow`, [merge across files](https://code.claude.com/docs/en/settings.md#lists-merge-instead-of-overriding).
46
47**`.claude/settings.local.json`**
48
49**When it loads**: Read at session start. Most edits [apply to the running session](https://code.claude.com/docs/en/settings.md#when-edits-take-effect)
50
51Your personal settings for this project. Same JSON format as `settings.json`, gitignored when Claude Code saves a setting to it.
52
53This file ranks above `.claude/settings.json` and below the `--settings` flag and managed settings in [settings precedence](https://code.claude.com/docs/en/settings.md#settings-precedence). For most single-value keys, such as `model`, Claude Code uses the highest-ranked value. Most lists, such as `permissions.allow`, [merge across files](https://code.claude.com/docs/en/settings.md#lists-merge-instead-of-overriding).
54
55**`.claude/rules/`**
56
57**When it loads**: Rules without `paths:` frontmatter load at session start. Rules with `paths:` load when Claude reads, writes, or edits a matching file
58
59Project instructions split into topic files. Like CLAUDE.md, rules are guidance that Claude Code doesn't enforce. For enforced behavior use [hooks](https://code.claude.com/docs/en/hooks.md) or [permissions](https://code.claude.com/docs/en/permissions.md).
60
61**`.claude/skills/`**
62
63**When it loads**: Invoked with `/skill-name` or when Claude matches the task to a skill
64
65Each skill is a folder with a `SKILL.md` file plus any supporting files it needs. By default, both you and Claude can invoke a skill. Use [frontmatter](https://code.claude.com/docs/en/skills.md#frontmatter-reference) to control that: `disable-model-invocation: true` so Claude can't invoke a skill like `/deploy` on its own, or `user-invocable: false` so only Claude can invoke the skill.
66
67**`.claude/commands/`**
68
69**When it loads**: Invoked with `/command-name` or when Claude matches the task to a command
70
71Holds single-file commands: a prompt saved as `.claude/commands/deploy.md` runs as `/deploy`. For a new command, use a [skill](#ce-skills), which can bundle reference docs, templates, or scripts alongside the prompt.
72
73**`.claude/output-styles/`**
74
75**When it loads**: Read at startup in the terminal, so restart Claude Code after you add or edit a style
76
77Each Markdown file defines an [output style](https://code.claude.com/docs/en/output-styles.md#how-output-styles-work), a set of instructions that adjusts how Claude works. Put a style here if your team shares it, like a review mode everyone uses. See [`~/.claude/output-styles/`](#ce-global-output-styles) for how to select one.
78
79**`.claude/agents/`**
80
81**When it loads**: Each subagent runs in its own context window when you or Claude invoke it
82
83Each Markdown file with `name` and `description` frontmatter defines a subagent with its own system prompt, tool access, and optionally its own model. Useful for parallel work or isolated tasks.
84
85**`.claude/workflows/`**
86
87**When it loads**: Loaded at startup when [workflows are on](https://code.claude.com/docs/en/workflows.md). Each saved workflow runs as a `/<name>` command
88
89Each `.js` file is a [dynamic workflow](https://code.claude.com/docs/en/workflows.md): a script the runtime executes to spawn and coordinate many subagents. To add one, have Claude write a workflow, then run `/workflows` in the session and save it here.
90
91**`.claude/agent-memory/`**
92
93**When it loads**: First 200 lines of a subagent's `MEMORY.md`, capped at 25KB, loaded into its system prompt when the subagent runs
94
95Subagents with [`memory: project`](https://code.claude.com/docs/en/sub-agents#enable-persistent-memory) in their frontmatter get a dedicated memory directory here while [auto memory](https://code.claude.com/docs/en/memory.md#auto-memory) is on. Each subagent reads and writes its own `MEMORY.md`, separate from your main session's auto memory in `~/.claude/projects/`.
96
97**`.claude/agent-memory/<agent-name>/MEMORY.md`**
98
99**When it loads**: First 200 lines, capped at 25KB, loaded into the subagent's system prompt when the subagent runs
100
101An index of the notes the subagent has saved. The subagent creates and updates this file itself, in the same format as your main [auto memory](https://code.claude.com/docs/en/memory.md#storage-location) index.
102
103**`~/.claude.json`**
104
105**When it loads**: Read at session start for your preferences and MCP servers. Claude Code writes back to it when you change a [global config option](https://code.claude.com/docs/en/settings-reference.md#global-config-settings) in `/config` or trust a project folder
106
107Holds account details, per-project trust decisions, your personal MCP servers, and UI toggles.
108
109**`~/.claude/`**
110
111The global counterpart to your project [`.claude/`](#ce-dot-claude) directory. Configuration files in this directory apply to you in every project on this machine.
112
113**`~/.claude/CLAUDE.md`**
114
115**When it loads**: Loaded at session start in every project on this machine
116
117Your global instruction file. Loaded alongside the project CLAUDE.md. If the two conflict, Claude may follow either one. Keep this file to preferences that apply everywhere: response style, commit format, personal conventions.
118
119**`~/.claude/settings.json`**
120
121**When it loads**: Read at session start. Most edits [apply to the running session](https://code.claude.com/docs/en/settings.md#when-edits-take-effect)
122
123Same format as project `settings.json`: permissions, hooks, model, and environment variables. Put settings here that you want in every project, like allow rules, a preferred model, or a notification hook.
124
125This file ranks below the project's settings files, the `--settings` flag, and managed settings in [settings precedence](https://code.claude.com/docs/en/settings.md#settings-precedence). For most single-value keys, such as `model`, Claude Code uses the highest-ranked value. Most lists, such as `permissions.allow`, [merge across files](https://code.claude.com/docs/en/settings.md#lists-merge-instead-of-overriding).
126
127**`~/.claude/keybindings.json`**
128
129**When it loads**: Read at session start and hot-reloaded when you edit the file
130
131Rebind keyboard shortcuts in the interactive CLI. Run `/keybindings` in a session to create or open this file. Check the [reserved shortcuts](https://code.claude.com/docs/en/keybindings.md#reserved-shortcuts) before you pick a key.
132
133**`~/.claude/themes/`**
134
135**When it loads**: Read at session start and [hot-reloaded](https://code.claude.com/docs/en/terminal-config.md#create-a-custom-theme) when files change. Listed in `/theme`
136
137Each `.json` file defines a custom color theme: a built-in `base` preset plus an `overrides` map of color tokens. Run `/theme` in a session to create one, or write the JSON yourself. Selecting a custom theme stores `custom:<slug>` as your theme preference.
138
139**`~/.claude/projects/`**
140
141**When it loads**: The current project's `memory/MEMORY.md` loads at session start while auto memory is on. The topic files it lists are read on demand
142
143Holds [auto memory](https://code.claude.com/docs/en/memory.md#auto-memory), the notes Claude saves across sessions: your role and preferences, corrections you give it, project decisions, and where to find information outside the project. Each project gets its own memory directory keyed by the repository path.
144
145**`~/.claude/projects/<project>/memory/MEMORY.md`**
146
147**When it loads**: First 200 lines, capped at 25KB, loaded at session start while [auto memory](https://code.claude.com/docs/en/memory.md#auto-memory) is on
148
149An index pointing to topic files for detail. Claude creates and updates this file as it works. You can edit or delete it.
150
151**`~/.claude/projects/<project>/memory/user_role.md`**
152
153**When it loads**: Claude reads this when a related task comes up
154
155An example of a topic file. Claude saves each memory in its own topic file, picks the filename, and lists it in `MEMORY.md`.
156
157**`~/.claude/rules/`**
158
159**When it loads**: Rules without `paths:` frontmatter load at session start. Rules with `paths:` load when Claude reads, writes, or edits a matching file
160
161Same format as project [`.claude/rules/`](#ce-rules), applied to every project on this machine. Use this for conventions you want across all your work, like personal code style or commit message format.
162
163**`~/.claude/skills/`**
164
165**When it loads**: Invoked with `/skill-name` or when Claude matches the task to a skill
166
167Skills you built for yourself, available in all your projects on this machine. Same format as project [`.claude/skills/`](#ce-skills).
168
169**`~/.claude/commands/`**
170
171**When it loads**: Invoked with `/command-name` or when Claude matches the task to a command
172
173Same format as project [`.claude/commands/`](#ce-commands), available in all your projects on this machine.
174
175**`~/.claude/output-styles/`**
176
177**When it loads**: Read at startup in the terminal, so restart Claude Code after you add or edit a style
178
179Each Markdown file defines an [output style](https://code.claude.com/docs/en/output-styles.md#how-output-styles-work), a set of instructions that adjusts how Claude works. Use a style to adapt Claude Code for uses beyond coding, or to add teaching or review modes.
180
181Select a built-in or custom style with `/output-style` or `/config` in a session, or with the `outputStyle` key in settings. Styles here are available in every project on this machine. If a project style has the same name, Claude Code uses the project's style.
182
183**`~/.claude/agents/`**
184
185**When it loads**: Each subagent runs in its own context window when you or Claude invoke it
186
187Subagents defined here are available across all your projects on this machine. Same format as project [`.claude/agents/`](#ce-agents).
188
189**`~/.claude/workflows/`**
190
191**When it loads**: Loaded at startup when [workflows are on](https://code.claude.com/docs/en/workflows.md). Each saved workflow runs as a `/<name>` command
192
193Workflow scripts saved here are available across all your projects on this machine. A project workflow with the same name in `.claude/workflows/` takes precedence.
194
195**`~/.claude/agent-memory/`**
196
197**When it loads**: First 200 lines of a subagent's `MEMORY.md`, capped at 25KB, loaded into its system prompt when the subagent runs
198
199Subagents with `memory: user` in their frontmatter store knowledge here while [auto memory](https://code.claude.com/docs/en/memory.md#auto-memory) is on. That knowledge persists across all projects. For project-scoped subagent memory, see [`.claude/agent-memory/`](#ce-agent-memory).
1440200
1441201## What's not shown
1442202
from line 204
1444204
1445205| File | Location | Purpose |
1446206| - | - | - |
1447| `managed-settings.json` | System-level, varies by OS | Enterprise-enforced settings that your own settings files and `--settings` values can't override, apart from [narrow exceptions](/docs/en/settings#exceptions-to-managed-settings-precedence). See [where to save the file](/docs/en/managed-settings#deploy-a-managed-settings-file) and [which managed source Claude Code uses](/docs/en/managed-settings#precedence-within-the-managed-tier). |
207| `managed-settings.json` | System-level, varies by OS | Enterprise-enforced settings that your own settings files and `--settings` values can't override, apart from [narrow exceptions](https://code.claude.com/docs/en/settings.md#exceptions-to-managed-settings-precedence). See [where to save the file](https://code.claude.com/docs/en/managed-settings.md#deploy-a-managed-settings-file) and [which managed source Claude Code uses](https://code.claude.com/docs/en/managed-settings.md#precedence-within-the-managed-tier). |
1448208| `CLAUDE.local.md` | Project root | Your private preferences for this project, loaded alongside CLAUDE.md. Create it manually and add it to `.gitignore`. |
1449| `AGENTS.md` | Project root, `.claude/`, or any directory | Project instructions you write for AI coding agents. Claude Code can [load it](/docs/en/memory#agents-md) in place of a `CLAUDE.md`. |
1450| Installed plugins | `~/.claude/plugins` | Cloned marketplaces, installed plugin versions, the `installed_plugins.json` install record, and per-plugin data, managed by `claude plugin` commands. Plugins [synced from your claude.ai account](/docs/en/plugins/loading#synced-plugins) download into `~/.claude/plugins/synced/`. For a plugin installed from a marketplace [`command` source](/docs/en/plugins/marketplace-reference#command-plugin-source) in link mode, Claude Code stores links here instead of a copy, and the plugin's files stay in the directory the command prints. A `command` source requires Claude Code v2.1.229 or later. A plugin listed by relative path in a marketplace you added from a local path also [loads in place](/docs/en/plugins/loading#find-plugins-on-disk) from its source directory rather than from a cache copy. See [plugin caching](/docs/en/plugins/loading#find-plugins-on-disk) for how orphaned versions are cleaned up. |
209| `AGENTS.md` | Project root, `.claude/`, or any directory | Project instructions you write for AI coding agents. Claude Code can [load it](https://code.claude.com/docs/en/memory.md#agents-md) in place of a `CLAUDE.md`. |
210| Installed plugins | `~/.claude/plugins` | Cloned marketplaces, installed plugin versions, the `installed_plugins.json` install record, and per-plugin data, managed by `claude plugin` commands. Plugins [synced from your claude.ai account](https://code.claude.com/docs/en/plugins/loading.md#synced-plugins) download into `~/.claude/plugins/synced/`. For a plugin installed from a marketplace [`command` source](https://code.claude.com/docs/en/plugins/marketplace-reference#command-plugin-source) in link mode, Claude Code stores links here instead of a copy, and the plugin's files stay in the directory the command prints. A `command` source requires Claude Code v2.1.229 or later. A plugin listed by relative path in a marketplace you added from a local path also [loads in place](https://code.claude.com/docs/en/plugins/loading.md#find-plugins-on-disk) from its source directory rather than from a cache copy. See [plugin caching](https://code.claude.com/docs/en/plugins/loading.md#find-plugins-on-disk) for how orphaned versions are cleaned up. |
1451211
1452212`~/.claude` also holds data Claude Code writes as you work: transcripts, prompt history, file snapshots, caches, and logs. See [application data](#application-data) below.
1453213
from line 217
1457217
1458218| You want to | Edit | Scope | Reference |
1459219| :- | :- | :- | :- |
1460| Give Claude project context and conventions | `CLAUDE.md` | project or global | [Memory](/docs/en/memory) |
1461| Allow or block specific tool calls | `settings.json` `permissions` or `hooks` | project or global | [Permissions](/docs/en/permissions), [Hooks](/docs/en/hooks) |
1462| Run a script before or after tool calls | `settings.json` `hooks` | project or global | [Hooks](/docs/en/hooks) |
1463| Set environment variables for the session | `settings.json` `env` | project or global | [Settings](/docs/en/settings-reference#all-settings) |
1464| Keep personal overrides out of git | `settings.local.json` | project only | [Settings scopes](/docs/en/settings#where-settings-live) |
1465| Add a prompt or capability you invoke with `/name` | `skills/<name>/SKILL.md` | project or global | [Skills](/docs/en/skills) |
1466| Define a specialized subagent with its own tools | `agents/*.md` | project or global | [Subagents](/docs/en/sub-agents) |
1467| Orchestrate many subagents from a script | `workflows/*.js` | project or global | [Dynamic workflows](/docs/en/workflows) |
1468| Connect external tools over MCP | `.mcp.json` | project only | [MCP](/docs/en/mcp) |
1469| Change how Claude formats responses | `output-styles/*.md` | project or global | [Output styles](/docs/en/output-styles) |
220| Give Claude project context and conventions | `CLAUDE.md` | project or global | [Memory](https://code.claude.com/docs/en/memory.md) |
221| Allow or block specific tool calls | `settings.json` `permissions` or `hooks` | project or global | [Permissions](https://code.claude.com/docs/en/permissions.md), [Hooks](https://code.claude.com/docs/en/hooks.md) |
222| Run a script before or after tool calls | `settings.json` `hooks` | project or global | [Hooks](https://code.claude.com/docs/en/hooks.md) |
223| Set environment variables for the session | `settings.json` `env` | project or global | [Settings](https://code.claude.com/docs/en/settings-reference.md#all-settings) |
224| Keep personal overrides out of git | `settings.local.json` | project only | [Settings scopes](https://code.claude.com/docs/en/settings.md#where-settings-live) |
225| Add a prompt or capability you invoke with `/name` | `skills/<name>/SKILL.md` | project or global | [Skills](https://code.claude.com/docs/en/skills.md) |
226| Define a specialized subagent with its own tools | `agents/*.md` | project or global | [Subagents](https://code.claude.com/docs/en/sub-agents.md) |
227| Orchestrate many subagents from a script | `workflows/*.js` | project or global | [Dynamic workflows](https://code.claude.com/docs/en/workflows.md) |
228| Connect external tools over MCP | `.mcp.json` | project only | [MCP](https://code.claude.com/docs/en/mcp.md) |
229| Change how Claude formats responses | `output-styles/*.md` | project or global | [Output styles](https://code.claude.com/docs/en/output-styles.md) |
1470230
1471231## File reference
1472232
1473233This 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.
1474234
1475<Note>
1476 Several things can override what you put in these files:
1477
1478 * [Managed settings](/docs/en/server-managed-settings) deployed by your organization take precedence over every settings file and `--settings` value, apart from the [exceptions under Settings precedence](/docs/en/settings#exceptions-to-managed-settings-precedence)
1479 * CLI flags like `--permission-mode` or `--settings` override `settings.json` for that session
1480 * Some environment variables take precedence over their equivalent setting, but this varies: check the [environment variables reference](/docs/en/env-vars) for each one
1481
1482 See [settings precedence](/docs/en/settings#settings-precedence) for the full order.
1483</Note>
235> [!NOTE]
236>
237> Several things can override what you put in these files:
238>
239> * [Managed settings](https://code.claude.com/docs/en/server-managed-settings.md) deployed by your organization take precedence over every settings file and `--settings` value, apart from the [exceptions under Settings precedence](https://code.claude.com/docs/en/settings.md#exceptions-to-managed-settings-precedence)
240> * CLI flags like `--permission-mode` or `--settings` override `settings.json` for that session
241> * Some environment variables take precedence over their equivalent setting, but this varies: check the [environment variables reference](https://code.claude.com/docs/en/env-vars.md) for each one
242>
243> See [settings precedence](https://code.claude.com/docs/en/settings.md#settings-precedence) for the full order.
1484244
1485245Click a filename to open that node in the explorer above.
1486246
1487247| File | Scope | Commit | What it does | Reference |
1488248| - | - | - | - | - |
1489| [`CLAUDE.md`](#ce-claude-md) | Project and global | ✓ | Instructions loaded every session | [Memory](/docs/en/memory) |
1490| [`rules/*.md`](#ce-rules) | Project and global | ✓ | Topic-scoped instructions, optionally path-gated | [Rules](/docs/en/memory#organize-rules-with-claude/rules/) |
1491| [`settings.json`](#ce-settings-json) | Project and global | ✓ | Permissions, hooks, env vars, model defaults | [Settings](/docs/en/settings) |
1492| [`settings.local.json`](#ce-settings-local-json) | Project only | | Your personal overrides, gitignored when Claude Code saves a setting to it | [Settings scopes](/docs/en/settings#where-settings-live) |
1493| [`.mcp.json`](#ce-mcp-json) | Project only | ✓ | Team-shared MCP servers | [MCP scopes](/docs/en/mcp#mcp-installation-scopes) |
1494| [`.worktreeinclude`](#ce-worktreeinclude) | Project only | ✓ | Gitignored files to copy into new worktrees | [Worktrees](/docs/en/worktrees#copy-gitignored-files-into-worktrees) |
1495| [`skills/<name>/SKILL.md`](#ce-skills) | Project and global | ✓ | Reusable prompts invoked with `/name` or auto-invoked | [Skills](/docs/en/skills) |
1496| [`commands/*.md`](#ce-commands) | Project and global | ✓ | Single-file prompts; same mechanism as skills | [Skills](/docs/en/skills) |
1497| [`output-styles/*.md`](#ce-output-styles) | Project and global | ✓ | Custom instruction sets that adjust how Claude works | [Output styles](/docs/en/output-styles) |
1498| [`agents/*.md`](#ce-agents) | Project and global | ✓ | Subagent definitions with their own prompt and tools | [Subagents](/docs/en/sub-agents) |
1499| [`workflows/*.js`](#ce-workflows) | Project and global | ✓ | Dynamic workflow scripts written by Claude and saved from `/workflows`; each file becomes a `/<name>` command | [Dynamic workflows](/docs/en/workflows) |
1500| [`agent-memory/<name>/`](#ce-agent-memory) | Project and global | ✓ | Persistent memory for subagents | [Persistent memory](/docs/en/sub-agents#enable-persistent-memory) |
1501| [`~/.claude.json`](#ce-claude-json) | Global only | | App state, OAuth, UI toggles, personal MCP servers | [Global config](/docs/en/settings-reference#global-config-settings) |
1502| [`projects/<project>/memory/`](#ce-global-projects) | Global only | | Auto memory: Claude's notes to itself across sessions | [Auto memory](/docs/en/memory#auto-memory) |
1503| [`keybindings.json`](#ce-keybindings) | Global only | | Custom keyboard shortcuts | [Keybindings](/docs/en/keybindings) |
1504| [`themes/*.json`](#ce-themes) | Global only | | Custom color themes | [Custom themes](/docs/en/terminal-config#create-a-custom-theme) |
249| [`CLAUDE.md`](#ce-claude-md) | Project and global | ✓ | Instructions loaded every session | [Memory](https://code.claude.com/docs/en/memory.md) |
250| [`rules/*.md`](#ce-rules) | Project and global | ✓ | Topic-scoped instructions, optionally path-gated | [Rules](https://code.claude.com/docs/en/memory.md#organize-rules-with-claude/rules/) |
251| [`settings.json`](#ce-settings-json) | Project and global | ✓ | Permissions, hooks, env vars, model defaults | [Settings](https://code.claude.com/docs/en/settings.md) |
252| [`settings.local.json`](#ce-settings-local-json) | Project only | | Your personal overrides, gitignored when Claude Code saves a setting to it | [Settings scopes](https://code.claude.com/docs/en/settings.md#where-settings-live) |
253| [`.mcp.json`](#ce-mcp-json) | Project only | ✓ | Team-shared MCP servers | [MCP scopes](https://code.claude.com/docs/en/mcp.md#mcp-installation-scopes) |
254| [`.worktreeinclude`](#ce-worktreeinclude) | Project only | ✓ | Gitignored files to copy into new worktrees | [Worktrees](https://code.claude.com/docs/en/worktrees.md#copy-gitignored-files-into-worktrees) |
255| [`skills/<name>/SKILL.md`](#ce-skills) | Project and global | ✓ | Reusable prompts invoked with `/name` or auto-invoked | [Skills](https://code.claude.com/docs/en/skills.md) |
256| [`commands/*.md`](#ce-commands) | Project and global | ✓ | Single-file prompts; same mechanism as skills | [Skills](https://code.claude.com/docs/en/skills.md) |
257| [`output-styles/*.md`](#ce-output-styles) | Project and global | ✓ | Custom instruction sets that adjust how Claude works | [Output styles](https://code.claude.com/docs/en/output-styles.md) |
258| [`agents/*.md`](#ce-agents) | Project and global | ✓ | Subagent definitions with their own prompt and tools | [Subagents](https://code.claude.com/docs/en/sub-agents.md) |
259| [`workflows/*.js`](#ce-workflows) | Project and global | ✓ | Dynamic workflow scripts written by Claude and saved from `/workflows`; each saved workflow runs as a `/<name>` command | [Dynamic workflows](https://code.claude.com/docs/en/workflows.md) |
260| [`agent-memory/<name>/`](#ce-agent-memory) | Project and global | ✓ | Persistent memory for subagents | [Persistent memory](https://code.claude.com/docs/en/sub-agents.md#enable-persistent-memory) |
261| [`~/.claude.json`](#ce-claude-json) | Global only | | App state, account details, UI toggles, personal MCP servers. If it's missing, Claude Code creates it when you start a session or run a subcommand such as `claude auth status`, but not for `--version` or `--help`. | [Global config](https://code.claude.com/docs/en/settings-reference.md#global-config-settings) |
262| [`projects/<project>/memory/`](#ce-global-projects) | Global only | | Auto memory: Claude's notes to itself across sessions | [Auto memory](https://code.claude.com/docs/en/memory.md#auto-memory) |
263| [`keybindings.json`](#ce-keybindings) | Global only | | Custom keyboard shortcuts | [Keybindings](https://code.claude.com/docs/en/keybindings.md) |
264| [`themes/*.json`](#ce-themes) | Global only | | Custom color themes | [Custom themes](https://code.claude.com/docs/en/terminal-config.md#create-a-custom-theme) |
1505265
1506266## Frontmatter fields by file
1507267
1508Skills, command files, subagents, output styles, and rules read their configuration from YAML [frontmatter](/docs/en/glossary#frontmatter) at the top of the file, and each accepts its own set of fields. This table lists the field names for each file and links to the reference that describes them.
268Skills, command files, subagents, output styles, and rules read their configuration from YAML [frontmatter](https://code.claude.com/docs/en/glossary.md#frontmatter) at the top of the file, and each accepts its own set of fields. This table lists the field names for each file and links to the reference that describes them.
1509269
1510270| File | Frontmatter fields | Reference |
1511271| - | - | - |
1512| `skills/<name>/SKILL.md` | `name`, `description`, `when_to_use`, `argument-hint`, `arguments`, `disable-model-invocation`, `user-invocable`, `allowed-tools`, `disallowed-tools`, `model`, `effort`, `context`, `agent`, `background`, `hooks`, `paths`, `shell`, `metadata`, `license`, `compatibility` | [Skill frontmatter](/docs/en/skills#frontmatter-reference) |
1513| `commands/*.md` | The skill fields except `name` and `paths` | [Skill frontmatter](/docs/en/skills#frontmatter-reference) |
1514| `agents/*.md` | `name`, `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `maxTurns`, `autoCompactWindow`, `skills`, `mcpServers`, `hooks`, `memory`, `background`, `effort`, `isolation`, `color`, `initialPrompt`, `omitClaudeMd`, `experimental` | [Subagent frontmatter](/docs/en/sub-agents#supported-frontmatter-fields) |
1515| `output-styles/*.md` | `name`, `description`, `keep-coding-instructions`, `force-for-plugin` | [Output style frontmatter](/docs/en/output-styles#frontmatter) |
1516| `rules/*.md` | `paths` | [Rule frontmatter](/docs/en/memory#rules-frontmatter-reference) |
1517
1518Agents shipped in a [plugin](/docs/en/plugins/components#agents) honor a subset of the subagent fields.
272| `skills/<name>/SKILL.md` | `name`, `description`, `when_to_use`, `argument-hint`, `arguments`, `disable-model-invocation`, `user-invocable`, `allowed-tools`, `disallowed-tools`, `model`, `effort`, `context`, `agent`, `background`, `hooks`, `paths`, `shell`, `metadata`, `license`, `compatibility` | [Skill frontmatter](https://code.claude.com/docs/en/skills.md#frontmatter-reference) |
273| `commands/*.md` | The skill fields except `name` and `paths` | [Skill frontmatter](https://code.claude.com/docs/en/skills.md#frontmatter-reference) |
274| `agents/*.md` | `name`, `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `maxTurns`, `autoCompactWindow`, `skills`, `mcpServers`, `hooks`, `memory`, `background`, `effort`, `isolation`, `color`, `initialPrompt`, `omitClaudeMd`, `experimental` | [Subagent frontmatter](https://code.claude.com/docs/en/sub-agents.md#supported-frontmatter-fields) |
275| `output-styles/*.md` | `name`, `description`, `keep-coding-instructions`, `force-for-plugin` | [Output style frontmatter](https://code.claude.com/docs/en/output-styles.md#frontmatter) |
276| `rules/*.md` | `paths` | [Rule frontmatter](https://code.claude.com/docs/en/memory.md#rules-frontmatter-reference) |
277
278Agents shipped in a [plugin](https://code.claude.com/docs/en/plugins/components.md#agents) honor a subset of the subagent fields.
1519279
1520280## Troubleshoot configuration
1521281
1522If a setting, hook, or file isn't taking effect, see [Debug your configuration](/docs/en/debug-your-config) for the inspection commands and a symptom-first lookup table.
282If a setting, hook, or file isn't taking effect, see [Debug your configuration](https://code.claude.com/docs/en/debug-your-config.md) for the inspection commands and a symptom-first lookup table.
1523283
1524284## Application data
1525285
1526286Beyond the config you author, `~/.claude` holds data Claude Code writes during sessions. These files are plaintext. Anything that passes through a tool is written to a transcript on disk: file contents, command output, pasted text.
1527287
288The transcript can also hold what Claude Code sends the model with your messages:
289
290* The system prompt
291* Tool definitions
292* Request parameters
293* The instruction files it loaded, such as CLAUDE.md
294
1528295### Cleaned up automatically
1529296
1530Claude Code deletes the files in the paths below once they're older than [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays), as long as it can safely determine the retention period. The default is 30 days and the minimum is 1; setting `0` fails with a validation error. The same age cutoff applies to automatic removal of [orphaned worktrees](/docs/en/worktrees#clean-up-subagent-and-background-session-worktrees).
297Claude Code deletes the files in the paths below once they're older than [`cleanupPeriodDays`](https://code.claude.com/docs/en/settings-reference#cleanupperioddays), as long as it can safely determine the retention period. The default is 30 days and the minimum is 1; setting `0` fails with a validation error. The same age cutoff applies to automatic removal of [orphaned worktrees](https://code.claude.com/docs/en/worktrees.md#clean-up-subagent-and-background-session-worktrees).
1531298
1532299| Path under `~/.claude/` | Contents |
1533300| - | - |
1534| `projects/<project>/<session>.jsonl` | Full conversation transcript: every message, tool call, and tool result |
301| `projects/<project>/<session>.jsonl` | Conversation transcript: messages, tool calls, and tool results, plus the system prompt, tool definitions, and parameters of the requests Claude Code sent the model |
1535302| `projects/<project>/<session>.orphaned-<timestamp>-<suffix>.jsonl`, `projects/<project>/<session>.jsonl.superseded-<timestamp>` | A previous transcript for the session that Claude Code set aside instead of overwriting or deleting it. It doesn't appear in the session picker |
1536| `projects/<project>/<session>/subagents/` | [Subagent](/docs/en/sub-agents) conversation transcripts, removed with the parent session transcript when it ages out |
1537| `projects/<project>/<session>/tool-results/` | Large tool outputs spilled to separate files, and full-size copies of [images that MCP tools return](/docs/en/mcp#images-in-tool-results) |
1538| `file-history/<session>/` | Pre-edit snapshots of files Claude changed, used for [checkpoint restore](/docs/en/checkpointing). Holds snapshots for the 100 most recent checkpoints; snapshot files that no retained checkpoint references are deleted, except each file's first snapshot |
1539| `plans/` | Plan files written during [plan mode](/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode) |
1540| `debug/` | Per-session debug logs, written while debug logging is on, such as when you start with [`--debug`](/docs/en/cli-reference#cli-flags) or run `/debug` |
303| `projects/<project>/<session>/subagents/` | [Subagent](https://code.claude.com/docs/en/sub-agents.md) transcripts in the same format as the session transcript, removed with the parent session transcript when it ages out |
304| `projects/<project>/<session>/tool-results/` | Large tool outputs spilled to separate files, and full-size copies of [images that MCP tools return](https://code.claude.com/docs/en/mcp.md#images-in-tool-results) |
305| `projects/<project>/<session>/mcp-tasks/` | What a resumed session needs to follow its running [MCP tasks](https://code.claude.com/docs/en/mcp.md#mcp-tasks-that-run-on-the-server) again, and the results of finished tasks that Claude hasn't read yet |
306| `file-history/<session>/` | Pre-edit snapshots of files Claude changed, used for [checkpoint restore](https://code.claude.com/docs/en/checkpointing.md). Holds snapshots for the 100 most recent checkpoints; snapshot files that no retained checkpoint references are deleted, except each file's first snapshot |
307| `plans/` | Plan files written during [plan mode](https://code.claude.com/docs/en/permission-modes.md#analyze-before-you-edit-with-plan-mode) |
308| `debug/` | Per-session debug logs, written while debug logging is on, such as when you start with [`--debug`](https://code.claude.com/docs/en/cli-reference#cli-flags) or run `/debug` |
1541309| `paste-cache/` | Contents of large pastes |
1542| `image-cache/<session>/` | Attached images saved by Claude Code v2.1.274 and earlier. Later versions save pasted and attached images outside `~/.claude`, in an `images/` directory for each session under the temp directory that [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars) controls. The sweep removes other sessions' leftover directories here, whatever their age. |
1543| `uploads/<session>/` | Files you attach from the web or mobile app, and photos you attach from the mobile app, when messaging a [Remote Control](/docs/en/remote-control) session. An attachment to a [cloud session](/docs/en/claude-code-on-the-web) is saved in that session's own cloud environment instead, not on your machine. |
1544| `dev-mods/<session>/` | [Mods that Claude wrote](/docs/en/plugins/mods/create#ask-claude-for-a-mod) during the session |
310| `image-cache/<session>/` | Attached images saved by Claude Code v2.1.274 and earlier. Later versions save pasted and attached images outside `~/.claude`, in an `images/` directory for each session under the temp directory that [`CLAUDE_CODE_TMPDIR`](https://code.claude.com/docs/en/env-vars) controls. The sweep removes other sessions' leftover directories here, whatever their age. |
311| `uploads/<session>/` | Files you attach from the web or mobile app, and photos you attach from the mobile app, when messaging a [Remote Control](https://code.claude.com/docs/en/remote-control.md) session. An attachment to a [cloud session](https://code.claude.com/docs/en/claude-code-on-the-web.md) is saved in that session's own cloud environment instead, not on your machine. |
312| `dev-mods/<session>/` | [Mods that Claude wrote](https://code.claude.com/docs/en/plugins/mods/create.md#ask-claude-for-a-mod) during the session |
1545313| `session-env/` | Per-session environment metadata |
1546314| `tasks/` | Task lists written by the task tools, one directory per list |
1547| `shell-snapshots/` | Aliases, functions, and shell options captured at startup and applied by the [Bash tool](/docs/en/tools-reference#bash-tool-behavior) to each command. Removed on clean exit. The sweep clears any left after a crash. |
1548| `backups/` | Earlier versions of `~/.claude.json`, copied when Claude Code rewrites the file. Claude Code keeps the five newest, plus a copy of any version it couldn't parse. |
315| `shell-snapshots/` | Aliases, functions, and shell options captured at startup and applied by the [Bash tool](https://code.claude.com/docs/en/tools-reference.md#bash-tool-behavior) to each command. Removed on clean exit. The sweep clears any left after a crash. |
316| `backups/` | Earlier versions of `~/.claude.json`, copied when Claude Code rewrites the file. Claude Code keeps the five newest copies, plus a copy of any version it couldn't parse. Past the age cutoff, the last copy that holds your configuration is deleted too. If the current file parses, holds your configuration, and is under 8 MiB, you're left with a new copy of it. |
1549317| `feedback-bundles/` | Redacted transcript archives written by `/feedback` on third-party providers or when no Anthropic credentials are configured, for sending to your Anthropic account team |
1550| `feedback/drafts/` | Queued [Claude-drafted feedback](/docs/en/tools-reference#sendfeedback-tool-behavior) awaiting your review in `/feedback`. Swept after `cleanupPeriodDays` or 30 days, whichever is shorter. When the queue is at its 10-draft limit, Claude Code deletes the oldest draft to make room. |
1551| `usage-data/` | `report.html` and timestamped report copies written by [`/insights`](/docs/en/costs#analyze-your-usage-patterns), plus cached per-session analysis data used to build them |
1552| `skills/.trash/`, `plugins/.trash/` | [Skills](/docs/en/skills#how-synced-skills-behave) and [plugins](/docs/en/plugins/loading#synced-plugins) that the claude.ai sync removed, such as after you turn one off on claude.ai or stop syncing. The files stay here so you can recover them until the sweep deletes them |
1553| `plugins/installed_plugins.set-aside.<date>.<hash>.json`, `plugins/installed_plugins.unreadable.<date>.<hash>.kept` | Dated copies Claude Code makes before rewriting [`installed_plugins.json`](/docs/en/plugins/loading#find-plugins-on-disk): install records it dropped, and the contents of a file it couldn't read. |
318| `feedback/drafts/` | Queued [Claude-drafted feedback](https://code.claude.com/docs/en/tools-reference.md#sendfeedback-tool-behavior) awaiting your review in `/feedback`. Swept after `cleanupPeriodDays` or 30 days, whichever is shorter. When the queue is at its 10-draft limit, Claude Code deletes the oldest draft to make room. |
319| `usage-data/` | `report.html` and timestamped report copies written by [`/insights`](https://code.claude.com/docs/en/costs#analyze-your-usage-patterns), plus cached per-session analysis data used to build them |
320| `skills/.trash/`, `plugins/.trash/` | [Skills](https://code.claude.com/docs/en/skills.md#how-synced-skills-behave) and [plugins](https://code.claude.com/docs/en/plugins/loading.md#synced-plugins) that the claude.ai sync removed, such as after you turn one off on claude.ai or stop syncing. The files stay here so you can recover them until the sweep deletes them |
321| `plugins/installed_plugins.set-aside.<date>.<hash>.json`, `plugins/installed_plugins.unreadable.<date>.<hash>.kept` | Dated copies Claude Code makes before rewriting [`installed_plugins.json`](https://code.claude.com/docs/en/plugins/loading#find-plugins-on-disk): install records it dropped, and the contents of a file it couldn't read. |
322| `plugins/mcpb/` | The files Claude Code extracted from the [MCP bundles](https://code.claude.com/docs/en/plugins/components.md#include-a-packaged-mcpb-server) that plugins declare. A bundle's age counts from the last session that used it. |
1554323| `todos/`, `statsig/`, `logs/` | Legacy directories from older versions. No longer written. The sweep removes their contents and then the empty directory. |
1555324
1556325Session files in `sessions/`, auto memory, and Claude Desktop and Cowork transcripts each follow their own retention rule:
1557326
1558327* **`sessions/`**: holds one small file per running session, used to detect concurrent sessions and crashes. It isn't part of the age-based sweep: Claude Code removes each file when its session exits and clears crash leftovers on the next launch.
1559* **Auto memory**: the sweep doesn't delete the memory files in a project's [auto memory](/docs/en/memory#auto-memory) directory, `projects/<project>/memory/`. Claude Code removes that directory only if it has been empty for the whole retention period. Before v2.1.228, the sweep treated folders inside the memory directory as session data and could delete old files beneath it.
1560* **Claude Desktop and Cowork transcripts**: Claude Code keeps the transcript of a session you started or most recently continued in Claude Desktop or Cowork at any age. To give these transcripts an age limit, set [`desktopSessionCleanupPeriodDays`](/docs/en/settings-reference#desktopsessioncleanupperioddays). Requires Claude Code v2.1.248 or later; earlier versions delete them after `cleanupPeriodDays`.
1561
1562 Claude Code deletes these transcripts after `cleanupPeriodDays` instead in either of these cases:
1563
1564 * [Managed settings](/docs/en/managed-settings) set `cleanupPeriodDays`
1565 * The [HIPAA configuration applies to your sessions](/docs/en/hipaa-setup#check-how-developers-sign-in-and-connect)
328* **`seed-admin/`**: scratch git directories Claude Code makes while packaging your repository for an [ultrareview](https://code.claude.com/docs/en/ultrareview.md) or a [cloud session upload](https://code.claude.com/docs/en/claude-code-on-the-web.md#send-local-repositories-without-github). When an upload ends, or in a later session if it was interrupted, Claude Code removes that upload's directory and leaves `seed-admin/` in place.
329* **Auto memory**: the sweep doesn't delete the memory files in a project's [auto memory](https://code.claude.com/docs/en/memory.md#auto-memory) directory, `projects/<project>/memory/`. Claude Code removes that directory only if it has been empty for the whole retention period. Before v2.1.228, the sweep treated folders inside the memory directory as session data and could delete old files beneath it.
330* **Claude Desktop and Cowork transcripts**: Claude Code keeps the transcript of a session you started or most recently continued in Claude Desktop or Cowork at any age. To give these transcripts an age limit, set [`desktopSessionCleanupPeriodDays`](https://code.claude.com/docs/en/settings-reference#desktopsessioncleanupperioddays). Requires Claude Code v2.1.248 or later; earlier versions delete them after `cleanupPeriodDays`.
331
332 Claude Code deletes these transcripts after `cleanupPeriodDays` instead in cases such as these:
333
334 * [Managed settings](https://code.claude.com/docs/en/managed-settings.md) set `cleanupPeriodDays`
335 * The [HIPAA configuration applies to your sessions](https://code.claude.com/docs/en/hipaa-setup.md#check-how-developers-sign-in-and-connect)
1566336
1567337Claude Code skips the age-based sweep in these cases:
1568338
1569* **Bare mode**: when you run `claude -p` with [`--bare`](/docs/en/headless#start-faster-with-bare-mode), Claude Code doesn't run the sweep in that session.
1570* **Paused sweep**: if Claude Code can't safely determine the retention period, it pauses the retention cleanup sweep; the [`retention_sweep` event](/docs/en/monitoring-usage#retention-sweep-event) lists each configuration that pauses it. When the cause is a settings file that can't be read or parsed, or settings errors with `cleanupPeriodDays` or `desktopSessionCleanupPeriodDays` explicitly set, Claude Code also shows a warning in `/status` until you fix the settings errors. When [managed settings](/docs/en/server-managed-settings) provide `cleanupPeriodDays`, Claude Code runs the sweep at the managed value in either case.
1571
1572To check that the machines in your organization run the sweep with the retention period you set, see [Check the retention sweep](/docs/en/monitoring-usage#check-the-retention-sweep).
339* **Bare mode**: when you run `claude -p` with [`--bare`](https://code.claude.com/docs/en/headless#start-faster-with-bare-mode), Claude Code doesn't run the sweep in that session.
340* **Paused sweep**: if Claude Code can't safely determine the retention period, it pauses the sweep; the [`retention_sweep` event](https://code.claude.com/docs/en/monitoring-usage#retention-sweep-event) lists each configuration that pauses it. When the cause is a settings file that can't be read or parsed, or settings errors with `cleanupPeriodDays` or `desktopSessionCleanupPeriodDays` set, `/status` shows a warning until you fix the cause.
341
342When [managed settings](https://code.claude.com/docs/en/managed-settings.md) provide `cleanupPeriodDays`, Claude Code runs the sweep at the managed value even when a lower-priority settings file has errors.
343
344To check that the machines in your organization run the sweep with the retention period you set, see [Check the retention sweep](https://code.claude.com/docs/en/monitoring-usage.md#check-the-retention-sweep).
1573345
1574346### Session scratchpad directory
1575347
from line 353
1581353* **Linux**: `/tmp/claude-<uid>/<project>/<session-id>/scratchpad/`, or the same shape under `$TMPDIR` when your system sets one
1582354* **Windows**: `%TEMP%\claude\<project>\<session-id>\scratchpad\`
1583355
1584`<project>` is your working directory path with every character other than letters and digits replaced by `-`, such as `-Users-you-my-project`. If you set [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars), the tree moves under that directory instead. Hooks receive the current session's path as [`scratchpad_dir`](/docs/en/hooks#common-input-fields).
356`<project>` is your working directory path with every character other than letters and digits replaced by `-`, such as `-Users-you-my-project`. On Windows, `<project>` is a 16-character hash of that string, such as `73295dabccd14c56`. In a Desktop app session, it can be the string itself. To get the exact path, ask Claude. If you set [`CLAUDE_CODE_TMPDIR`](https://code.claude.com/docs/en/env-vars), the tree moves under that directory instead. Hooks receive the current session's path as [`scratchpad_dir`](https://code.claude.com/docs/en/hooks#common-input-fields).
1585357
1586358Scratchpad files last as long as the session's transcript: the [retention sweep](#cleaned-up-automatically) deletes the directory when it deletes the transcript, and [`claude purge`](#clear-local-data) doesn't touch the temp directory. Because the directory sits under the system temp location, your operating system can also clear it, such as on restart. To keep something Claude wrote there, ask Claude to move it into your project.
1587359
from line 361
1589361
1590362* You're signed in with a claude.ai account rather than an API key
1591363* The session uses the Anthropic API, not Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry
1592* [`enableArtifact`](/docs/en/settings-reference#enableartifact) isn't set to `false`
364* [`enableArtifact`](https://code.claude.com/docs/en/settings-reference#enableartifact) isn't set to `false`
1593365
1594366### Kept until you delete them
1595367
from line 369
1597369
1598370| Path under `~/.claude/` | Contents |
1599371| - | - |
1600| `history.jsonl` | Every prompt you've typed, with timestamp and project path. Used for up-arrow recall, `Ctrl+R` history search, and `!` shell-command completion. Each sweep removes the entries older than `cleanupPeriodDays` when the [HIPAA configuration applies to your sessions](/docs/en/hipaa-setup#check-how-developers-sign-in-and-connect). |
372| `history.jsonl` | Prompts you've typed, with timestamp and project path. Used for up-arrow recall, `Ctrl+R` history search, and `!` shell-command completion. Each sweep removes the entries older than `cleanupPeriodDays` when the [HIPAA configuration applies to your sessions](https://code.claude.com/docs/en/hipaa-setup.md#check-how-developers-sign-in-and-connect). |
1601373| `stats-cache.json` | Aggregated token and cost counts shown by `/usage` |
1602| `remote-settings.json` | Cached copy of [server-managed settings](/docs/en/server-managed-settings) for your organization, or `{}` when your organization has configured none. Only present when the session [fetches them](/docs/en/server-managed-settings#platform-availability). Claude Code checks for updates at startup and hourly during a session. Claude Code deletes it when you log out. |
374| `remote-settings.json` | Cached copy of [server-managed settings](https://code.claude.com/docs/en/server-managed-settings.md) for your organization, or `{}` when your organization has configured none. Only present when the session [fetches them](https://code.claude.com/docs/en/server-managed-settings.md#platform-availability). Claude Code checks for updates at startup and hourly during a session. Claude Code deletes it when you log out. |
1603375| `cache/changelog.md` | Cached copy of the Claude Code changelog, shown by `/release-notes`. Refreshed in the background. |
1604376| `policy-limits.json` | Cached feature policy settings for your organization. Only present for some account types. Refreshed automatically. A `policy-limits.json.stamp.json` sidecar records which account or API key the cache belongs to. Claude Code deletes both files when you log out. |
1605377
1606<h4 id="state-files-to-keep">
1607 State files to keep
1608</h4>
378#### State files to keep
1609379
1610380Depending on which features you use, `~/.claude/` also holds files that the tables under [Application data](#application-data) don't list. Of those, caches and lock files are safe to delete. Keep these state files:
1611381
1612* `.credentials.json`: your [login credentials](/docs/en/authentication#credential-management)
1613* `agent-memory/`: [subagent memory](/docs/en/sub-agents#enable-persistent-memory)
1614* `jobs/` and `daemon/`: [background session](/docs/en/agent-view#where-state-is-stored) state
382* `.credentials.json`: your [login credentials](https://code.claude.com/docs/en/authentication.md#credential-management)
383* `agent-memory/`: [subagent memory](https://code.claude.com/docs/en/sub-agents.md#enable-persistent-memory)
384* `jobs/` and `daemon/`: [background session](https://code.claude.com/docs/en/agent-view.md#where-state-is-stored) state
1615385
1616386### Plaintext storage
1617387
1618388Transcripts 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:
1619389
1620390* Lower `cleanupPeriodDays` to shorten how long Claude Code keeps transcripts
1621* Set [`desktopSessionCleanupPeriodDays`](/docs/en/settings-reference#desktopsessioncleanupperioddays) to give Claude Desktop and Cowork transcripts an age limit too
1622* Set the [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](/docs/en/env-vars) 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 TypeScript Agent SDK; the Python SDK has no equivalent option.
1623* Use [permission rules](/docs/en/permissions) to deny reads of credential files
391* Set [`desktopSessionCleanupPeriodDays`](https://code.claude.com/docs/en/settings-reference#desktopsessioncleanupperioddays) to give Claude Desktop and Cowork transcripts an age limit too
392* Set the [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](https://code.claude.com/docs/en/env-vars) 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 TypeScript Agent SDK; the Python SDK has no equivalent option.
393* Use [permission rules](https://code.claude.com/docs/en/permissions.md) to deny reads of credential files
1624394
1625395### Clear local data
1626396
from line 453
1683453* Pass `--all` instead of a path to purge state for every project at once, which deletes `history.jsonl` outright rather than filtering it.
1684454* Pass `-i` to step through the deletion plan one item at a time.
1685455
1686The command leaves `shell-snapshots/` and `backups/` alone because those are not project-scoped, and warns about them in the plan output. If anyone ran [`/heapdump`](/docs/en/troubleshooting#high-cpu-or-memory-usage) on the machine, delete the `.heapsnapshot` files it wrote too. A heap snapshot contains the full conversation and any credentials the process held, and neither the retention sweep nor the purge touches it.
456The command leaves `shell-snapshots/` and `backups/` alone because those are not project-scoped, and warns about them in the plan output. If anyone ran [`/heapdump`](https://code.claude.com/docs/en/troubleshooting#high-cpu-or-memory-usage) on the machine, delete the `.heapsnapshot` files it wrote too. A heap snapshot contains the full conversation and any credentials the process held, and neither the retention sweep nor the purge touches it.
1687457
1688458You can also delete any of the application-data paths above yourself, apart from the [state files to keep](#state-files-to-keep).
1689459
from line 461
1691461| - | - |
1692462| `~/.claude/projects/` | Resume, continue, and rewind for past sessions, and auto memory for every project |
1693463| `~/.claude/history.jsonl` | Up-arrow prompt recall, `Ctrl+R` history search, and `!` shell-command completion |
1694| `~/.claude/paste-cache/` | Pasted text in recalled prompts; see [paste large content](/docs/en/terminal-config#paste-large-content) |
1695| `~/.claude/uploads/` | Attachments that past [Remote Control](/docs/en/remote-control) sessions refer to by path |
464| `~/.claude/paste-cache/` | Pasted text in recalled prompts; see [paste large content](https://code.claude.com/docs/en/terminal-config.md#paste-large-content) |
465| `~/.claude/uploads/` | Attachments that past [Remote Control](https://code.claude.com/docs/en/remote-control.md) sessions refer to by path |
1696466| `~/.claude/file-history/` | Checkpoint restore for past sessions |
1697467| `~/.claude/stats-cache.json` | Historical totals shown by `/usage` |
1698| `~/.claude/usage-data/` | Past [`/insights`](/docs/en/costs#analyze-your-usage-patterns) reports and the cached analysis data used to build them |
468| `~/.claude/usage-data/` | Past [`/insights`](https://code.claude.com/docs/en/costs#analyze-your-usage-patterns) reports and the cached analysis data used to build them |
1699469| `~/.claude/feedback-bundles/` | Feedback and bug-report archives you haven't yet sent to your Anthropic account team |
1700| `~/.claude/feedback/drafts/` | [Claude-drafted feedback](/docs/en/tools-reference#sendfeedback-tool-behavior) you haven't sent |
470| `~/.claude/feedback/drafts/` | [Claude-drafted feedback](https://code.claude.com/docs/en/tools-reference.md#sendfeedback-tool-behavior) you haven't sent |
1701471| `~/.claude/remote-settings.json` | Nothing. Re-fetched on next launch. |
1702472| `~/.claude/cache/changelog.md` | Nothing. Refreshed in the background. |
1703473| `~/.claude/policy-limits.json` | Nothing. Refreshed automatically. |
1704| `~/.claude/tasks/` | Your [task lists](/docs/en/interactive-mode#task-list), including any still in use |
1705| `~/.claude/skills/.trash/`, `~/.claude/plugins/.trash/` | The chance to recover [synced skills](/docs/en/skills#how-synced-skills-behave) and [synced plugins](/docs/en/plugins/loading#synced-plugins) that Claude Code removed |
474| `~/.claude/tasks/` | Your [task lists](https://code.claude.com/docs/en/interactive-mode.md#task-list), including any still in use |
475| `~/.claude/skills/.trash/`, `~/.claude/plugins/.trash/` | The chance to recover [synced skills](https://code.claude.com/docs/en/skills.md#how-synced-skills-behave) and [synced plugins](https://code.claude.com/docs/en/plugins/loading.md#synced-plugins) that Claude Code removed |
1706476| `~/.claude/plugins/installed_plugins.set-aside.<date>.<hash>.json`, `~/.claude/plugins/installed_plugins.unreadable.<date>.<hash>.kept` | The copies of plugin install records that Claude Code dropped or couldn't read. Nothing reads them back |
1707| `~/.claude/debug/`, `~/.claude/plans/`, `~/.claude/session-env/`, `~/.claude/shell-snapshots/`, `~/.claude/backups/` | Nothing user-facing |
477| `~/.claude/debug/`, `~/.claude/plans/`, `~/.claude/session-env/`, `~/.claude/shell-snapshots/` | Nothing user-facing |
478| `~/.claude/backups/` | The earlier copies you can [restore `~/.claude.json` from](https://code.claude.com/docs/en/errors#configuration-error-in-claude-json) |
1708479| `~/.claude/todos/`, `~/.claude/statsig/`, `~/.claude/logs/`, `~/.claude/image-cache/` | Nothing. Legacy directories not written by current versions. |
1709480
1710Don't delete `~/.claude.json`, `~/.claude/settings.json`, or `~/.claude/plugins/`: those hold your auth, preferences, and installed plugins.
481Don't delete `~/.claude.json`, `~/.claude/settings.json`, or `~/.claude/plugins/`: those hold your account details, preferences, and installed plugins.
1711482
1712483## Related resources
1713484
1714* [Manage Claude's memory](/docs/en/memory): write and organize CLAUDE.md, rules, and auto memory
1715* [Configure settings](/docs/en/settings): set permissions, hooks, environment variables, and model defaults
1716* [Create skills](/docs/en/skills): build reusable prompts and workflows
1717* [Configure subagents](/docs/en/sub-agents): define specialized agents with their own context
485* [Manage Claude's memory](https://code.claude.com/docs/en/memory.md): write and organize CLAUDE.md, rules, and auto memory
486* [Configure settings](https://code.claude.com/docs/en/settings.md): set permissions, hooks, environment variables, and model defaults
487* [Create skills](https://code.claude.com/docs/en/skills.md): build reusable prompts and workflows
488* [Configure subagents](https://code.claude.com/docs/en/sub-agents.md): define specialized agents with their own context
1718489