Claude Code Settings and Configuration Files
Explore the Claude Code configuration hierarchy, understanding the roles and precedence of settings files and how CLAUDE.md provides persistent project context. This lesson helps you master managing project versus user settings, permissions, and where to place configuration elements to ensure reliable AI system behavior.
Claude Code reads configuration from multiple files in a defined priority order. Understanding which file governs which setting, and which level takes precedence when files conflict, is tested directly on the exam. This lesson maps the complete configuration hierarchy, explains the role of each file, and covers CLAUDE.md as the primary mechanism for supplying project context that persists across sessions. By the end of this lesson, we will be able to:
Name the four configuration files in the hierarchy and their scope.
Explain which settings scope (project vs. user) takes precedence for a given setting.
Write a
CLAUDE.mdfile that gives Claude persistent project context.Identify which settings belong in version-controlled files vs. local-only files.
The configuration hierarchy
Claude Code resolves settings by reading four files in a fixed order. Later files in the order override earlier ones for the same key:
File | Scope | Version Controlled? | Purpose |
| User-global | No | Default behaviors and permissions for all projects |
| Project-shared | Yes | Team-wide project settings committed to the repository |
| Project-local | No | Personal overrides for the current project (in |
| Project context | Yes | Persistent instructions and project knowledge for Claude |
The resolution order means that .claude/settings.local.json can override anything in .claude/settings.json, which can override anything in ~/.claude/settings.json. CLAUDE.md is not a ...