AIToday
Large Language ModelsAI Coding AssistantsAI Business & IndustryZenn AI/MLPublished: Nov 13, 2026, 04:00 JST

Split CLAUDE.md: shared rules to ~/.claude/CLAUDE.md, rest per repo

Send on LINE
Split CLAUDE.md: shared rules to ~/.claude/CLAUDE.md, rest per repo

3 Key Points

  1. What happened

    The author moved rules shared across all repositories (source control, where records go, reply language) into ~/.claude/CLAUDE.md, and kept purpose, layout, build/test commands and tool-specific constraints in each repository's own CLAUDE.md.

  2. Why it matters

    Fixing a shared rule in one place updates every repository, and each tool no longer reads commands that only belong to another project.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The author's setup addresses a duplication problem that appears as internal tools multiply. Writing CLAUDE.md from scratch in each repository meant copying rules like "add only the files you changed" and "record decision reasons elsewhere," which could drift out of sync when only one copy was updated. Pushing everything into the user-level file instead meant every repository read build commands that mattered only to one tool.

The split was tested on two fictional repositories, an equipment-lending tool and a daily-report aggregator. Asking each folder which file held its rules returned the shared rules and the repository-specific ones with file names attached, and commands from the other tool did not appear. The test also surfaced caveats: the user-level file is not shared with teammates who clone the repository, and a missing reply-language instruction produced an English answer to a Japanese question.

FAQ
How did the author decide what goes in the user-level CLAUDE.md versus the repository one?
He asked whether reading that one line in a different repository would confuse or mislead Claude Code. If not, it went to the user-level file; if it would, it went into the repository.
How can I verify that both CLAUDE.md files are actually being loaded?
The author recommends checking /context's "Memory Files" section, because the /memory list can show files that do not yet exist. He ran claude -p with /context all in the tool's folder and saw both the User and Project entries.
What happens to user-level CLAUDE.md rules when a teammate clones the repository?
They are not shared: Claude Code itself noted that user-level rules are invisible to anyone who clones the repository, so team-wide rules should also be written on the repository side.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleFamilies in seven cities protest Google's AI-only school Search