Team configuration is a placement problem. Every rule, tool or capability you want Claude Code to have for a team has two properties: who it reaches (its scope) and how hard it binds (its guarantee). Scenario questions almost always hinge on a mismatch between the two: a compliance rule left as advice, a personal preference committed for everyone, or a team convention that lives only on one developer's laptop.
Three different guarantees
- Guidance.
CLAUDE.md,.claude/rules/and auto memory are loaded into the context window. The memory docs say Claude treats them as context, not enforced configuration, and that if two rules contradict each other Claude may pick one arbitrarily. - Enforcement. Permission rules, permission modes, sandboxing and hooks are applied by Claude Code itself, not decided by the model. A
PreToolUsehook script that exits with code 2 blocks the tool call every time. - On-demand capability. Skills keep only their description in context until they are invoked; subagents work in their own context window; MCP servers add external tools.
Rule of thumb: “we do it this way here” goes in CLAUDE.md or a path-scoped rule; “this must never (or always) happen” goes in a permission rule, the sandbox or a hook; an occasional workflow goes in a skill.
Common exam distractor
Answers that say the “more specific” or “closer” CLAUDE.md wins, or that a CLAUDE.md line guarantees a rule, are wrong. Files are concatenated, ordered from broad to specific (a project file appears after a user file; files nearer your working directory are read last), and that is load order, not precedence. Only settings.json has a real precedence stack.
Placing instructions: scope decides who receives them
| Scope | Location | Reaches |
|---|---|---|
| Managed policy | /Library/Application Support/ClaudeCode/CLAUDE.md (macOS), /etc/claude-code/CLAUDE.md (Linux, WSL), C:\Program Files\ClaudeCode\CLAUDE.md (Windows) | Everyone in the organisation; cannot be excluded |
| User | ~/.claude/CLAUDE.md | You, in every project; never travels through git |
| Project | ./CLAUDE.md or ./.claude/CLAUDE.md | The team, via source control |
| Local | ./CLAUDE.local.md (gitignore it) | You, in this project |
Files in the directory tree above your working directory load at launch; CLAUDE.md files in subdirectories load on demand, when Claude reads a file there. .claude/rules/*.md files without paths frontmatter load at launch; with paths they load when Claude reads matching files, which scopes a convention such as test style across many directories without a file in each.
Keep each file short (the docs target under 200 lines). @path imports aid organisation but still load at launch, so they save no context; in a monorepo, claudeMdExcludes skips other teams' files. To see what loaded, run /context and read the Memory files list; /memory lists and opens the files. Neither loads anything.
The new-teammate diagnosis
Developer A gets the team conventions; developer B, on the same repo and branch, does not. The conventions are almost certainly in A's ~/.claude/CLAUDE.md (or an untracked CLAUDE.local.md). Move them to the committed project file. Check where the configuration lives before touching wording.
Settings: scopes, precedence and what merges
Claude Code reads ~/.claude/settings.json (user), .claude/settings.json (shared project, commit it), .claude/settings.local.json (personal to one project, kept out of git) and managed settings delivered by the organisation. The same key resolves from the highest source that sets it: managed > command line > project local > shared project > user. List keys such as permissions.allow are combined across files rather than replaced, so a developer can add entries but cannot remove a managed rule. Permission rules evaluate deny, then ask, then allow; the first match wins and an allow rule cannot carve an exception out of a deny.
Common misplacements: permissions, hooks and env belong in a settings file, not in ~/.claude.json (app state); project MCP servers belong in .mcp.json at the repository root, not under a mcpServers key in settings.json; and some committed content waits until each teammate trusts the folder.
Sharing skills, subagents and MCP servers
- Skills live in
.claude/skills/<name>/SKILL.md. Old.claude/commands/files still work. Setdisable-model-invocation: trueon workflows with side effects so only a person triggers them. On a name collision, enterprise beats personal, which beats project. - Subagents live in
.claude/agents/; check them in. - MCP servers have local (default), project and user scope. Project scope writes
.mcp.json, which is shared through git; interactive sessions ask for approval before using a project server, butclaude -pcannot show that prompt and loads them without asking. Use${VAR}expansion for secrets so tokens are never committed. The whole server entry from the highest-priority scope wins; fields are not merged. - Plugins bundle skills, hooks, subagents and MCP servers for distribution across repositories.
Managed policy and rollout
Managed settings sit above every other level and reach the fleet by one of four routes, highest priority first: server-managed settings from the claude.ai admin console (Teams and Enterprise plans), an OS policy (macOS plist or Windows HKLM registry), a file-based managed-settings.json (with an optional managed-settings.d/ directory) in a system directory, and the user-writable HKCU registry, which is a convenience default rather than an enforcement channel. By default the highest source that carries a policy key supplies the policy for most keys. Deployments on Bedrock, Google Cloud or Foundry do not fetch server-managed settings directly, so they use file or OS delivery (or a Claude apps gateway).
What to enforce is an architectural choice. The admin-setup page lists the levers: permission lockdown (allowManagedPermissionRulesOnly, permissions.disableBypassPermissionsMode), sandboxing, a managed CLAUDE.md, MCP allow/deny lists (allowedMcpServers, deniedMcpServers, allowManagedMcpServersOnly), plugin marketplace limits, allowManagedHooksOnly, availableModels, login enforcement and a version floor. Enforce the small set that is irreversible or compliance-bound; leave conventions to repository-level guidance that each team owns and reviews like code.
Limits of enforcement worth knowing
A managed model is a default, not a lock: availableModels restricts the choice. A machine administrator can edit a managed file, which is why MDM redeploys it and why HKLM and macOS managed preferences exist. Managed settings bind Claude Code only. Bash rules match the command text, so Bash(rm *) does not stop /bin/rm, and denying WebFetch does not stop curl through Bash; pair rules with the OS-level sandbox or a hook when the restriction must hold. Verify a rollout by running /status and reading the Setting sources line.