Where Claude Code Settings Live: Personal, Project and Organisation
Why This Matters
“It works on my machine” has a Claude Code version: one developer’s personal rules make the agent behave differently for everyone else. Before you write a single rule, decide who it is for: the organisation, the whole team, or just you. The exam loves this question, because the answer is always about ownership.
Four scopes
Based on the Claude Code settings documentation (December 2026). Locations change between versions; check the docs when in doubt.
| What | Organisation (enforced) | User (just me, all projects) | Project (team, in git) | Local (just me, this project) |
|---|---|---|---|---|
| Context (CLAUDE.md) | Deployed by your organisation | ~/.claude/CLAUDE.md | CLAUDE.md or .claude/CLAUDE.md | CLAUDE.local.md |
| Settings and permissions | managed-settings.json, device management or the claude.ai console | ~/.claude/settings.json | .claude/settings.json | .claude/settings.local.json |
| Rules | ~/.claude/rules/ | .claude/rules/ | ||
| Subagents | ~/.claude/agents/ | .claude/agents/ | ||
| Skills | ~/.claude/skills/ | .claude/skills/ | ||
| MCP servers | ~/.claude.json | .mcp.json | ~/.claude.json (per project) |
Which one wins
When the same setting is set in several places, the order is:
- Managed (organisation): cannot be overridden
- Command line: settings passed with
--settingsfor one session (other flags, such as--model, are not part of this order) - Local: your personal overrides in this project
- Project: the team’s shared settings
- User: your personal defaults
Permission rules work differently: they are combined across scopes, and a deny anywhere blocks the action. So the team can forbid reading .env in project settings, and no personal setting can quietly re-allow it.
What goes where
| Setting | Scope | Why |
|---|---|---|
“Run npm run check before saying a task is done” | Project CLAUDE.md | Everyone working on TestPilot needs it |
Deny reading .env | Project settings (or managed) | A team-wide safety rule |
| Your path to a local Docker socket | Local settings | Only true on your machine |
| “Answer in Dutch” | User CLAUDE.md | Your preference, every project |
| Block all tools that send data outside the company | Managed | Security policy, not a team choice |
The testpilot MCP server | Project .mcp.json | Everyone should get the same tools |
Keep personal files out of git
.claude/settings.local.json and CLAUDE.local.md are personal. When Claude Code itself creates settings.local.json, it adds that file to your global git ignore list; a file you create by hand, and CLAUDE.local.md, you have to ignore yourself. Check that both are ignored in TestPilot.
Look at TestPilot
TestPilot already has a project CLAUDE.md that imports AGENTS.md, and (after module 4) a .mcp.json. In this module you add project settings, rules, a skill and hooks.
Exercise
Decide the right scope for these five settings and write down why:
- Allow
npm testwithout asking. - Use the cheaper model by default for your own experiments.
- Never edit files in
fixtures/golden/without a reason. - Your editor’s path for opening files.
- Forbid sending source code to MCP servers outside the company.
Compare with solution/lesson-52-claude-code, which has the Claude Code setup for lessons 42–52. Its docs/claude-code-demo.md walks you through all of module 6 in one session.