claude-directory.md +57 −57
20 background: 'var(--ce-surface)',20 background: 'var(--ce-surface)',
21 border: '0.5px solid var(--ce-border-subtle)'21 border: '0.5px solid var(--ce-border-subtle)'
22 }}>{children}</code>, []);22 }}>{children}</code>, []);
2323 const commandsNote = useMemo(() => <>Commands and skills are now the same mechanism. For new workflows, use <A href="/en/skills">skills/</A> instead: same <C>/name</C> invocation, plus you can bundle supporting files.</>, []); 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.</>, []);
24 const FILE_TREE = useMemo(() => ({24 const FILE_TREE = useMemo(() => ({
25 project: {25 project: {
26 label: 'your-project/',26 label: 'your-project/',
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.',
3737 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="/en/skills">skill</A> or a path-scoped <A href="/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</>], 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</>],
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.',
39 example: `# Project conventions39 example: `# Project conventions
40 40
60 color: '#9B7BC4',60 color: '#9B7BC4',
61 badge: 'committed',61 badge: 'committed',
62 oneLiner: 'Project-scoped MCP servers, shared with your team',62 oneLiner: 'Project-scoped MCP servers, shared with your team',
6363 when: <>Servers connect when the session begins. Tool schemas are deferred by default and load on demand via <A href="/en/mcp#scale-with-mcp-tool-search">tool search</A></>, 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></>,
64 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.</>,64 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.</>,
65 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></>],65 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></>],
66 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.</>,66 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.</>,
86 oneLiner: 'Gitignored files to copy into new worktrees',86 oneLiner: 'Gitignored files to copy into new worktrees',
87 when: <>Read when Claude creates a git worktree via <C>--worktree</C>, the <C>EnterWorktree</C> tool, or subagent <C>isolation: worktree</C></>,87 when: <>Read when Claude creates a git worktree via <C>--worktree</C>, the <C>EnterWorktree</C> tool, or subagent <C>isolation: worktree</C></>,
88 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.</>,88 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.</>,
8989 tips: [<>Lives at the project root, not inside <C>.claude/</C></>, <>Git-only: if you configure a <A href="/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="/en/desktop#work-in-parallel-with-sessions">desktop app</A></>], 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></>],
90 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.',90 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.',
91 example: `# Local environment91 example: `# Local environment
92.env92.env
102 icon: 'folder',102 icon: 'folder',
103 color: 'var(--ce-accent)',103 color: 'var(--ce-accent)',
104 oneLiner: 'Project-level configuration, rules, and extensions',104 oneLiner: 'Project-level configuration, rules, and extensions',
105105 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 automatically gitignored. Each file badge shows which.', 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.',
106 children: [{106 children: [{
107 id: 'settings-json',107 id: 'settings-json',
108 label: 'settings.json',108 label: 'settings.json',
113 oneLiner: 'Permissions, hooks, and configuration',113 oneLiner: 'Permissions, hooks, and configuration',
114 when: <>Overrides global <C>~/.claude/settings.json</C>. Local settings, CLI flags, and managed settings override this</>,114 when: <>Overrides global <C>~/.claude/settings.json</C>. Local settings, CLI flags, and managed settings override this</>,
115 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.',115 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.',
116116 contains: [<><A href="/en/permissions">permissions</A>: allow, deny, or prompt before Claude uses specific tools or commands</>, <><A href="/en/hooks">hooks</A>: run your own scripts on events like before a tool call or after a file edit</>, <><A href="/en/statusline">statusLine</A>: customize the line shown at the bottom while Claude works</>, <><A href="/en/settings#available-settings">model</A>: pick a default model for this project</>, <><A href="/en/settings#environment-variables">env</A>: environment variables set in every session</>, <><A href="/en/output-styles">outputStyle</A>: select a custom system-prompt style from output-styles/</>], 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#available-settings">model</A>: pick a default model for this project</>, <><A href="/docs/en/settings#environment-variables">env</A>: environment variables set in every session</>, <><A href="/docs/en/output-styles">outputStyle</A>: select a custom system-prompt style from output-styles/</>],
117 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</>],117 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</>],
118 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.</>,118 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.</>,
119 example: `{119 example: `{
146 badge: 'gitignored',146 badge: 'gitignored',
147 oneLiner: 'Your personal settings overrides for this project',147 oneLiner: 'Your personal settings overrides for this project',
148 when: 'Highest of the user-editable settings files; CLI flags and managed settings still take precedence',148 when: 'Highest of the user-editable settings files; CLI flags and managed settings still take precedence',
149149 description: 'Personal settings that take precedence over the project defaults. Same JSON format as settings.json, but not committed. Use this when you need different permissions or defaults than the team config.', 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.',
150150 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</>, <>Claude Code adds this file to <C>~/.config/git/ignore</C> the first time it writes one. If you use a custom <C>core.excludesFile</C>, add the pattern there too. To share the ignore rule with your team, also add it to the project <C>.gitignore</C></>], 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></>],
151 exampleIntro: 'This example adds Docker permissions on top of whatever the team settings.json allows.',151 exampleIntro: 'This example adds Docker permissions on top of whatever the team settings.json allows.',
152 example: `{152 example: `{
153 "permissions": {153 "permissions": {
165 color: '#9B7BC4',165 color: '#9B7BC4',
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 a matching file enters context</>,
168168 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 a matching file.</>, <>Like CLAUDE.md, rules are guidance Claude reads, not configuration Claude Code enforces. For guaranteed behavior use <A href="/en/hooks">hooks</A> or <A href="/en/permissions">permissions</A>.</>], 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 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'],
170 docsLink: '/en/memory#organize-rules-with-claude/rules/',170 docsLink: '/en/memory#organize-rules-with-claude/rules/',
171 children: [{171 children: [{
369 color: '#C46686',369 color: '#C46686',
370 oneLiner: 'Dynamic workflow scripts that orchestrate many subagents',370 oneLiner: 'Dynamic workflow scripts that orchestrate many subagents',
371 when: 'Loaded at startup; each file becomes a /<name> command',371 when: 'Loaded at startup; each file becomes a /<name> command',
372372 description: <>Each <C>.js</C> file is a <A href="/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.</>, 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.</>,
373 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</>],373 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</>],
374 docsLink: '/en/workflows'374 docsLink: '/en/workflows'
375 }, {375 }, {
382 autogen: true,382 autogen: true,
383 oneLiner: 'Subagent persistent memory, separate from your main session auto memory',383 oneLiner: 'Subagent persistent memory, separate from your main session auto memory',
384 when: 'First 200 lines (capped at 25KB) of MEMORY.md loaded into the subagent system prompt when it runs',384 when: 'First 200 lines (capped at 25KB) of MEMORY.md loaded into the subagent system prompt when it runs',
385385 description: <>Subagents with <C>memory: project</C> in their frontmatter get a dedicated memory directory here. This is distinct from your <A href="/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.</>, 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.</>,
386 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</>],386 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</>],
387 docsLink: '/en/sub-agents#enable-persistent-memory',387 docsLink: '/en/sub-agents#enable-persistent-memory',
388 children: [{388 children: [{
402 autogen: true,402 autogen: true,
403 oneLiner: 'The subagent writes and maintains this file automatically',403 oneLiner: 'The subagent writes and maintains this file automatically',
404 when: 'Loaded into the subagent system prompt when the subagent starts',404 when: 'Loaded into the subagent system prompt when the subagent starts',
405405 description: <>Works the same as your <A href="/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.</>, 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.</>,
406 example: `# code-reviewer memory406 example: `# code-reviewer memory
407 407
408## Patterns seen408## Patterns seen
1432 1432
1433Claude Code は、プロジェクトディレクトリとホームディレクトリの `~/.claude` から、指示、設定、skills、subagents、メモリを読み込みます。プロジェクトファイルを git にコミットしてチームと共有します。`~/.claude` 内のファイルは、すべてのプロジェクトに適用される個人設定です。1433Claude Code は、プロジェクトディレクトリとホームディレクトリの `~/.claude` から、指示、設定、skills、subagents、メモリを読み込みます。プロジェクトファイルを git にコミットしてチームと共有します。`~/.claude` 内のファイルは、すべてのプロジェクトに適用される個人設定です。
1434 1434
14351435Windows では、`~/.claude` は `%USERPROFILE%\.claude` に解決されます。[`CLAUDE_CONFIG_DIR`](/ja/env-vars) を設定した場合、このページのすべての `~/.claude` パスはそのディレクトリの下に存在します。Windows では、`~/.claude` は `%USERPROFILE%\.claude` に解決されます。[`CLAUDE_CONFIG_DIR`](/docs/ja/env-vars) を設定した場合、このページのすべての `~/.claude` パスはそのディレクトリの下に存在します。
1436 1436
1437ほとんどのユーザーは `CLAUDE.md` と `settings.json` のみを編集します。ディレクトリの残りはオプションです。必要に応じて skills、rules、または subagents を追加してください。1437ほとんどのユーザーは `CLAUDE.md` と `settings.json` のみを編集します。ディレクトリの残りはオプションです。必要に応じて skills、rules、または subagents を追加してください。
1438 1438
1452 1452
1453| ファイル | 場所 | 目的 |1453| ファイル | 場所 | 目的 |
1454| ----------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |1454| ----------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14551455| `managed-settings.json` | システムレベル、OS によって異なる | オーバーライドできないエンタープライズが強制する設定。[サーバー管理設定](/ja/server-managed-settings)を参照してください。 || `managed-settings.json` | システムレベル、OS によって異なる | オーバーライドできないエンタープライズが強制する設定。[サーバー管理設定](/docs/ja/server-managed-settings)を参照してください。 |
1456| `CLAUDE.local.md` | プロジェクトルート | このプロジェクトの個人的な設定。CLAUDE.md と一緒に読み込まれます。手動で作成し、`.gitignore` に追加してください。 |1456| `CLAUDE.local.md` | プロジェクトルート | このプロジェクトの個人的な設定。CLAUDE.md と一緒に読み込まれます。手動で作成し、`.gitignore` に追加してください。 |
14571457| インストール済みプラグイン | `~/.claude/plugins` | クローンされたマーケットプレイス、インストール済みプラグインバージョン、およびプラグインごとのデータ。`claude plugin` コマンドで管理されます。孤立したバージョンはプラグインの更新またはアンインストール後 7 日で削除されます。[プラグインキャッシング](/ja/plugins-reference#plugin-caching-and-file-resolution)を参照してください。 || インストール済みプラグイン | `~/.claude/plugins` | クローンされたマーケットプレイス、インストール済みプラグインバージョン、およびプラグインごとのデータ。`claude plugin` コマンドで管理されます。孤立したバージョンはプラグインの更新またはアンインストール後 7 日で削除されます。[プラグインキャッシング](/docs/ja/plugins-reference#plugin-caching-and-file-resolution)を参照してください。 |
1458 1458
1459`~/.claude` は、作業中に Claude Code が書き込むデータも保持します。トランスクリプト、プロンプト履歴、ファイルスナップショット、キャッシュ、ログです。以下の[アプリケーションデータ](#application-data)を参照してください。1459`~/.claude` は、作業中に Claude Code が書き込むデータも保持します。トランスクリプト、プロンプト履歴、ファイルスナップショット、キャッシュ、ログです。以下の[アプリケーションデータ](#application-data)を参照してください。
1460 1460
1466 1466
1467| 実行したいこと | 編集 | スコープ | リファレンス |1467| 実行したいこと | 編集 | スコープ | リファレンス |
1468| :-------------------------------- | :---------------------------------------- | :------------- | :-------------------------------------------- |1468| :-------------------------------- | :---------------------------------------- | :------------- | :-------------------------------------------- |
14691469| Claude にプロジェクトコンテキストと規約を提供する | `CLAUDE.md` | プロジェクトまたはグローバル | [メモリ](/ja/memory) || Claude にプロジェクトコンテキストと規約を提供する | `CLAUDE.md` | プロジェクトまたはグローバル | [メモリ](/docs/ja/memory) |
14701470| 特定のツール呼び出しを許可またはブロックする | `settings.json` `permissions` または `hooks` | プロジェクトまたはグローバル | [パーミッション](/ja/permissions)、[Hooks](/ja/hooks) || 特定のツール呼び出しを許可またはブロックする | `settings.json` `permissions` または `hooks` | プロジェクトまたはグローバル | [パーミッション](/docs/ja/permissions)、[Hooks](/docs/ja/hooks) |
14711471| ツール呼び出しの前後にスクリプトを実行する | `settings.json` `hooks` | プロジェクトまたはグローバル | [Hooks](/ja/hooks) || ツール呼び出しの前後にスクリプトを実行する | `settings.json` `hooks` | プロジェクトまたはグローバル | [Hooks](/docs/ja/hooks) |
14721472| セッションの環境変数を設定する | `settings.json` `env` | プロジェクトまたはグローバル | [設定](/ja/settings#available-settings) || セッションの環境変数を設定する | `settings.json` `env` | プロジェクトまたはグローバル | [設定](/docs/ja/settings#available-settings) |
14731473| 個人的なオーバーライドを git から除外する | `settings.local.json` | プロジェクトのみ | [設定スコープ](/ja/settings#settings-files) || 個人的なオーバーライドを git から除外する | `settings.local.json` | プロジェクトのみ | [設定スコープ](/docs/ja/settings#settings-files) |
14741474| `/name` で呼び出すプロンプトまたは機能を追加する | `skills/<name>/SKILL.md` | プロジェクトまたはグローバル | [Skills](/ja/skills) || `/name` で呼び出すプロンプトまたは機能を追加する | `skills/<name>/SKILL.md` | プロジェクトまたはグローバル | [Skills](/docs/ja/skills) |
14751475| 独自のツールを持つ特化した subagent を定義する | `agents/*.md` | プロジェクトまたはグローバル | [Subagents](/ja/sub-agents) || 独自のツールを持つ特化した subagent を定義する | `agents/*.md` | プロジェクトまたはグローバル | [Subagents](/docs/ja/sub-agents) |
14761476| スクリプトから多くの subagent をオーケストレーションする | `workflows/*.js` | プロジェクトまたはグローバル | [動的ワークフロー](/ja/workflows) || スクリプトから多くの subagent をオーケストレーションする | `workflows/*.js` | プロジェクトまたはグローバル | [動的ワークフロー](/docs/ja/workflows) |
14771477| MCP 経由で外部ツールを接続する | `.mcp.json` | プロジェクトのみ | [MCP](/ja/mcp) || MCP 経由で外部ツールを接続する | `.mcp.json` | プロジェクトのみ | [MCP](/docs/ja/mcp) |
14781478| Claude がレスポンスをフォーマットする方法を変更する | `output-styles/*.md` | プロジェクトまたはグローバル | [出力スタイル](/ja/output-styles) || Claude がレスポンスをフォーマットする方法を変更する | `output-styles/*.md` | プロジェクトまたはグローバル | [出力スタイル](/docs/ja/output-styles) |
1479 1479
1480<h2 id="file-reference">1480<h2 id="file-reference">
1481 ファイルリファレンス1481 ファイルリファレンス
1486<Note>1486<Note>
1487 これらのファイルに入れたものをオーバーライドできるいくつかのことがあります。1487 これらのファイルに入れたものをオーバーライドできるいくつかのことがあります。
1488 1488
14891489 * 組織によってデプロイされた[管理設定](/ja/server-managed-settings)はすべてに優先します * 組織によってデプロイされた[管理設定](/docs/ja/server-managed-settings)はすべてに優先します
1490 * `--permission-mode` や `--settings` などの CLI フラグはそのセッションの `settings.json` をオーバーライドします1490 * `--permission-mode` や `--settings` などの CLI フラグはそのセッションの `settings.json` をオーバーライドします
14911491 * 一部の環境変数は同等の設定に優先しますが、これは異なります。各設定について[環境変数リファレンス](/ja/env-vars)を確認してください * 一部の環境変数は同等の設定に優先しますが、これは異なります。各設定について[環境変数リファレンス](/docs/ja/env-vars)を確認してください
1492 1492
14931493 完全な順序については[設定の優先順位](/ja/settings#settings-precedence)を参照してください。 完全な順序については[設定の優先順位](/docs/ja/settings#settings-precedence)を参照してください。
1494</Note>1494</Note>
1495 1495
1496ファイル名をクリックして、上記のエクスプローラーでそのノードを開きます。1496ファイル名をクリックして、上記のエクスプローラーでそのノードを開きます。
1497 1497
1498| ファイル | スコープ | コミット | 機能 | リファレンス |1498| ファイル | スコープ | コミット | 機能 | リファレンス |
1499| --------------------------------------------------- | -------------- | ---- | ------------------------------------------------------------------------- | --------------------------------------------------------------- |1499| --------------------------------------------------- | -------------- | ---- | ------------------------------------------------------------------------- | --------------------------------------------------------------- |
15001500| [`CLAUDE.md`](#ce-claude-md) | プロジェクトおよびグローバル | ✓ | 毎セッション読み込まれる指示 | [メモリ](/ja/memory) || [`CLAUDE.md`](#ce-claude-md) | プロジェクトおよびグローバル | ✓ | 毎セッション読み込まれる指示 | [メモリ](/docs/ja/memory) |
15011501| [`rules/*.md`](#ce-rules) | プロジェクトおよびグローバル | ✓ | トピックスコープの指示、オプションでパスゲート | [ルール](/ja/memory#organize-rules-with-claude/rules/) || [`rules/*.md`](#ce-rules) | プロジェクトおよびグローバル | ✓ | トピックスコープの指示、オプションでパスゲート | [ルール](/docs/ja/memory#organize-rules-with-claude/rules/) |
15021502| [`settings.json`](#ce-settings-json) | プロジェクトおよびグローバル | ✓ | パーミッション、hooks、環境変数、モデルデフォルト | [設定](/ja/settings) || [`settings.json`](#ce-settings-json) | プロジェクトおよびグローバル | ✓ | パーミッション、hooks、環境変数、モデルデフォルト | [設定](/docs/ja/settings) |
15031503| [`settings.local.json`](#ce-settings-local-json) | プロジェクトのみ | | 個人的なオーバーライド、自動 gitignore | [設定スコープ](/ja/settings#settings-files) || [`settings.local.json`](#ce-settings-local-json) | プロジェクトのみ | | 個人的なオーバーライド、自動 gitignore | [設定スコープ](/docs/ja/settings#settings-files) |
15041504| [`.mcp.json`](#ce-mcp-json) | プロジェクトのみ | ✓ | チーム共有 MCP サーバー | [MCP スコープ](/ja/mcp#mcp-installation-scopes) || [`.mcp.json`](#ce-mcp-json) | プロジェクトのみ | ✓ | チーム共有 MCP サーバー | [MCP スコープ](/docs/ja/mcp#mcp-installation-scopes) |
15051505| [`.worktreeinclude`](#ce-worktreeinclude) | プロジェクトのみ | ✓ | 新しい worktrees にコピーする gitignore ファイル | [Worktrees](/ja/worktrees#copy-gitignored-files-into-worktrees) || [`.worktreeinclude`](#ce-worktreeinclude) | プロジェクトのみ | ✓ | 新しい worktrees にコピーする gitignore ファイル | [Worktrees](/docs/ja/worktrees#copy-gitignored-files-into-worktrees) |
15061506| [`skills/<name>/SKILL.md`](#ce-skills) | プロジェクトおよびグローバル | ✓ | `/name` で呼び出される、または自動呼び出される再利用可能なプロンプト | [Skills](/ja/skills) || [`skills/<name>/SKILL.md`](#ce-skills) | プロジェクトおよびグローバル | ✓ | `/name` で呼び出される、または自動呼び出される再利用可能なプロンプト | [Skills](/docs/ja/skills) |
15071507| [`commands/*.md`](#ce-commands) | プロジェクトおよびグローバル | ✓ | シングルファイルプロンプト。skills と同じメカニズム | [Skills](/ja/skills) || [`commands/*.md`](#ce-commands) | プロジェクトおよびグローバル | ✓ | シングルファイルプロンプト。skills と同じメカニズム | [Skills](/docs/ja/skills) |
15081508| [`output-styles/*.md`](#ce-output-styles) | プロジェクトおよびグローバル | ✓ | カスタムシステムプロンプトセクション | [出力スタイル](/ja/output-styles) || [`output-styles/*.md`](#ce-output-styles) | プロジェクトおよびグローバル | ✓ | カスタムシステムプロンプトセクション | [出力スタイル](/docs/ja/output-styles) |
15091509| [`agents/*.md`](#ce-agents) | プロジェクトおよびグローバル | ✓ | 独自のプロンプトとツールを持つ subagent 定義 | [Subagents](/ja/sub-agents) || [`agents/*.md`](#ce-agents) | プロジェクトおよびグローバル | ✓ | 独自のプロンプトとツールを持つ subagent 定義 | [Subagents](/docs/ja/sub-agents) |
15101510| [`workflows/*.js`](#ce-workflows) | プロジェクトおよびグローバル | ✓ | Claude によって書かれた動的ワークフロースクリプト、`/workflows` から保存。各ファイルは `/<name>` コマンドになります | [動的ワークフロー](/ja/workflows) || [`workflows/*.js`](#ce-workflows) | プロジェクトおよびグローバル | ✓ | Claude によって書かれた動的ワークフロースクリプト、`/workflows` から保存。各ファイルは `/<name>` コマンドになります | [動的ワークフロー](/docs/ja/workflows) |
15111511| [`agent-memory/<name>/`](#ce-agent-memory) | プロジェクトおよびグローバル | ✓ | subagents の永続メモリ | [永続メモリ](/ja/sub-agents#enable-persistent-memory) || [`agent-memory/<name>/`](#ce-agent-memory) | プロジェクトおよびグローバル | ✓ | subagents の永続メモリ | [永続メモリ](/docs/ja/sub-agents#enable-persistent-memory) |
15121512| [`~/.claude.json`](#ce-claude-json) | グローバルのみ | | アプリ状態、OAuth、UI トグル、個人 MCP サーバー | [グローバル設定](/ja/settings#global-config-settings) || [`~/.claude.json`](#ce-claude-json) | グローバルのみ | | アプリ状態、OAuth、UI トグル、個人 MCP サーバー | [グローバル設定](/docs/ja/settings#global-config-settings) |
15131513| [`projects/<project>/memory/`](#ce-global-projects) | グローバルのみ | | Auto memory:Claude のセッション間のメモ | [Auto memory](/ja/memory#auto-memory) || [`projects/<project>/memory/`](#ce-global-projects) | グローバルのみ | | Auto memory:Claude のセッション間のメモ | [Auto memory](/docs/ja/memory#auto-memory) |
15141514| [`keybindings.json`](#ce-keybindings) | グローバルのみ | | カスタムキーボードショートカット | [キーバインディング](/ja/keybindings) || [`keybindings.json`](#ce-keybindings) | グローバルのみ | | カスタムキーボードショートカット | [キーバインディング](/docs/ja/keybindings) |
15151515| [`themes/*.json`](#ce-themes) | グローバルのみ | | カスタムカラーテーマ | [カスタムテーマ](/ja/terminal-config#create-a-custom-theme) || [`themes/*.json`](#ce-themes) | グローバルのみ | | カスタムカラーテーマ | [カスタムテーマ](/docs/ja/terminal-config#create-a-custom-theme) |
1516 1516
1517<h2 id="troubleshoot-configuration">1517<h2 id="troubleshoot-configuration">
1518 設定をトラブルシューティングする1518 設定をトラブルシューティングする
1519</h2>1519</h2>
1520 1520
15211521設定、hook、またはファイルが有効になっていない場合は、[設定をデバッグする](/ja/debug-your-config)を参照して、検査コマンドと症状優先ルックアップテーブルを確認してください。設定、hook、またはファイルが有効になっていない場合は、[設定をデバッグする](/docs/ja/debug-your-config)を参照して、検査コマンドと症状優先ルックアップテーブルを確認してください。
1522 1522
1523<h2 id="application-data">1523<h2 id="application-data">
1524 アプリケーションデータ1524 アプリケーションデータ
1530 自動的にクリーンアップされる1530 自動的にクリーンアップされる
1531</h3>1531</h3>
1532 1532
15331533以下のパス内のファイルは、[`cleanupPeriodDays`](/ja/settings#available-settings) より古い場合、起動時に削除されます。デフォルトは 30 日です。以下のパス内のファイルは、[`cleanupPeriodDays`](/docs/ja/settings#available-settings) より古い場合、起動時に削除されます。デフォルトは 30 日です。
1534 1534
1535| `~/.claude/` の下のパス | コンテンツ |1535| `~/.claude/` の下のパス | コンテンツ |
1536| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |1536| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1537| `projects/<project>/<session>.jsonl` | 完全な会話トランスクリプト:すべてのメッセージ、ツール呼び出し、ツール結果 |1537| `projects/<project>/<session>.jsonl` | 完全な会話トランスクリプト:すべてのメッセージ、ツール呼び出し、ツール結果 |
15381538| `projects/<project>/<session>/subagents/` | [Subagent](/ja/sub-agents) 会話トランスクリプト。親セッショントランスクリプトが古くなると一緒に削除されます || `projects/<project>/<session>/subagents/` | [Subagent](/docs/ja/sub-agents) 会話トランスクリプト。親セッショントランスクリプトが古くなると一緒に削除されます |
1539| `projects/<project>/<session>/tool-results/` | 大きなツール出力を別ファイルにこぼしたもの |1539| `projects/<project>/<session>/tool-results/` | 大きなツール出力を別ファイルにこぼしたもの |
15401540| `file-history/<session>/` | Claude が変更したファイルの編集前スナップショット。[チェックポイント復元](/ja/checkpointing)に使用されます。最新 100 個のチェックポイントのスナップショットを保持します。保持されているチェックポイントが参照していないスナップショットファイルは削除されます。ただし、各ファイルの最初のスナップショットは除きます || `file-history/<session>/` | Claude が変更したファイルの編集前スナップショット。[チェックポイント復元](/docs/ja/checkpointing)に使用されます。最新 100 個のチェックポイントのスナップショットを保持します。保持されているチェックポイントが参照していないスナップショットファイルは削除されます。ただし、各ファイルの最初のスナップショットは除きます |
15411541| `plans/` | [プランモード](/ja/permission-modes#analyze-before-you-edit-with-plan-mode)中に書き込まれたプランファイル || `plans/` | [プランモード](/docs/ja/permission-modes#analyze-before-you-edit-with-plan-mode)中に書き込まれたプランファイル |
1542| `debug/` | セッションごとのデバッグログ。`--debug` で開始するか `/debug` を実行した場合のみ書き込まれます |1542| `debug/` | セッションごとのデバッグログ。`--debug` で開始するか `/debug` を実行した場合のみ書き込まれます |
1543| `paste-cache/`、`image-cache/` | 大きな貼り付けと添付画像のコンテンツ |1543| `paste-cache/`、`image-cache/` | 大きな貼り付けと添付画像のコンテンツ |
1544| `session-env/` | セッションごとの環境メタデータ |1544| `session-env/` | セッションごとの環境メタデータ |
1545| `tasks/` | タスクツールによって書き込まれたセッションごとのタスクリスト |1545| `tasks/` | タスクツールによって書き込まれたセッションごとのタスクリスト |
15461546| `shell-snapshots/` | 起動時にキャプチャされたエイリアス、関数、シェルオプション。[Bash ツール](/ja/tools-reference#bash-tool-behavior)によって各コマンドに適用されます。正常な終了時に削除されます。スイープはクラッシュ後に残されたものをクリアします。 || `shell-snapshots/` | 起動時にキャプチャされたエイリアス、関数、シェルオプション。[Bash ツール](/docs/ja/tools-reference#bash-tool-behavior)によって各コマンドに適用されます。正常な終了時に削除されます。スイープはクラッシュ後に残されたものをクリアします。 |
1547| `backups/` | 設定マイグレーション前に取得された `~/.claude.json` のタイムスタンプ付きコピー |1547| `backups/` | 設定マイグレーション前に取得された `~/.claude.json` のタイムスタンプ付きコピー |
1548| `feedback-bundles/` | `/feedback` によってサードパーティプロバイダーに書き込まれた編集済みトランスクリプトアーカイブ。Anthropic 認証情報が設定されていない場合、Anthropic アカウントチームに送信するため |1548| `feedback-bundles/` | `/feedback` によってサードパーティプロバイダーに書き込まれた編集済みトランスクリプトアーカイブ。Anthropic 認証情報が設定されていない場合、Anthropic アカウントチームに送信するため |
1549| `todos/`、`statsig/`、`logs/` | 古いバージョンのレガシーディレクトリ。現在は書き込まれません。スイープはコンテンツを削除してから空のディレクトリを削除します。 |1549| `todos/`、`statsig/`、`logs/` | 古いバージョンのレガシーディレクトリ。現在は書き込まれません。スイープはコンテンツを削除してから空のディレクトリを削除します。 |
1558| ---------------------- | -------------------------------------------------------------------------------------- |1558| ---------------------- | -------------------------------------------------------------------------------------- |
1559| `history.jsonl` | 入力したすべてのプロンプト(タイムスタンプとプロジェクトパス付き)。上矢印リコール用に使用 |1559| `history.jsonl` | 入力したすべてのプロンプト(タイムスタンプとプロジェクトパス付き)。上矢印リコール用に使用 |
1560| `stats-cache.json` | `/usage` で表示される集計トークンおよびコスト数 |1560| `stats-cache.json` | `/usage` で表示される集計トークンおよびコスト数 |
15611561| `remote-settings.json` | 組織の[サーバー管理設定](/ja/server-managed-settings)のキャッシュコピー。組織が設定を構成している場合のみ存在します。各起動時に更新されます。 || `remote-settings.json` | 組織の[サーバー管理設定](/docs/ja/server-managed-settings)のキャッシュコピー。組織が設定を構成している場合のみ存在します。各起動時に更新されます。 |
1562 1562
1563その他の小さなキャッシュおよびロックファイルは、使用する機能に応じて表示され、削除しても安全です。1563その他の小さなキャッシュおよびロックファイルは、使用する機能に応じて表示され、削除しても安全です。
1564 1564
1569トランスクリプトと履歴は保存時に暗号化されません。OS ファイルパーミッションのみが保護です。ツールが `.env` ファイルを読み込むか、コマンドが認証情報を出力する場合、その値は `projects/<project>/<session>.jsonl` に書き込まれます。露出を減らすには:1569トランスクリプトと履歴は保存時に暗号化されません。OS ファイルパーミッションのみが保護です。ツールが `.env` ファイルを読み込むか、コマンドが認証情報を出力する場合、その値は `projects/<project>/<session>.jsonl` に書き込まれます。露出を減らすには:
1570 1570
1571* `cleanupPeriodDays` を低くしてトランスクリプトの保持期間を短縮します1571* `cleanupPeriodDays` を低くしてトランスクリプトの保持期間を短縮します
15721572* [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](/ja/env-vars) 環境変数を設定して、任意のモードでトランスクリプトとプロンプト履歴の書き込みをスキップします。非対話型モードでは、代わりに `-p` と一緒に `--no-session-persistence` を渡すか、Agent SDK で `persistSession: false` を設定できます。* [`CLAUDE_CODE_SKIP_PROMPT_HISTORY`](/docs/ja/env-vars) 環境変数を設定して、任意のモードでトランスクリプトとプロンプト履歴の書き込みをスキップします。非対話型モードでは、代わりに `-p` と一緒に `--no-session-persistence` を渡すか、Agent SDK で `persistSession: false` を設定できます。
15731573* [パーミッションルール](/ja/permissions)を使用して認証情報ファイルの読み込みを拒否します* [パーミッションルール](/docs/ja/permissions)を使用して認証情報ファイルの読み込みを拒否します
1574 1574
1575<h3 id="clear-local-data">1575<h3 id="clear-local-data">
1576 ローカルデータをクリアする1576 ローカルデータをクリアする
1627 関連リソース1627 関連リソース
1628</h2>1628</h2>
1629 1629
16301630* [Claude のメモリを管理する](/ja/memory):CLAUDE.md、rules、auto memory を書き込んで整理します* [Claude のメモリを管理する](/docs/ja/memory):CLAUDE.md、rules、auto memory を書き込んで整理します
16311631* [設定を構成する](/ja/settings):パーミッション、hooks、環境変数、モデルデフォルトを設定します* [設定を構成する](/docs/ja/settings):パーミッション、hooks、環境変数、モデルデフォルトを設定します
16321632* [Skills を作成する](/ja/skills):再利用可能なプロンプトとワークフローを構築します* [Skills を作成する](/docs/ja/skills):再利用可能なプロンプトとワークフローを構築します
16331633* [Subagents を構成する](/ja/sub-agents):独自のコンテキストを持つ特化したエージェントを定義します* [Subagents を構成する](/docs/ja/sub-agents):独自のコンテキストを持つ特化したエージェントを定義します