Где Claude Code читает CLAUDE.md, settings.json, hooks, skills, commands, subagents, workflows, rules и auto memory. Изучите директорию .claude в вашем проекте и ~/.claude в вашей домашней директории.
export const ClaudeExplorer = () => {
const A = useMemo(() => ({href, children}) => <a href={href} style={{
color: 'var(--ce-accent)',
textDecoration: 'none',
borderBottom: '1px dotted var(--ce-accent)'
}}>{children}, []);
const C = useMemo(() => ({children}) => <code style={{
fontFamily: 'var(--ce-mono)',
fontSize: '0.92em',
padding: '1px 4px',
borderRadius: '3px',
background: 'var(--ce-surface)',
border: '0.5px solid var(--ce-border-subtle)'
}}>{children}, []);
const commandsNote = useMemo(() => <>Commands and skills are now the same mechanism. For new workflows, use skills/ instead: same /name invocation, plus you can bundle supporting files.</>, []);
const FILE_TREE = useMemo(() => ({
project: {
label: 'your-project/',
children: [{
id: 'claude-md',
label: 'CLAUDE.md',
type: 'file',
icon: 'md',
color: '#6A9BCC',
badge: 'committed',
oneLiner: 'Project instructions Claude reads every session',
when: 'Loaded into context at the start of every session',
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.',
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 skill or a path-scoped rule 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 /memory to open and edit CLAUDE.md from within a session</>, <>Also works at .claude/CLAUDE.md if you prefer to keep the project root clean</>, <>If your repo already has an AGENTS.md for other coding agents, Claude Code can read that in place of a CLAUDE.md</>],
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.',
example: `# Project conventions
Commands
Build: `npm run build`
Test: `npm test`
Lint: `npm run lint`
Stack
TypeScript with strict mode
React 19, functional components only
Rules
Named exports, never default exports
Tests live next to source: `foo.ts` -> `foo.test.ts`
All API routes return `{ data, error }` shape, docsLink: '/en/memory' }, { id: 'mcp-json', label: '.mcp.json', type: 'file', icon: 'json', color: '#9B7BC4', badge: 'committed', oneLiner: 'Project-scoped MCP servers, shared with your team', 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></>, 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.</>, 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></>], 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.</>, example: {
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-y", "@notionhq/notion-mcp-server"],
"env": {
"NOTION_TOKEN": "${NOTION_TOKEN}"
}
}
}
}, docsLink: '/en/mcp' }, { id: 'worktreeinclude', label: '.worktreeinclude', type: 'file', icon: 'md', color: '#8FA876', badge: 'committed', oneLiner: 'Gitignored files to copy into new worktrees', when: <>Read when Claude creates a git worktree via <C>--worktree</C>, the <C>EnterWorktree</C> tool, or subagent <C>isolation: worktree</C></>, 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.</>, 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></>], 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.', example: # Local environment
.env
.env.local
API credentials
config/secrets.json, docsLink: '/en/worktrees#copy-gitignored-files-into-worktrees' }, { id: 'dot-claude', label: '.claude/', type: 'folder', icon: 'folder', color: 'var(--ce-accent)', oneLiner: 'Project-level configuration, rules, and extensions', 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.', children: [{ id: 'settings-json', label: 'settings.json', type: 'file', icon: 'json', color: 'var(--ce-text-3)', badge: 'committed', oneLiner: 'Permissions, hooks, and configuration', when: <>Overrides global <C>~/.claude/settings.json</C>. Local settings, CLI flags, and managed settings override this</>, 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.', 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/</>], 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</>], 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.</>, example: {
"permissions": {
"allow": [
"Bash(npm test *)",
"Bash(npm run *)"
],
"deny": [
"Bash(rm -rf *)"
]
},
"hooks": {
"PostToolUse": [{
"matcher": "Edit|Write",
"hooks": [{
"type": "command",
"command": "jq -r '.tool_input.file_path' | xargs npx prettier --write"
}]
}]
}
}, docsLink: '/en/settings' }, { id: 'settings-local-json', label: 'settings.local.json', type: 'file', icon: 'json', color: 'var(--ce-text-3)', badge: 'gitignored', oneLiner: 'Your personal settings overrides for this project', when: 'Highest of the user-editable settings files; CLI flags and managed settings still take precedence', 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.', 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></>], exampleIntro: 'This example adds Docker permissions on top of whatever the team settings.json allows.', example: {
"permissions": {
"allow": [
"Bash(docker *)"
]
}
}, docsLink: '/en/settings' }, { id: 'rules', label: 'rules/', type: 'folder', icon: 'folder', color: '#9B7BC4', oneLiner: 'Topic-scoped instructions, optionally gated by file paths', 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</>, 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>.</>], 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'], docsLink: '/en/memory#organize-rules-with-claude/rules/', children: [{ id: 'rule-testing', label: 'testing.md', type: 'file', icon: 'md', color: '#9B7BC4', badge: 'committed', oneLiner: 'Test conventions scoped to test files', when: <>Loaded when Claude reads, writes, or edits a file matching the <C>paths:</C> globs below</>, 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.</>, example: ---
paths:
"**/*.test.ts"
"**/*.test.tsx"
Testing Rules
Use descriptive test names: "should [expected] when [condition]"
Mock external dependencies, not internal modules
Clean up side effects in afterEach}, { id: 'rule-api', label: 'api-design.md', type: 'file', icon: 'md', color: '#9B7BC4', badge: 'committed', oneLiner: 'API conventions scoped to backend code', when: <>Loaded when Claude reads, writes, or edits a file matching the <C>paths:</C> glob below</>, 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.</>, example:---
paths:
"src/api/**/*.ts"
API Design Rules
All endpoints must validate input with Zod schemas
Return shape: { data: T } | { error: string }
Rate limit all public endpoints }] }, { id: 'skills', label: 'skills/', type: 'folder', icon: 'folder', color: '#D4A843', oneLiner: 'Reusable prompts you or Claude invoke by name', when: <>Invoked with <C>/skill-name</C> or when Claude matches the task to a skill</>, 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.</>, 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'], docsLink: '/en/skills', children: [{ id: 'skill-review', label: 'security-review/', type: 'folder', icon: 'folder', color: '#D4A843', oneLiner: 'A skill bundling SKILL.md with supporting files', children: [{ id: 'skill-review-md', label: 'SKILL.md', type: 'file', icon: 'md', color: '#D4A843', badge: 'committed', oneLiner: 'Entrypoint: trigger, invocability, instructions', when: <>User types <C>/security-review <target></C>; Claude cannot auto-invoke this skill</>, 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.</>], example: ---
description: Reviews code changes for security vulnerabilities, authentication gaps, and injection risks
disable-model-invocation: true
argument-hint:
Diff to review
!`git diff $ARGUMENTS`
Audit the changes above for:
Injection vulnerabilities (SQL, XSS, command)
Authentication and authorization gaps
Hardcoded secrets or credentials
Use checklist.md in this skill directory for the full review checklist.
Report findings with severity ratings and remediation steps.}, { id: 'skill-checklist', label: 'checklist.md', type: 'file', icon: 'md', color: '#D4A843', badge: 'committed', oneLiner: 'Supporting file bundled with the skill', when: 'Claude reads it on demand while running the skill', 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.</>, example:# Security Review Checklist
Input Validation
All user input sanitized before DB queries
File upload MIME types validated
Path traversal prevented on file operations
Authentication
JWT tokens expire after 24 hours
API keys stored in environment variables
Passwords hashed with bcrypt or argon2 }] }] }, { id: 'commands', label: 'commands/', type: 'folder', icon: 'folder', color: '#788C5D', oneLiner: <>Single-file prompts invoked with <C>/name</C></>, note: commandsNote, when: <>User types <C>/command-name</C></>, 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.</>, 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; commands remain supported'], docsLink: '/en/skills', children: [{ id: 'cmd-example', label: 'fix-issue.md', type: 'file', icon: 'md', color: '#788C5D', badge: 'committed', oneLiner: <>Invoked as <C>/fix-issue <number></C></>, note: commandsNote, 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.</>], example: ---
argument-hint:
!`gh issue view $ARGUMENTS`
Investigate and fix the issue above.
Trace the bug to its root cause
Implement the fix
Write or update tests
Summarize what you changed and why}] }, { id: 'output-styles', label: 'output-styles/', type: 'folder', icon: 'folder', color: '#5AA7A7', oneLiner: 'Project-scoped output styles, if your team shares any', when: 'Files read at startup; the style you select with outputStyle applies to every response', 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.</>, docsLink: '/en/output-styles', children: [] }, { id: 'agents', label: 'agents/', type: 'folder', icon: 'folder', color: '#C46686', oneLiner: 'Specialized subagents with their own context window', when: 'Runs in its own context window when you or Claude invoke it', 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.', 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'], docsLink: '/en/sub-agents', children: [{ id: 'agent-reviewer', label: 'code-reviewer.md', type: 'file', icon: 'md', color: '#C46686', badge: 'committed', oneLiner: 'Subagent for isolated code review', when: 'Claude spawns it for review tasks, or you @-mention it from the autocomplete', 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.</>, example:---
name: code-reviewer
description: Reviews code for correctness, security, and maintainability
tools: Read, Grep, Glob
Every finding must include a concrete fix.}] }, { id: 'workflows', label: 'workflows/', type: 'folder', icon: 'folder', color: '#C46686', oneLiner: 'Dynamic workflow scripts that orchestrate many subagents', when: 'Loaded at startup; each file becomes a /<name> command', 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.</>, 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</>], docsLink: '/en/workflows' }, { id: 'agent-memory', label: 'agent-memory/', type: 'folder', icon: 'folder', color: '#C46686', badge: 'committed', autogen: true, oneLiner: 'Subagent persistent memory, separate from your main session auto memory', when: 'First 200 lines (capped at 25KB) of MEMORY.md loaded into the subagent system prompt when it runs', 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.</>, 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</>], docsLink: '/en/sub-agents#enable-persistent-memory', children: [{ id: 'agent-memory-sub', label: '<agent-name>/', type: 'folder', icon: 'folder', color: '#C46686', autogen: true, children: [{ id: 'agent-memory-md', label: 'MEMORY.md', type: 'file', icon: 'md', color: '#C46686', badge: 'committed', autogen: true, oneLiner: 'The subagent writes and maintains this file automatically', when: 'Loaded into the subagent system prompt when the subagent starts', 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.</>, example:# code-reviewer memory
Patterns seen
Project uses custom Result<T, E> type, not exceptions
Auth middleware expects Bearer token in Authorization header
Tests use factory functions in test/factories/
Recurring issues
Missing null checks on API responses (src/api/*)
Unhandled promise rejections in background jobs}] }] }] }] }, global: { label: '~/', children: [{ id: 'claude-json', label: '.claude.json', type: 'file', icon: 'json', color: 'var(--ce-text-3)', badge: 'local', oneLiner: 'App state and UI preferences', 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</>, 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.</>, 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</>], example:{
"autoConnectIde": true,
"externalEditorContext": true,
"mcpServers": {
"my-tools": {
"command": "npx",
"args": ["-y", "@example/mcp-server"]
}
}
}, docsLink: '/en/settings-reference#global-config-settings' }, { id: 'global-dot-claude', label: '.claude/', type: 'folder', icon: 'folder', color: 'var(--ce-accent)', oneLiner: 'Your personal configuration across all projects', 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.', children: [{ id: 'global-claude-md', label: 'CLAUDE.md', type: 'file', icon: 'md', color: '#6A9BCC', badge: 'local', oneLiner: 'Personal preferences across every project', when: 'Loaded at the start of every session, in every project', 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.', 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'], example: # Global preferences
Keep explanations concise
Use conventional commit format
Show the terminal command to verify changes
Prefer composition over inheritance, docsLink: '/en/memory' }, { id: 'global-settings', label: 'settings.json', type: 'file', icon: 'json', color: 'var(--ce-text-3)', badge: 'local', oneLiner: 'Default settings for all projects', when: 'Your defaults. Project and local settings.json override any keys you also set there', 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.</>], example: {
"permissions": {
"allow": [
"Bash(git log *)",
"Bash(git diff *)"
]
}
}, docsLink: '/en/settings' }, { id: 'keybindings', label: 'keybindings.json', type: 'file', icon: 'json', color: 'var(--ce-text-3)', badge: 'local', oneLiner: 'Custom keyboard shortcuts', when: 'Read at session start and hot-reloaded when you edit the file', 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.</>, 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.</>, example: {
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"$docs": "https://code.claude.com/docs/en/keybindings",
"bindings": [
{
"context": "Chat",
"bindings": {
"ctrl+e": "chat:externalEditor",
"ctrl+s": null
}
}
]
}, docsLink: '/en/keybindings' }, { id: 'themes', label: 'themes/', type: 'folder', icon: 'folder', color: '#5AA7A7', oneLiner: 'Custom color themes', when: <>Read at session start and hot-reloaded when files change. Listed in <C>/theme</C></>, 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.</>, example: {
"name": "Dracula",
"base": "dark",
"overrides": {
"claude": "#bd93f9",
"error": "#ff5555",
"success": "#50fa7b"
}
}, docsLink: '/en/terminal-config#create-a-custom-theme', children: [] }, { id: 'global-projects', label: 'projects/', type: 'folder', icon: 'folder', color: '#E8A45C', autogen: true, oneLiner: "Auto memory: Claude's notes to itself, per project", when: 'MEMORY.md loaded at session start; topic files read on demand', 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.', 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'], docsLink: '/en/memory#auto-memory', children: [{ id: 'memory-dir', label: '<project>/memory/', type: 'folder', icon: 'folder', color: '#E8A45C', autogen: true, oneLiner: "Claude's accumulated knowledge for one project", children: [{ id: 'memory-md', label: 'MEMORY.md', type: 'file', icon: 'md', color: '#E8A45C', badge: 'local', autogen: true, oneLiner: 'Claude writes and maintains this file automatically', when: 'First 200 lines (capped at 25KB) loaded at session start', 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.', example: # Memory Index
debugging.md: auth token rotation and DB connection troubleshooting, docsLink: '/en/memory' }, { id: 'memory-topic', label: 'debugging.md', type: 'file', icon: 'md', color: '#E8A45C', badge: 'local', autogen: true, oneLiner: 'Topic notes Claude writes when MEMORY.md gets long', when: 'Claude reads this when a related task comes up', 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.', example: ---
name: Debugging patterns
description: Auth token rotation and database connection troubleshooting for this project
type: reference
Auth Token Issues
Refresh token rotation: old token invalidated immediately
If 401 after refresh: check clock skew between client and server
Database Connection Drops
Connection pool: max 10 in dev, 50 in prod
Always check `docker compose ps` first}] }] }, { id: 'global-rules', label: 'rules/', type: 'folder', icon: 'folder', color: '#9B7BC4', oneLiner: 'User-level rules that apply to every project', 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</>, 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.', docsLink: '/en/memory#organize-rules-with-claude/rules/', children: [] }, { id: 'global-skills', label: 'skills/', type: 'folder', icon: 'folder', color: '#D4A843', oneLiner: 'Personal skills available in every project', when: <>Invoked with <C>/skill-name</C> in any project</>, 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.', docsLink: '/en/skills', children: [] }, { id: 'global-commands', label: 'commands/', type: 'folder', icon: 'folder', color: '#788C5D', oneLiner: 'Personal single-file commands available in every project', note: commandsNote, when: <>User types <C>/command-name</C> in any project</>, description: 'Same as project commands/ but scoped to your user account. Each markdown file becomes a command available everywhere.', docsLink: '/en/skills', children: [] }, { id: 'global-output-styles', label: 'output-styles/', type: 'folder', icon: 'folder', color: '#5AA7A7', oneLiner: 'Custom instruction sets that adjust how Claude works', when: 'Files read at startup; the style you select with outputStyle applies to every response', 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.</>], 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'], docsLink: '/en/output-styles', children: [{ id: 'output-style-example', label: 'teaching.md', type: 'file', icon: 'md', color: '#5AA7A7', badge: 'local', oneLiner: 'Example style that adds explanations and leaves small changes for you', when: <>Active when <C>outputStyle</C> in settings is set to <C>teaching</C></>, 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.</>, example:---
description: Explains reasoning and asks you to implement small pieces
keep-coding-instructions: true
After completing each task, add a brief "Why this approach" note
explaining the key design decision.
Claude Code читает инструкции, параметры, skills, subagents и память из директории вашего проекта и из ~/.claude в вашей домашней директории. Зафиксируйте файлы проекта в git, чтобы поделиться ими с вашей командой; файлы в ~/.claude — это личная конфигурация, которая применяется ко всем вашим проектам.
На Windows ~/.claude разрешается в %USERPROFILE%\.claude. Если вы установите CLAUDE_CONFIG_DIR, каждый путь ~/.claude на этой странице будет находиться в этой директории вместо этого.
Большинство пользователей редактируют только CLAUDE.md и settings.json. Если ваш репозиторий уже содержит AGENTS.md для других агентов кодирования, Claude Code может читать его вместо CLAUDE.md. Остальная часть директории опциональна: добавляйте skills, rules или subagents по мере необходимости.
Изучите директорию
Нажимайте на файлы в дереве, чтобы увидеть, что каждый из них делает, когда он загружается и пример.
Что не показано
Обозреватель охватывает файлы, которые вы создаёте и редактируете. Несколько связанных файлов находятся в других местах:
Ваши личные предпочтения для этого проекта, загружаемые вместе с CLAUDE.md. Создайте его вручную и добавьте в .gitignore.
AGENTS.md
Корень проекта, .claude/ или любой каталог
Инструкции проекта, которые вы пишете для агентов AI кодирования. Claude Code может загрузить его вместо CLAUDE.md.
Установленные плагины
~/.claude/plugins
Клонированные маркетплейсы, установленные версии плагинов, запись установки installed_plugins.json и данные для каждого плагина, управляемые командами claude plugin. Плагины, синхронизированные с вашей учётной записью claude.ai, загружаются в ~/.claude/plugins/synced/. Для плагина, установленного из маркетплейса с источником command в режиме ссылки, Claude Code хранит здесь ссылки вместо копии, и файлы плагина остаются в каталоге, который выводит команда. Источник command требует Claude Code v2.1.229 или позже. Плагин, указанный относительным путём в маркетплейсе, который вы добавили из локального пути, также загружается на месте из своего исходного каталога, а не из копии в кэше. См. кэширование плагинов, чтобы узнать, как очищаются заброшенные версии.
~/.claude также содержит данные, которые Claude Code записывает во время работы: стенограммы, историю подсказок, снимки файлов, кэши и журналы. См. данные приложения ниже.
Выберите правильный файл
Различные виды настройки находятся в разных файлах. Используйте эту таблицу, чтобы найти, где должно быть изменение.
Эта таблица перечисляет каждый файл, который охватывает обозреватель. Файлы с областью действия проекта находятся в вашем репозитории под .claude/ (или в корне для CLAUDE.md, .mcp.json и .worktreeinclude). Файлы с глобальной областью действия находятся в ~/.claude/ и применяются ко всем проектам.
Нажмите на имя файла, чтобы открыть этот узел в обозревателе выше.
Skills, command files, subagents, output styles, and rules read their configuration from YAML 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.
Agents shipped in a plugin honor a subset of the subagent fields.
Устранение неполадок конфигурации
Если параметр, hook или файл не вступает в силу, см. Отладка вашей конфигурации для команд проверки и таблицы поиска по симптомам.
Данные приложения
Помимо конфигурации, которую вы создаёте, ~/.claude содержит данные, которые Claude Code записывает во время сеансов. Эти файлы представляют собой простой текст. Всё, что проходит через инструмент, записывается в транскрипт на диск: содержимое файлов, вывод команд, вставленный текст.
Автоматическая очистка
Claude Code удаляет файлы в путях ниже, как только они становятся старше cleanupPeriodDays, при условии, что он может безопасно определить период хранения. По умолчанию это 30 дней, минимум — 1 день; установка 0 приводит к ошибке валидации. Тот же порог возраста применяется к автоматическому удалению сиротских worktrees.
Путь в ~/.claude/
Содержимое
projects/<project>/<session>.jsonl
Полный транскрипт беседы: каждое сообщение, вызов инструмента и результат инструмента
Снимки файлов до редактирования, которые Claude изменил, используются для восстановления контрольной точки. Содержит снимки для 100 самых последних контрольных точек; файлы снимков, на которые не ссылается ни одна сохранённая контрольная точка, удаляются, кроме первого снимка каждого файла
Журналы отладки для каждого сеанса, записываемые при включённой отладке, например при запуске с --debug или выполнении /debug
paste-cache/
Содержимое больших вставок
image-cache/<session>/
Изображения, прикреплённые и сохранённые Claude Code v2.1.274 и более ранними версиями. Более поздние версии сохраняют вставленные и прикреплённые изображения вне ~/.claude, в каталоге images/ для каждого сеанса в временном каталоге, который контролирует CLAUDE_CODE_TMPDIR. Очистка удаляет оставшиеся каталоги других сеансов здесь, независимо от их возраста.
uploads/<session>/
Файлы, которые вы прикрепляете из веб-приложения или мобильного приложения, и фотографии, которые вы прикрепляете из мобильного приложения, при отправке сообщения в сеанс Remote Control. Вложение в облачный сеанс сохраняется в собственной облачной среде этого сеанса, а не на вашей машине.
Списки задач, написанные инструментами задач, один каталог на список
shell-snapshots/
Псевдонимы, функции и параметры оболочки, захваченные при запуске и применяемые инструментом Bash к каждой команде. Удаляются при корректном выходе. Очистка удаляет оставшиеся после сбоя.
backups/
Более ранние версии ~/.claude.json, скопированные при перезаписи файла Claude Code. Claude Code сохраняет пять самых новых, плюс копию любой версии, которую он не смог разобрать.
feedback-bundles/
Отредактированные архивы транскриптов, написанные /feedback на сторонних поставщиков или когда учётные данные Anthropic не настроены, для отправки команде вашего аккаунта Anthropic
feedback/drafts/
Очередь черновиков обратной связи, написанных Claude, ожидающих вашего рассмотрения в /feedback. Очищается после cleanupPeriodDays или 30 дней, в зависимости от того, что меньше. Когда очередь достигает лимита в 10 черновиков, Claude Code удаляет самый старый черновик, чтобы освободить место.
usage-data/
report.html и копии отчётов с временными метками, написанные /insights, плюс кэшированные данные анализа для каждого сеанса, используемые для их построения
skills/.trash/, plugins/.trash/
Навыки и плагины, которые синхронизация claude.ai удалила, например после отключения одного на claude.ai или остановки синхронизации. Файлы остаются здесь, чтобы вы могли их восстановить, пока очистка их не удалит
Датированные копии, которые Claude Code создаёт перед перезаписью installed_plugins.json: записи об установке, которые он удалил, и содержимое файла, который он не смог прочитать.
todos/, statsig/, logs/
Устаревшие каталоги из более старых версий. Больше не записываются. Очистка удаляет их содержимое, а затем пустой каталог.
Файлы сеанса в sessions/, автоматическая память, а также транскрипты Claude Desktop и Cowork следуют своим собственным правилам хранения:
sessions/: содержит один небольшой файл на запущенный сеанс, используется для обнаружения одновременных сеансов и сбоев. Это не часть очистки на основе возраста: Claude Code удаляет каждый файл при выходе из его сеанса и очищает остатки сбоев при следующем запуске.
Автоматическая память: очистка не удаляет файлы памяти в каталоге автоматической памяти проекта, projects/<project>/memory/. Claude Code удаляет этот каталог только если он был пуст в течение всего периода хранения. До v2.1.228 очистка рассматривала папки внутри каталога памяти как данные сеанса и могла удалять старые файлы под ними.
Транскрипты Claude Desktop и Cowork: Claude Code сохраняет транскрипт сессии, которую вы запустили или последней продолжили в Claude Desktop или Cowork, в любом возрасте. Чтобы установить ограничение по возрасту для этих транскриптов, задайте desktopSessionCleanupPeriodDays. Требуется Claude Code v2.1.248 или позже; более ранние версии удаляют их после cleanupPeriodDays.
Вместо этого Claude Code удаляет эти транскрипты после cleanupPeriodDays в любом из следующих случаев:
Claude Code пропускает очистку на основе возраста в этих случаях:
Режим Bare: когда вы запускаете claude -p с --bare, Claude Code не запускает очистку в этом сеансе.
Приостановленная очистка: если Claude Code не может безопасно определить период хранения, он приостанавливает очистку хранения; событие retention_sweep перечисляет каждую конфигурацию, которая её приостанавливает. Когда причина — файл параметров, который не может быть прочитан или разобран, или ошибки параметров с явно установленными cleanupPeriodDays или desktopSessionCleanupPeriodDays, Claude Code также показывает предупреждение в /status до тех пор, пока вы не исправите ошибки параметров. Когда управляемые параметры предоставляют cleanupPeriodDays, Claude Code запускает очистку с управляемым значением в любом случае.
Чтобы проверить, что машины в вашей организации выполняют очистку с заданным вами периодом хранения, см. Проверка очистки по сроку хранения.
Каталог блокнота сеанса
Блокнот — это каталог для каждого сеанса, который Claude Code предоставляет Claude для временных файлов: промежуточные результаты, вспомогательные скрипты и черновики, которые не принадлежат вашему проекту. Когда Claude говорит, что он сохранил что-то «в блокнот», файл находится там. Claude использует его вместо /tmp и может создавать, редактировать и читать файлы в нём без запроса разрешения.
Блокнот находится в временном каталоге Claude Code, а не в ~/.claude. Найдите путь текущего сеанса для вашей платформы:
<project> — это путь вашего рабочего каталога со всеми символами, кроме букв и цифр, заменёнными на -, например -Users-you-my-project. Если вы установите CLAUDE_CODE_TMPDIR, дерево переместится в этот каталог вместо этого. Hooks получают путь текущего сеанса как scratchpad_dir.
Файлы блокнота существуют столько же, сколько транскрипт сессии: очистка хранения удаляет каталог при удалении транскрипта, а claude purge не трогает временный каталог. Поскольку каталог находится в системном временном расположении, ваша операционная система также может его очистить, например при перезагрузке. Чтобы сохранить что-то, что написал Claude, попросите Claude переместить это в ваш проект.
Сеанс имеет блокнот только когда выполняются все эти условия:
Вы вошли с учётной записью claude.ai, а не с ключом API
Сеанс использует Anthropic API, а не Amazon Bedrock, Google Cloud's Agent Platform или Microsoft Foundry
За исключением строк, где указано иное, очистка хранения не удаляет пути ниже, и Claude Code сохраняет их до тех пор, пока вы их не удалите.
Путь в ~/.claude/
Содержимое
history.jsonl
Каждый промпт, который вы ввели, с временной меткой и путём проекта. Используется для вызова стрелкой вверх, поиска по истории Ctrl+R и завершения shell-команд !. Каждая очистка удаляет записи старше cleanupPeriodDays, когда к вашим сессиям применяется конфигурация HIPAA.
stats-cache.json
Агрегированные подсчёты токенов и затрат, показанные /usage
remote-settings.json
Кэшированная копия управляемых параметров сервера для вашей организации, или {} когда ваша организация не настроила никаких. Присутствует только когда сеанс их получает. Claude Code проверяет обновления при запуске и ежечасно во время сеанса. Claude Code удаляет его при выходе.
cache/changelog.md
Кэшированная копия журнала изменений Claude Code, показанная /release-notes. Обновляется в фоне.
policy-limits.json
Кэшированные параметры политики функций для вашей организации. Присутствует только для некоторых типов аккаунтов. Обновляется автоматически. Файл-спутник policy-limits.json.stamp.json записывает, какому аккаунту или ключу API принадлежит кэш. Claude Code удаляет оба файла при выходе.
Файлы состояния, которые нужно сохранить
В зависимости от того, какие функции вы используете, ~/.claude/ также содержит файлы, не перечисленные в таблицах раздела Данные приложения. Из них кэши и файлы блокировки безопасно удалять. Сохраняйте эти файлы состояния:
Транскрипты и история не зашифрованы в покое. Разрешения файлов ОС — единственная защита. Если инструмент читает файл .env или команда выводит учётные данные, это значение записывается в projects/<project>/<session>.jsonl. Чтобы снизить риск:
Уменьшите cleanupPeriodDays, чтобы сократить время хранения транскриптов Claude Code
Установите desktopSessionCleanupPeriodDays, чтобы также установить ограничение по возрасту для транскриптов Claude Desktop и Cowork
Установите переменную окружения CLAUDE_CODE_SKIP_PROMPT_HISTORY, чтобы пропустить запись транскриптов и истории запросов в любом режиме. В неинтерактивном режиме вы можете вместо этого передать --no-session-persistence вместе с -p, или установить persistSession: false в TypeScript Agent SDK; Python SDK не имеет эквивалентного параметра.
Запустите claude purge, чтобы удалить состояние, которое Claude Code хранит для одного проекта. Команда удаляет:
Транскрипты и автоматическую память в projects/
Записи tasks/, debug/ и file-history/ для каждого сеанса
Совпадающие строки запроса в history.jsonl
Запись проекта в ~/.claude.json
Изображения, которые вы вставили или прикрепили в сеансах проекта, и блокнот каждого сеанса хранятся в временном каталоге Claude Code, а не в ~/.claude, поэтому очистка их не удаляет. Очистка хранения всё ещё удаляет изображения, как только они становятся старше cleanupPeriodDays; блокнот очищенного сеанса остаётся до удаления вручную или пока ваша операционная система не очистит временный каталог.
Команда выводит полный план удаления и запрашивает подтверждение перед удалением чего-либо.
До v2.1.288 команда называлась claude project purge.
Примеры ниже используют ~/work/my-repo как заполнитель. Замените его на путь к вашему проекту. Если состояние не совпадает с путём, команда выводит ошибку и выходит со статусом 1.
Предпросмотр плана без удаления:
claude purge ~/work/my-repo--dry-run
План перечисляет каждый совпадающий элемент и причину его включения:
Purge plan for /home/user/work/my-repo:
dir: /home/user/.claude/projects/-home-user-work-my-repo
project transcripts (.jsonl) and memory/
config: projects["/home/user/work/my-repo"]
project entry in ~/.claude.json (trust, history, MCP servers)
filter: /home/user/.claude/history.jsonl
12 prompt(s) typed in this project
shell-snapshots/ are not project-scoped and will not be touched
backups/ may still contain this project entry in old .claude.json snapshots (/home/user/.claude/backups); at most 5 are kept and they rotate out automatically
Dry run: 3 item(s) would be deleted.
Удалить с одним запросом подтверждения:
claude purge ~/work/my-repo
Команда выводит тот же план, затем спрашивает Delete 3 item(s) for /home/user/work/my-repo? This cannot be undone. [y/N] и удаляет только если вы ответите y.
Опустите путь, чтобы выбрать проект из интерактивного списка.
Пропустите запрос подтверждения для использования в скриптах:
claude purge ~/work/my-repo--yes
Передайте --all вместо пути, чтобы очистить состояние для каждого проекта сразу, что удаляет history.jsonl полностью, а не фильтруя его. Передайте -i, чтобы пройти через план удаления по одному элементу за раз.
В скрипте проверяйте вывод, а не только код выхода. Запуск, который удаляет всё из своего плана, завершается строкой Purged N item(s). Считайте эту строку признаком успеха.
Команда оставляет shell-snapshots/ и backups/ в покое, потому что они не ограничены проектом, и предупреждает о них в выводе плана. Если кто-либо запускал /heapdump на этой машине, удалите также записанные им файлы .heapsnapshot. Снимок кучи содержит полный диалог и любые учётные данные, которые хранил процесс, и ни очистка по сроку хранения, ни purge его не затрагивают.
Вы также можете удалить любой из путей данных приложения выше вручную, кроме файлов состояния для сохранения. Новые сеансы не затронуты. Таблица ниже показывает, что вы теряете для прошлых сеансов.
Удалить
Вы теряете
~/.claude/projects/
Возобновление, продолжение и перемотку для прошлых сеансов, и автоматическую память для каждого проекта
~/.claude/history.jsonl
Вызов запроса стрелкой вверх, поиск истории Ctrl+R и завершение команды оболочки !
Настройте параметры: установите разрешения, hooks, переменные окружения и значения по умолчанию модели
Создавайте skills: создавайте переиспользуемые подсказки и рабочие процессы
Настройте subagents: определите специализированные агенты с их собственным контекстом
claude-directory.md+8−8
34 oneLiner: 'Project instructions Claude reads every session',34 oneLiner: 'Project instructions Claude reads every session',
35 when: 'Loaded into context at the start of every session',35 when: 'Loaded into context at the start of every session',
36 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.',36 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.',
37 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> on its own or alongside CLAUDE.md</>],37 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></>],
38 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.',38 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.',
166 oneLiner: 'Topic-scoped instructions, optionally gated by file paths',166 oneLiner: 'Topic-scoped instructions, optionally gated by file paths',
167 when: <>Rules without <C>paths:</C> load at session start. Rules with <C>paths:</C> load when a matching file enters context</>,167 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</>,
168 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>.</>],168 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>.</>],
169 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'],169 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'],
178 oneLiner: 'Test conventions scoped to test files',178 oneLiner: 'Test conventions scoped to test files',
179 when: <>Loaded when Claude reads a file matching the <C>paths:</C> globs below</>,179 when: <>Loaded when Claude reads,writes, or edits a file matching the <C>paths:</C> globs below</>,
180 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.</>,180 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.</>,
181 example: `---181 example: `---
182paths:182paths:
197 color: '#9B7BC4',197 color: '#9B7BC4',
198 badge: 'committed',198 badge: 'committed',
199 oneLiner: 'API conventions scoped to backend code',199 oneLiner: 'API conventions scoped to backend code',
200 when: <>Loaded when Claude reads a file matching the <C>paths:</C> glob below</>,200 when: <>Loaded when Claude reads,writes, or edits a file matching the <C>paths:</C> glob below</>,
201 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 editing API routes.</>,201 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 workingon API routes.</>,
202 example: `---202 example: `---
203paths:203paths:
204 - "src/api/**/*.ts"204 - "src/api/**/*.ts"
605 icon: 'folder',605 icon: 'folder',
606 color: '#9B7BC4',606 color: '#9B7BC4',
607 oneLiner: 'User-level rules that apply to every project',607 oneLiner: 'User-level rules that apply to every project',
608 when: <>Rules without <C>paths:</C> load at session start. Rules with <C>paths:</C> load when a matching file enters context</>,608 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</>,
609 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.',609 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.',
1435На Windows `~/.claude` разрешается в `%USERPROFILE%\.claude`. Если вы установите [`CLAUDE_CONFIG_DIR`](/docs/ru/env-vars), каждый путь `~/.claude` на этой странице будет находиться в этой директории вместо этого.1435На Windows `~/.claude` разрешается в `%USERPROFILE%\.claude`. Если вы установите [`CLAUDE_CONFIG_DIR`](/docs/ru/env-vars), каждый путь `~/.claude` на этой странице будет находиться в этой директории вместо этого.
14361436
1437Большинство пользователей редактируют только `CLAUDE.md` и `settings.json`. Если ваш репозиторий уже содержит `AGENTS.md` для других агентов кодирования, Claude Code [может читать это](/docs/ru/memory#agents-md) самостоятельно или вместе с `CLAUDE.md`. Остальная часть директории опциональна: добавляйте skills, rules или subagents по мере необходимости.1437Большинство пользователей редактируют только `CLAUDE.md` и `settings.json`. Если ваш репозиторий уже содержит `AGENTS.md` для других агентов кодирования, Claude Code [может читать его](/docs/ru/memory#agents-md) вместо `CLAUDE.md`. Остальная часть директории опциональна: добавляйте skills, rules или subagents по мере необходимости.
1455| `managed-settings.json` | Уровень системы, варьируется в зависимости от ОС | Параметры, установленные предприятием, которые вы не можете переопределить, за исключением [узких исключений](/docs/ru/settings#security-keys-where-the-stricter-value-applies). См. [где сохранить файл](/docs/ru/managed-settings#deploy-a-managed-settings-file) и [какой управляемый источник использует Claude Code](/docs/ru/managed-settings#precedence-within-the-managed-tier). |1455| `managed-settings.json` | Уровень системы, варьируется в зависимости от ОС | Параметры, установленные предприятием, которые вы не можете переопределить, за исключением [узких исключений](/docs/ru/settings#security-keys-where-the-stricter-value-applies). См. [где сохранить файл](/docs/ru/managed-settings#deploy-a-managed-settings-file) и [какой управляемый источник использует Claude Code](/docs/ru/managed-settings#precedence-within-the-managed-tier). |
1456| `CLAUDE.local.md` | Корень проекта | Ваши личные предпочтения для этого проекта, загружаемые вместе с CLAUDE.md. Создайте его вручную и добавьте в `.gitignore`. |1456| `CLAUDE.local.md` | Корень проекта | Ваши личные предпочтения для этого проекта, загружаемые вместе с CLAUDE.md. Создайте его вручную и добавьте в `.gitignore`. |
1457| `AGENTS.md` | Корень проекта, `.claude/` или любой каталог | Инструкции проекта, которые вы пишете для агентов AI кодирования. Claude Code может [загрузить его](/docs/ru/memory#agents-md) самостоятельно или вместе с `CLAUDE.md`. |1457| `AGENTS.md` | Корень проекта, `.claude/` или любой каталог | Инструкции проекта, которые вы пишете для агентов AI кодирования. Claude Code может [загрузить его](/docs/ru/memory#agents-md) вместо `CLAUDE.md`. |
1458| Установленные плагины | `~/.claude/plugins` | Клонированные маркетплейсы, установленные версии плагинов, запись установки `installed_plugins.json` и данные для каждого плагина, управляемые командами `claude plugin`. Плагины, [синхронизированные с вашей учётной записью claude.ai](/docs/ru/plugins/loading#synced-plugins), загружаются в `~/.claude/plugins/synced/`. Для плагина, установленного из маркетплейса с источником [`command`](/docs/ru/plugins/marketplace-reference#command-plugin-source) в режиме ссылки, Claude Code хранит здесь ссылки вместо копии, и файлы плагина остаются в каталоге, который выводит команда. Источник `command` требует Claude Code v2.1.229 или позже. Плагин, указанный относительным путём в маркетплейсе, который вы добавили из локального пути, также [загружается на месте](/docs/ru/plugins/loading#find-plugins-on-disk) из своего исходного каталога, а не из копии в кэше. См. [кэширование плагинов](/docs/ru/plugins/loading#find-plugins-on-disk), чтобы узнать, как очищаются заброшенные версии. |1458| Установленные плагины | `~/.claude/plugins` | Клонированные маркетплейсы, установленные версии плагинов, запись установки `installed_plugins.json` и данные для каждого плагина, управляемые командами `claude plugin`. Плагины, [синхронизированные с вашей учётной записью claude.ai](/docs/ru/plugins/loading#synced-plugins), загружаются в `~/.claude/plugins/synced/`. Для плагина, установленного из маркетплейса с источником [`command`](/docs/ru/plugins/marketplace-reference#command-plugin-source) в режиме ссылки, Claude Code хранит здесь ссылки вместо копии, и файлы плагина остаются в каталоге, который выводит команда. Источник `command` требует Claude Code v2.1.229 или позже. Плагин, указанный относительным путём в маркетплейсе, который вы добавили из локального пути, также [загружается на месте](/docs/ru/plugins/loading#find-plugins-on-disk) из своего исходного каталога, а не из копии в кэше. См. [кэширование плагинов](/docs/ru/plugins/loading#find-plugins-on-disk), чтобы узнать, как очищаются заброшенные версии. |
14591459
1460`~/.claude` также содержит данные, которые Claude Code записывает во время работы: стенограммы, историю подсказок, снимки файлов, кэши и журналы. См. [данные приложения](#application-data) ниже.1460`~/.claude` также содержит данные, которые Claude Code записывает во время работы: стенограммы, историю подсказок, снимки файлов, кэши и журналы. См. [данные приложения](#application-data) ниже.