settings.json: The Config System
settings.json is where Claude Code's configuration lives — permissions, hooks, environment variables, model defaults, and more. Understanding the tiers is the key.
The tiers (most-global → most-specific)
Later (more specific) tiers override earlier ones:
- Enterprise / managed — policy set by an org admin. Wins over everything.
- User —
~/.claude/settings.json. Your defaults across all projects. - Project (shared) —
.claude/settings.json, committed to the repo. Team-wide. - Project (personal) —
.claude/settings.local.json, git-ignored. Your overrides for this repo.
:::tip Commit the shared file, ignore the local one
Put team conventions in .claude/settings.json (committed). Put personal tweaks and machine-specific paths in .claude/settings.local.json (git-ignored). This keeps the team consistent without forcing your preferences on others.
:::
What you'll commonly set
permissions— allow/ask/deny rules. See Permissions.hooks— commands that run at lifecycle events. See Hooks.env— environment variables for the session.- Model / behaviour defaults — e.g. preferred model.
Editing safely
- Keep it valid JSON (a trailing comma will break it).
- Prefer narrow permission rules over broad ones.
- Never put secrets in a committed file — use
envreferences or a secrets manager.
Ready-to-copy starting files live in Hooks & settings.json Recipes.