Home / A structured installation
The global CLAUDE.md, a constitution
The global CLAUDE.md now targets a length in lines rather than in kilobytes, and it does not override the other CLAUDE.md files by overwriting them: the four scopes, managed, user, project, local, are concatenated in the context from the broadest to the most specific.
The current Claude Code documentation targets a length in lines for a CLAUDE.md, not a weight in kilobytes: fewer than 200 lines per file, checked on 2 September 2026, because a longer file consumes more context and reduces adherence to the rules it contains. A separate hard cap also exists on top of this target, a file over 4 MiB is simply ignored, but this cap is not a target to aim for, only a limit never to approach.
A stack, not an overwrite
A global CLAUDE.md does not act alone. The documentation distinguishes four scopes loaded in a precise order, from the broadest to the most specific: the policy managed by an organisation, the user instructions of the ~/.claude/CLAUDE.md file, the project instructions of the file at the root of the repository, then the local instructions of the CLAUDE.local.md file. These four files, when they exist, are concatenated in the context rather than overwriting one another: the one loaded last is simply read last by the model, it removes nothing that came before.
# CLAUDE.md global, extrait (moins de 200 lignes au total)
## Règles absolues
- Ne jamais committer sans qu'on le demande explicitement.
## Routine de session
- Lire la mémoire de fichiers avant de répondre à la première question.
## Pointeurs
- Voir skills/ pour les workflows récurrents du projet en cours.
Regenerating rather than rewriting from scratch
The /init command generates a starting CLAUDE.md by actually analysing the open repository, build commands, test instructions, conventions discovered. If a CLAUDE.md already exists, /init proposes improvements instead of overwriting it. A recent environment variable, CLAUDE_CODE_NEW_INIT=1, activates a multi phase interactive mode that explores the repository through a subagent before proposing a file to validate, absent from older versions of the command.
Before every rewrite of the global file, archive the version you are replacing rather than overwriting it: this is the only way to go back if the new version removes a rule that mattered. The module map places this constitution as the second of the seven elements, right after the engine installed and connected in the previous lesson.
The loading order of a CLAUDE.md, from broadest to most specific
A developer opens her global CLAUDE.md file and counts 340 lines. She moves half the content to a separate note, then restarts a session in a repository where a project CLAUDE.md already exists at the root.
Write in one sentence what this situation establishes, and in one sentence what it does not establish.
What this establishes: This situation establishes that the new session has both the content of the shortened global CLAUDE.md and that of the project CLAUDE.md, the two being concatenated in its context.
What this does not establish: It does not establish that the rules of the project CLAUDE.md replace those of the global file, since the two files add to each other rather than excluding one another.
The three most common miscalibrations
- Too broad This situation proves that the project CLAUDE.md now has absolute priority over the global CLAUDE.md in all this developer's future sessions.
- Too narrow This situation shows nothing more than a change in the number of lines in a text file.
- Beside the point This situation shows that the project repository also contains an already configured skills folder.
- The length target for a CLAUDE.md is now measured in lines, fewer than 200, rather than in kilobytes, with a separate hard cap of 4 MiB beyond which the whole file is ignored.
- The four scopes of CLAUDE.md, managed policy, user, project, local, do not overwrite each other, they are concatenated in the context in an order from the broadest to the most specific.
- A local file loaded last does not cancel any rule set by the broader files, it simply gets added after them in what the model reads.
- The /init command generates a CLAUDE.md from an actual analysis of the open repository, and proposes improvements rather than overwriting an already present file.
- Archiving the replaced version before every rewrite of the global CLAUDE.md remains the only way to go back if the new version removes a rule that mattered.
Open your global CLAUDE.md now and count its lines with your editor: beyond 200, move the surplus to a note the file points to rather than letting it keep growing, and archive the version you are replacing before writing the new one.
Every datable claim in this lesson links here to the public text behind it. A source that does not open proves nothing.
- Claude Code, memory, recommended length of the CLAUDE.md, loading order and /init consultée le 2026-09-02