Claude Code Settings and Configuration Files
Explore the hierarchy and role of Claude Code configuration files and how they determine settings and permissions. Understand the difference between user-global, project, and local override files and learn to write a CLAUDE.md file that provides persistent, project-specific context for Claude during sessions.
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 ...