Search⌘ K
AI Features

Claude Code Settings and Configuration Files

Explore Claude Code's configuration system to understand the hierarchy and scope of its four key settings files. Learn to write CLAUDE.md for persistent project context and distinguish which settings belong in version-controlled files versus local overrides. This lesson equips you to manage project permissions, environment variables, and user preferences effectively to ensure consistent 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.md file 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

~/.claude/settings.json

User-global

No

Default behaviors and permissions for all projects

.claude/settings.json

Project-shared

Yes

Team-wide project settings committed to the repository

.claude/settings.local.json

Project-local

No

Personal overrides for the current project (in .gitignore)

CLAUDE.md

Project context

Yes

Persistent instructions and project knowledge for Claude

The resolution order means that .claude/settings.local.json can override ...