Skip to main content

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.

WhatOrganisation (enforced)User (just me, all projects)Project (team, in git)Local (just me, this project)
Context (CLAUDE.md)Deployed by your organisation~/.claude/CLAUDE.mdCLAUDE.md or .claude/CLAUDE.mdCLAUDE.local.md
Settings and permissionsmanaged-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

Claude Code settings scopes from highest to lowest precedence: managed, command line, local, project, user; permission rules combine and a deny anywhere blocks

When the same setting is set in several places, the order is:

  1. Managed (organisation): cannot be overridden
  2. Command line: settings passed with --settings for one session (other flags, such as --model, are not part of this order)
  3. Local: your personal overrides in this project
  4. Project: the team’s shared settings
  5. 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

SettingScopeWhy
“Run npm run check before saying a task is done”Project CLAUDE.mdEveryone working on TestPilot needs it
Deny reading .envProject settings (or managed)A team-wide safety rule
Your path to a local Docker socketLocal settingsOnly true on your machine
“Answer in Dutch”User CLAUDE.mdYour preference, every project
Block all tools that send data outside the companyManagedSecurity policy, not a team choice
The testpilot MCP serverProject .mcp.jsonEveryone 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:

  1. Allow npm test without asking.
  2. Use the cheaper model by default for your own experiments.
  3. Never edit files in fixtures/golden/ without a reason.
  4. Your editor’s path for opening files.
  5. 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.