講座 › 分野3 Claude Codeの設定とワークフロー
3.1 CLAUDE.mdの階層と構成
配点 3.3%CLAUDE.md hierarchy
CLAUDE.md は、置き場所によって、誰に効くかが決まる。個人用は自分だけ、プロジェクト用はチーム全員。
未読
置き場所で、効く相手が決まる 読了

ユーザーの ~/.claude/CLAUDE.md は、自分の全プロジェクトに効きますが、自分だけのものです。プロジェクトの CLAUDE.md は、版管理でチームに共有されます。個人の事情を書く CLAUDE.local.md もあります。
出典:How Claude remembers your project
Personal preferences for all projects Code styling preferences, personal tooling shortcuts Only you (all projects)https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
出典:How Claude remembers your project
A project CLAUDE.md can be stored in either ./CLAUDE.md or ./.claude/CLAUDE.md.https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
That user-level settings apply only to that user—instructions in ~/.claude/CLAUDE.md are not shared with teammates via version controlhttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
読み込みの仕組み 読了

起動したとき、作業フォルダーより上の階層の CLAUDE.md が読み込まれ、下位のフォルダーのものは必要になったときに読み込まれます。なお、CLAUDE.md は文脈として読まれるもので、強制される設定ではありません。
出典:How Claude remembers your project
CLAUDE.md and CLAUDE.local.md files in the directory hierarchy above the working directory are loaded at launch. Files in subdirectories load on demand.https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
出典:How Claude remembers your project
Claude treats them as context, not enforced configuration.https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
新しい人に指示が届かないとき 読了

新しく入った人にだけ指示が効かないときは、その指示が、個人用の置き場所に書かれていることを疑います。チーム全員に効かせたいなら、プロジェクトのほうに移します。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Diagnosing configuration hierarchy issues (e.g., a new team member not receiving instructions because they're in user-level rather than project-level configuration)https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
大きくなったら分ける:@import と rules 読了

@ の記法で、別のファイルを取り込めます。取り込みの相対パスは、取り込む側のファイルを基準に解決されます。さらに、.claude/rules/ にテーマ別のファイルを置いて、ひとつの巨大なファイルを避けます。目安は、1ファイル200行未満です。
出典:How Claude remembers your project
CLAUDE.md files can import additional files using @path/to/import syntax.https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
出典:How Claude remembers your project
Relative paths resolve relative to the file containing the import, not the working directory.https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
出典:How Claude remembers your project
For larger projects, you can organize instructions into multiple files using the .claude/rules/ directory.https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Splitting large CLAUDE.md files into focused topic-specific files in .claude/rules/ (e.g., testing.md, api-conventions.md, deployment.md)https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:How Claude remembers your project
target under 200 lines per CLAUDE.md filehttps://code.claude.com/docs/en/memory.md(取得 2026-11-20)
パッケージごとに、必要な規約だけを取り込む 読了

モノレポでは、各パッケージの CLAUDE.md から、そのパッケージに関係する規約のファイルだけを取り込みます。担当者の知識で、必要なものを選べます。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Using @import to selectively include relevant standards files in each package's CLAUDE.md based on maintainer domain knowledgehttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
読み込み状況の確認 読了

挙動がセッションごとに違うときは、読み込まれているメモリのファイルを確認します。/memory は CLAUDE.md の編集の入口で、/context all でも、読み込まれたファイルの一覧を見られます。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Using the /memory command to verify which memory files are loaded and diagnose inconsistent behavior across sessionshttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:Commands
/memory Edit CLAUDE.md files, enable or disable auto memory, and view auto memory entrieshttps://code.claude.com/docs/en/commands.md(取得 2026-11-20)
出典:How Claude remembers your project
To confirm the file loaded, run /context all in a session and check the list under Memory files.https://code.claude.com/docs/en/memory.md(取得 2026-11-20)
試験のポイント
- 個人用(~/.claude)は自分だけ。チームに効かせるのはプロジェクト側。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
That user-level settings apply only to that user—instructions in ~/.claude/CLAUDE.md are not shared with teammates via version control
https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20) - 大きな CLAUDE.md は、@ の取り込みと .claude/rules/ で分ける。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Splitting large CLAUDE.md files into focused topic-specific files in .claude/rules/ (e.g., testing.md, api-conventions.md, deployment.md)
https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20) - 読み込み状況は、/memory や /context all で確かめる。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Using the /memory command to verify which memory files are loaded and diagnose inconsistent behavior across sessions
https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)