Skip to content

🌐 日本語

Claude Code Configuration File Reference

NOTE

Comprehensive reference of files and directories that make up Claude Code project configuration. Designed to trace "what is this configuration for?" through links to relevant pages in this project.

Directory Structure Overview

User Level (Global)

~/.claude/
├── CLAUDE.md                    # Personal instructions common to all projects
├── settings.json                # Global personal settings (tool permissions, etc.)
├── agents/                      # Personal subagents available in all projects
│   └── *.md
└── rules/                       # Personal rules applied across all projects
    └── *.md

Project Level

my-project/
├── CLAUDE.md                    # Main project instruction file (auto-loaded)
├── CLAUDE.local.md              # Local-only instructions (not Git-managed)
├── .mcp.json                    # MCP server definitions (project scope, team-shared)
├── .claude/
│   ├── settings.json            # Tool permissions, MCP config, Hooks, env (team-shared)
│   ├── settings.local.json      # Local-only settings (not Git-managed)
│   ├── commands/
│   │   └── deploy.md            # Custom slash commands (executed with /deploy)
│   ├── agents/
│   │   └── code-reviewer.md     # Subagent definition (independent context)
│   ├── rules/
│   │   ├── frontend.md          # Conditional rules (auto-injected via glob pattern)
│   │   ├── testing.md
│   │   └── ...
│   └── skills/
│       └── skill-name/
│           ├── SKILL.md         # Skill definition (required)
│           ├── scripts/         # Helper scripts (optional)
│           ├── references/      # Reference documents (optional)
│           └── assets/          # Templates, etc. (optional)
├── src/
│   ├── CLAUDE.md                # Subdirectory-specific (loaded when accessing this directory)
│   └── components/
│       └── CLAUDE.md            # Deeper hierarchies also possible

Enterprise Level (Admin Configuration)

(Distributed by organization admin)
├── managed-settings.json        # Organization policy (distributed via MDM, highest priority)

Configuration Priority

Managed (Highest)   managed-settings.json (organization policy)

Project             .claude/settings.json (team-shared)

Project Local       .claude/settings.local.json (personal local)

User (Lowest)       ~/.claude/settings.json (global personal)

Below, each file/directory is explained by categorizing "how it affects context."

CategoryConfiguration File / FeatureLoadingExplanation
Resident Context (Part 3)~/.claude/CLAUDE.mdAuto on session startHierarchy Merge
CLAUDE.mdAuto on session startDesign Principles
CLAUDE.local.mdAuto on session startOperations
@import syntaxExplicit import from CLAUDE.md@import syntax
Subdirectory CLAUDE.mdOn-demand when accessing directoryHierarchy Merge
Conditional Context (Part 4).claude/rules/When glob pattern matchesDesign Principles
On-Demand Context (Part 5).claude/skills/When description matchesSkills
.claude/agents/description match or @-mentionSubagents
Agents (Task())On explicit invocationAgents
Tool Context (Part 6).mcp.json (project scope)Tool definitions always consumedMCP scopes
mcpServers (in settings.json)Tool definitions always consumedContext Cost
Runtime Control (Part 7)managed-settings.jsonEnforce organization policy (highest priority)settings.json
.claude/settings.jsonRuntime reference (invisible to LLM)settings.json
.claude/settings.local.jsonPersonal local settingssettings.json
~/.claude/settings.jsonGlobal personal settings (lowest priority)settings.json
Environment variablesShell or env sectionEnvironment Variables
HooksAuto-execute around LLM behaviorLifecycle
Session Management (Part 8)/compact · /clearManual or auto at 50% thresholdUsage
MemoryPersist across sessionsWhat to Remember
Plugin Extensions.claude-plugin/plugin.jsonActivated on installationPlugins
marketplace.jsonRegistered via /plugin marketplace addMarketplaces
Response StyleoutputStyle / .claude/output-styles/Part of the system promptOutput Styles
CLIclaude --bare / -p / -c / --add-dir etc.Startup flagsCLI Flags

Resident Context — Always Loaded on Session Start

~/.claude/CLAUDE.md (User Level)

ItemContent
Location~/.claude/CLAUDE.md
LoadingAuto on session start (merged first)
Git ManagementNo (home directory)
RolePersonal instructions common to all projects (e.g., "answer in English," "prefer functional style")
Detailed ExplanationHierarchy Merge Mechanism

CLAUDE.md (Project Level)

ItemContent
LocationProject root directory
LoadingAuto on session start
Git ManagementYes (team-shared)
RoleProject-wide instructions, rules, and context provision
Problems AddressedPriority Saturation, Prompt Sensitivity
ConstraintRecommended max 200 lines (avoid Priority Saturation)
Detailed ExplanationCLAUDE.md Design Principles

CLAUDE.local.md

ItemContent
LocationProject root directory
LoadingAuto on session start (merged with CLAUDE.md)
Git ManagementNo (.gitignore recommended)
RolePersonal environment-specific settings (local paths, personal API keys, etc.)
Detailed ExplanationCLAUDE.local.md Operations

CLAUDE.md @import Syntax

CLAUDE.md can import other files via @path/to/file. This is an explicit import mechanism — separate from the hierarchy merge (directory tree auto-discovery).

ItemContent
Syntax@README / @docs/git-instructions.md / @~/.claude/my-preferences.md
LoadingAt session start (fully expanded at launch, same as CLAUDE.md itself)
PathsBoth relative (resolved against the file containing the import) and absolute (/ or ~/)
RecursionImported files can recursively import others, max depth 4
ApprovalFirst-time external imports trigger an approval dialog; declining disables the import permanently
CaveatDoes NOT reduce context consumption — imported files load in full at launch. For size reduction use .claude/rules/ instead
AGENTS.mdIf your repo has AGENTS.md for other coding agents, just write @AGENTS.md in CLAUDE.md to share instructions across tools

Example (CLAUDE.md):

markdown
@README - project overview
@package.json - available npm commands

# Additional Instructions
- git workflow: @docs/git-instructions.md
- personal preferences: @~/.claude/my-project-prefs.md

TIP

To share personal instructions across worktrees of the same repo, prefer @~/.claude/my-prefs.md over a gitignored CLAUDE.local.md — the home-directory file is visible from every worktree.

Subdirectory CLAUDE.md (Hierarchy Merge)

ItemContent
LocationAny subdirectory (e.g., src/CLAUDE.md)
LoadingOn-demand when operating files in that directory
Git ManagementYes
RoleAdd directory-specific rules. Merged with parent CLAUDE.md
Problems AddressedContext Rot (load only when needed)
Detailed ExplanationHierarchy Merge Mechanism

Conditional Context — Injected Only When Conditions Match

.claude/rules/

ItemContent
Location.claude/rules/*.md
LoadingWhen glob pattern matches file operation
Git ManagementYes
RoleAuto-applied rules per file type (e.g., inject test conventions when editing *.test.ts)
Problems AddressedPriority Saturation (inject conditionally, not always), Lost in the Middle
Detailed Explanation.claude/rules/ Design Principles, Glob Pattern Design Practice

Example:

markdown
---
description: TypeScript test files
globs: **/*.test.ts, **/*.spec.ts
---

- describe/it nesting max 2 levels
- Minimize mocks, prioritize integration tests with real services

On-Demand Context — Deployed Only When Invoked

.claude/skills/

ItemContent
Location.claude/skills/<skill-name>/SKILL.md
LoadingWhen description matches
Git ManagementYes
RoleReusable prompt templates. Code generation patterns, documentation generation procedures, etc.
Problems AddressedContext Rot (doesn't consume context when unused)
Detailed ExplanationSkills Design Principles

Directory Structure Example:

.claude/skills/
└── component-gen/
    ├── SKILL.md          # Prompt instructions (required)
    ├── scripts/          # Helper scripts
    ├── references/       # Reference documents
    └── assets/           # Templates, etc.

Subagents (file-defined in .claude/agents/)

Subagents are independent-context execution units defined as Markdown files with YAML frontmatter. A first-class feature parallel to Skills — distinct from dynamic Task() invocation.

ItemContent
LocationProject: .claude/agents/*.md (recursively scanned, subfolders allowed)
User: ~/.claude/agents/*.md (available across all projects)
IdentifierOnly the frontmatter name field (directory path doesn't matter)
Git ManagementProject version: Yes (team-shared) / User version: No
Frontmattername, description, tools, disallowedTools, model, permissionMode, mcpServers, hooks, maxTurns, skills, effort, background, isolation, color, memory, etc.
BodySystem prompt (Claude Code's default system prompt is NOT included)
InvocationAuto-delegated on description match / explicit via @subagent-name / programmatic via Task()
Problems AddressedSycophancy (independent judgment), Knowledge Boundary, Context Rot (keeps main context clean)
Detailed ExplanationAgents Design Principles, Skills vs Subagents Decision

Example (.claude/agents/code-reviewer.md):

markdown
---
name: code-reviewer
description: Reviews code for quality, security, and best practices
tools: Read, Glob, Grep
model: sonnet
---

You are a code reviewer. When invoked, analyze the target code and provide
specific, actionable feedback on quality, security, and best practices.

IMPORTANT

Skills vs Subagents: Skills are prompt templates expanded into the caller's context. Subagents are separate processes running in independent contexts. Use a Subagent for exploration-heavy work whose intermediate output (search results, logs) shouldn't pollute the parent context; use a Skill for reusable instructions and templates.

Agents (dynamic via Task())

ItemContent
DefinitionUse Task() within Skills or during conversation (no file definition required)
ContextExecute in independent context window from parent
RoleAd-hoc parallel processing, Cross-model QA, one-off domain delegation
Problems AddressedSycophancy (independent judgment), Knowledge Boundary
Detailed ExplanationAgents Design Principles, Skill vs Agent Decision

Tool Context — Tools Consume Context

MCP (Model Context Protocol)

MCP servers can be configured at three scopes, each backed by a different file.

ScopeFileGit ManagementUse Case
Project.mcp.json (project root)Yes (team-shared)Distribute the same MCP to the whole team. Approval prompt on first run
LocalmcpServers in .claude/settings.jsonOptionalProject-specific personal MCP, not shared with team
UsermcpServers in ~/.claude/settings.jsonNoPersonal MCP shared across all projects
ItemContent
Transport typesstdio (run command) / http (HTTP + OAuth) / sse (Server-Sent Events)
Context CostTool definitions themselves consume tokens (degradation past ~20K)
RoleConnect external tools, APIs (DB queries, file operations, external service calls, etc.)
ApprovalServers in .mcp.json require approval on first launch (shown as ⏸ Pending approval in claude mcp list)
Problems AddressedKnowledge Boundary (access external knowledge), Hallucination (fact-check)
Detailed ExplanationMCP Context Cost, Tool Search / Deferred Loading

.mcp.json example (project root):

json
{
  "mcpServers": {
    "my-db": {
      "type": "stdio",
      "command": "node",
      "args": ["./mcp-servers/db-server.js"]
    },
    "internal-api": {
      "type": "http",
      "url": "https://mcp.example.com/mcp",
      "oauth": {
        "authServerMetadataUrl": "https://auth.example.com/.well-known/openid-configuration"
      }
    }
  }
}

TIP

.mcp.json and mcpServers in .claude/settings.json are merged (project scope wins on name collision). Put team-shared servers in .mcp.json and personal ones in .claude/settings.local.json — that's the working convention.


Runtime Control — Layers Outside LLM Context

.claude/settings.json

ItemContent
Location.claude/settings.json
LoadingRuntime reference (invisible to LLM)
Git ManagementYes
RoleTool permission settings, MCP server definition, Hooks definition, environment variables
Detailed Explanationsettings.json Role, Why Hide from LLM

Example:

json
{
  "permissions": {
    "allow": ["Bash(npm run test)", "Read"],
    "deny": ["Bash(rm -rf)"]
  },
  "hooks": { ... },
  "mcpServers": { ... }
}

permissions syntax details

Permission rules follow the format Tool or Tool(specifier). Evaluation order: deny → ask → allow. First matching rule wins.

PropertyRole
allowArray of rules to allow tool use without prompting
askArray of rules that trigger a confirmation prompt before execution
denyArray of rules to deny tool use. Also use to hide sensitive files from Claude's reads
additionalDirectoriesAdditional directories Claude is allowed to access (e.g., ["../docs/"])
defaultModeDefault permission mode at launch (e.g., "acceptEdits" / "plan" / "bypassPermissions")

Syntax example:

json
{
  "permissions": {
    "allow": [
      "Bash(npm run test)",
      "Bash(git log *)",
      "Bash(git diff *)",
      "Read",
      "Edit(src/**)",
      "WebFetch(domain:docs.claude.com)",
      "mcp__github__get_issue"
    ],
    "ask": [
      "Bash(git push *)",
      "Edit(production/**)"
    ],
    "deny": [
      "Bash(rm -rf *)",
      "Read(.env*)",
      "Read(**/*.key)"
    ],
    "additionalDirectories": ["../shared-libs/"],
    "defaultMode": "acceptEdits"
  }
}

IMPORTANT

deny doubles as a content filter — denying Read(.env*) means Claude cannot see your env files at all, eliminating them as a hallucination source.

statusLine — Customize the Status Bar

Replace the terminal's bottom status line with the output of any command.

ItemContent
Location~/.claude/settings.json or .claude/settings.json
type"command" (uses external command's stdout)
commandPath to the script
padding(optional) Extra horizontal space in characters

Example:

json
{
  "statusLine": {
    "type": "command",
    "command": "~/.claude/statusline.sh",
    "padding": 2
  }
}

~/.claude/statusline.sh example:

bash
#!/usr/bin/env bash
branch=$(git -C "$CLAUDE_PROJECT_DIR" branch --show-current 2>/dev/null)
model="${ANTHROPIC_MODEL:-default}"
echo "🌱 $branch | 🧠 $model"

apiKeyHelper — Custom Auth Script

Dynamically fetch the API key via a script — useful for internal Vault or AWS Secrets Manager flows.

ItemContent
BehaviorExecutes a shell script; its stdout is used as the API key
RefreshDefault: re-run after 5 minutes or on HTTP 401
TTL configCLAUDE_CODE_API_KEY_HELPER_TTL_MS env var sets the refresh interval in ms
TimeoutWarning shown if it takes longer than 10 seconds
PrecedenceLower than ANTHROPIC_AUTH_TOKEN / ANTHROPIC_API_KEY (env vars win)
Live reloadChanges apply without restart

Example:

json
{
  "apiKeyHelper": "/usr/local/bin/get-anthropic-key.sh"
}

.claude/settings.local.json

ItemContent
Location.claude/settings.local.json
Git ManagementNo (.gitignore recommended)
RolePersonal tool permission settings, local MCP server configuration
RelationshipMerged with settings.json (local takes priority)

~/.claude/settings.json (User Level)

ItemContent
Location~/.claude/settings.json
Git ManagementNo (home directory)
RoleGlobal personal settings common to all projects
PriorityLowest (overridden by project settings)

managed-settings.json (Enterprise Level)

ItemContent
DistributionVia MDM (Mobile Device Management) or server management
RoleOrganization-wide security policy and permission enforcement
PriorityHighest (overrides all settings. Users cannot modify)
Detailed Explanationsettings.json Role

Hooks

ItemContent
Config Locationhooks in .claude/settings.json
Execution TimingAuto-execute before/after LLM behavior (LLM unaware)
RoleMechanical validation, auto-format, notifications, etc.
Problems AddressedHallucination (auto test execution), Sycophancy (mechanical check), Instruction Decay
Detailed ExplanationHooks Lifecycle

Event list (by cadence):

CadenceEventTiming
Per sessionSessionStartSession start or resume
SessionEndSession end
InstructionsLoadedWhen CLAUDE.md / rules are loaded (great for debugging)
Per turnUserPromptSubmitWhen user submits a prompt (before Claude processes it)
StopWhen assistant response completes
Per tool callPreToolUseBefore tool execution (can block here)
PostToolUseAfter tool execution
Subagent-relatedSubagentStartSubagent spawned
SubagentStopSubagent completed
Context mgmtPreCompactJust before /compact runs
OtherNotificationOn notification
PermissionRequestWhen a permission prompt is required

TIP

The InstructionsLoaded hook logs which CLAUDE.md was loaded, when, and why — invaluable for debugging hierarchy merges and path-specific rules.


Session Management — Conversation Lifespan and Memory

/compact · /clear Commands

CommandBehaviorUse Case
/compactSummarize and compress contextPreventive handling of Context Rot. Also auto-executes at 50% threshold
/clearCompletely reset contextTask switching. Eliminate accumulated noise
ItemContent
Problems AddressedContext Rot, Lost in the Middle, Instruction Decay
Detailed Explanation/compact and /clear Usage

Memory (Persistence Across Sessions)

Claude Code has two memory systems: CLAUDE.md (user-written) and Auto Memory (Claude-written).

AspectCLAUDE.mdAuto Memory
Written byUserClaude (automatically, as it works)
ContainsInstructions and rulesLearned patterns and insights
ScopeProject / user / orgPer repository (shared across worktrees)
Loaded intoEvery session (full content)Every session: first 200 lines or 25KB of MEMORY.md
Problems addressedPriority SaturationContext Rot (rescue info lost in compaction), Instruction Decay

Auto Memory location:

~/.claude/projects/<project>/memory/
├── MEMORY.md          # Index loaded every session
├── debugging.md       # Topic-specific notes (loaded on demand)
├── api-conventions.md
└── ...

<project> is derived from the git repository, so all worktrees and subdirectories share one Auto Memory. Auto Memory is machine-local — not synced across machines or cloud environments.

Related settings (settings.json):

KeyRole
autoMemoryEnabledEnable/disable Auto Memory (default: enabled)
autoMemoryDirectoryOverride Auto Memory location (absolute path or ~/-prefixed)
claudeMdExcludesGlob patterns of CLAUDE.md files to skip loading
CLAUDE_CODE_DISABLE_AUTO_MEMORYSet to 1 to disable Auto Memory via env var

Commands:

CommandBehavior
/memoryList loaded CLAUDE.md / rules / Auto Memory files, open in editor, toggle Auto Memory

IMPORTANT

Auto Memory requires Claude Code v2.1.59 or later. Check with claude --version.

WARNING

Root CLAUDE.md survives /compact (re-injected from disk). Subdirectory CLAUDE.md files do NOT auto-reload after compaction. Put instructions that must always persist in the root CLAUDE.md.

Detailed explanations:


Custom Commands

.claude/commands/

ItemContent
Location.claude/commands/*.md
InvocationExecute with / + filename (e.g., /deploy)
RoleReusable boilerplate prompts. Deploy procedures, review procedures, etc.

Example (.claude/commands/deploy.md):

markdown
Execute pre-production deployment checklist.

1. `npm run test` must pass all
2. `npm run build` must complete without errors
3. Output summary of changes

Main Built-in Slash Commands

Separate from user-defined .claude/commands/ — these are first-class commands shipped with Claude Code.

CommandRole
/configInteractively edit settings (permissions, outputStyle, autoMemory, etc.). Changes saved to settings.local.json
/memoryList loaded CLAUDE.md / rules / Auto Memory, open in editor, toggle Auto Memory
/agentsList subagents; create new ones interactively
/skillsList skills; create new ones
/pluginInstall and manage plugins. /plugin marketplace add <url> to add a marketplace
/mcpList MCP servers, auth status, test connections
/initAuto-generate CLAUDE.md (analyzes codebase for project conventions). Set CLAUDE_CODE_NEW_INIT=1 for interactive mode
/compactSummarize and compress context (manual / auto at 50% threshold)
/clearCompletely reset context
/helpShow help

Output Styles — Customize Response Style

Switches Claude's response style (part of the system prompt). Changes how Claude answers, not what it knows.

ItemContent
LocationoutputStyle key in settings.json / /config menu / .claude/output-styles/*.md
Built-inDefault / Explanatory (adds educational "Insights") / Learning (leaves TODO(human) markers in code for collaboration)
Custom.claude/output-styles/<name>.md with frontmatter + system prompt addition
When appliedPart of the system prompt — takes effect only after /clear or a new session

Custom Output Style example (.claude/output-styles/socratic.md):

markdown
---
name: socratic
description: Socratic dialogue mode — guide with questions instead of giving direct answers
keep-coding-instructions: true
---

You are a Socratic coach. Before showing implementation directly,
ask questions that help the user discover the answer themselves.
With keep-coding-instructions true, normal style is preserved during coding tasks.
Frontmatter keyRole
nameStyle name (defaults to filename)
descriptionDescription
keep-coding-instructionstrue preserves standard coding instructions. Omit / false to fully replace the style

TIP

Output Styles change response tone and format — they're not reusable templates like Skills. Use a Skill for task-specific templates, an Output Style for session-wide tone.


CLI Flags

Startup options for the claude command — temporary overrides of settings.json and headless/automation modes.

Session start and management

FlagRole
-p "query"Run a single prompt and exit (for pipes and scripts)
-cContinue the most recent session
-r <session-id>Resume by session ID or name
--bg "query"Start as a background agent; returns the session ID immediately
--bareDisable auto-discovery of hooks / skills / plugins / MCP / Auto Memory / CLAUDE.md for fast startup

Settings overrides

FlagRole
--add-dir <path>Add additional working directories. .claude/ configs there are not discovered
--settings <file>Load an arbitrary settings.json
--setting-sources <list>Which scopes to load (project, user, local, policy)
--mcp-config <file>Load MCP config from an arbitrary file
--plugin-dir <path>Add a plugin directory
--allowedTools <list>Tools allowed without confirmation
--append-system-prompt "..."Append text to the end of the system prompt
--append-system-prompt-file <f>Load addition from file

Permission modes

FlagRole
--permission-mode <mode>Startup permission mode (default / acceptEdits / plan / bypassPermissions)
--allow-dangerously-skip-permissionsAllow Shift+Tab to cycle into bypassPermissions (don't start in it)

Agent / Subagent

FlagRole
--agent <name>Specify the agent for this session
--agents <json>Define subagents dynamically via JSON

Auth and updates

FlagRole
claude auth loginSign in. --console for API-key billing, --sso to force SSO
claude auth statusShow auth status as JSON
claude updateUpdate to latest version
claude install <ver>Install a specific version (stable / latest / e.g. 2.1.118)

WARNING

claude --help does not list every flag. Check the official CLI reference for --bare, --allow-dangerously-skip-permissions, and other important flags.


Plugin Extensions

.claude-plugin/ — Plugin Package Unit

A Claude Code plugin bundles commands / agents / skills / hooks / MCP into a single repository for distribution via marketplaces.

ItemContent
Manifest.claude-plugin/plugin.json (required)
Can containcommands/ / agents/ / skills/ / hooks/hooks.json / .mcp.json
Installation/plugin marketplace add <source>/plugin install <plugin-name>
Marketplace source typesgithub (repository) / git (any git URL) / directory (local path, for development)
Detailed ExplanationPlugins and Marketplaces

Plugin directory structure (example):

my-plugin/
├── .claude-plugin/
│   └── plugin.json          # Plugin manifest (required)
├── commands/
│   └── custom-cmd.md        # Custom slash command
├── agents/
│   └── specialist.md        # Subagent definition
├── skills/
│   └── my-skill/
│       └── SKILL.md         # Agent Skill
├── hooks/
│   └── hooks.json           # Hook definitions
└── .mcp.json                # MCP server definitions

Marketplace (marketplace.json)

ItemContent
RoleIndex that bundles multiple plugins for distribution
HostingGitHub / GitLab / any git host
How to addUsers register with /plugin marketplace add <url>
Detailed ExplanationPlugins and Marketplaces

Environment Variables

Claude Code behavior can also be controlled via environment variables. Writing them under the env key in settings.json makes them session-persistent and team-distributable.

Key Environment Variables

VariableRole
ANTHROPIC_API_KEYClaude API authentication key
ANTHROPIC_AUTH_TOKENBearer token authentication
ANTHROPIC_MODELSpecifies which Claude model to use
ANTHROPIC_SMALL_FAST_MODELSpecifies a smaller model for lightweight tasks
CLAUDE_CODE_USE_BEDROCKSet to 1 to route through Amazon Bedrock
CLAUDE_CODE_USE_VERTEXSet to 1 to route through Google Vertex AI
CLAUDE_CODE_USE_FOUNDRYSet to 1 to route through Microsoft Azure
CLAUDE_CODE_DISABLE_AUTO_MEMORYSet to 1 to disable Auto Memory
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MDAlso load CLAUDE.md from directories added via --add-dir
CLAUDE_PROJECT_DIRProject root path (readable from Hook scripts)
MAX_THINKING_TOKENSMax tokens for Extended Thinking
HTTP_PROXY / HTTPS_PROXYProxy settings for outbound traffic

Distribution via settings.json

json
{
  "env": {
    "ANTHROPIC_MODEL": "claude-sonnet-4-6",
    "MAX_THINKING_TOKENS": "8000",
    "DISABLE_TELEMETRY": "1"
  }
}

TIP

Whether you export via shell or write to settings.json env changes scope:

  • shell export → only Claude Code started from that shell
  • ~/.claude/settings.json env → all projects
  • .claude/settings.json env → that project (Git-shareable)
  • managed-settings.json env → organization-wide (enforced)

WARNING

Never put secrets like ANTHROPIC_API_KEY directly into .claude/settings.json (which is Git-tracked). Use settings.local.json or pass via shell environment variable.


Configuration Loading Timing Overview


Next: FAQ — Frequently Asked Questions and Design Decisions

Previous: Structural Problems × Claude Code Countermeasures Map

Discussion: For suggestions or corrections, please post in Discussions

Released under the CC BY 4.0 License.