Search⌘ K
AI Features

Claude Code Settings and Configuration Files

Explore the complete Claude Code configuration system by understanding the four key configuration files, their priority order, and scope. Learn how to write CLAUDE.md to provide Claude with persistent project context, differentiate which settings belong in version-controlled versus local files, and manage permissions effectively across user-global and project-specific files.

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 anything in ...