Three config files

On Windows the default directory is C:\Users\YOUR_NAME\.claude; on macOS and Linux it is ~/.claude. Two different things live around there, and mixing them up is the first source of confusion.

FilePathWhat it controls
settings.json~/.claude/settings.jsonUser settings: env vars, model mapping, enabled plugins
.claude.json~/.claude.json (home directory, not inside .claude)App state: onboarding completion, project history
Project settingsproject/.claude/settings.jsonApplies to that repo only, can be committed
Easy mistake .claude.json sits in your home directory, a sibling of the .claude folder — not inside it. People hunt inside the folder and never find the setting that matters.

Writing settings.json

Put the endpoint, key and model names in the env block. The example below points at MiniMax's Anthropic-compatible endpoint; swap the URL, key and model names for whatever service you use.

{ "env": { "ANTHROPIC_AUTH_TOKEN": "sk-cp-***", "ANTHROPIC_BASE_URL": "https://api.minimaxi.com/anthropic", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M2.1", "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M2.1", "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M2.1", "ANTHROPIC_MODEL": "MiniMax-M2.1", "API_TIMEOUT_MS": "3000000", "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1" }, "enabledPlugins": { "example-skills@anthropic-agent-skills": true, "atlassian@claude-plugins-official": true } }
KeyPurposeNote
ANTHROPIC_BASE_URLWhere requests goMust speak the Anthropic protocol — an OpenAI-format URL will not work
ANTHROPIC_AUTH_TOKENAuthenticationThe third-party key, not an Anthropic account key
HAIKU / SONNET / OPUS mappingsClaude Code calls three tiers internallyWith one model available, set all three to it — otherwise tier switching fails
API_TIMEOUT_MSPer-request timeoutRaise it if the provider queues; the sample value is very generous
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICDisables non-essential telemetryRecommended when using a third-party endpoint

The trap: config silently ignored

Config is correct, you restart, and it still opens a login page. Nothing is wrong with your JSON — a newer build gates startup on onboarding, and it never reaches your API settings.

The fix lives in ~/.claude.json:

{ "hasCompletedOnboarding": true }

Change false to true, save, and relaunch.

Common misunderstanding Some guides put hasCompletedOnboarding inside the env block of settings.json. It is not an environment variable — it is a top-level boolean in .claude.json, case sensitive. Placed in the wrong file it fails silently, which is why people retry the same broken config for hours.
Why it is so hard to spot Syntax is valid, the endpoint responds, the key works. The blocker sits earlier in the startup path and no log tells you to look at .claude.json.

Plugins and Skills

# Add the official skills marketplace /plugin marketplace add anthropics/skills # Install a sample skill pack /plugin install example-skills@anthropic-agent-skills

Installed plugins are recorded in enabledPlugins, keyed as plugin@marketplace:

"enabledPlugins": { "example-skills@anthropic-agent-skills": true, "document-skills@anthropic-agent-skills": true, "gopls-lsp@claude-plugins-official": true }

Set a value to false to disable without uninstalling.

Plugins vs Skills A plugin is a bundle that can contain Skills, commands and language servers. A Skill is one kind of content inside it — see Skills.

Verify and troubleshoot

Confirm you edited the user-level file

~/.claude/settings.json applies globally. A project-level .claude/settings.json overrides matching keys — check that first.

Validate the JSON

One trailing comma silently discards the whole file. Use your editor's validator or node -e "JSON.parse(...)".

Check .claude.json

Search for hasCompletedOnboarding; confirm it is true and not nested inside env.

Fully quit, then relaunch

Closing the window is not enough — confirm the process ended. Config is read only at startup.

Send one small request

Ask "which model are you?" — if the name matches your mapping, the chain works.

SymptomLikely cause
Still asks you to log in.claude.json untouched, or set to the string "true"
Model not foundIncomplete tier mapping or a typo in the model name
401 / auth failureAnthropic key used instead of the third-party key, or expired
TimeoutsSlow provider — raise API_TIMEOUT_MS
Nothing changed at allProject config overriding user config, or invalid JSON disabling the file

Safety

Keep the token out of version control settings.json holds a plaintext key. For committed project config, move secrets to environment variables or a local settings.local.json and ignore it.
A third-party endpoint means your data leaves your machine Code and file contents go to that provider. Check their data terms, and never test against a production repository.
Version drift Recorded against the November 2026 build. Claude Code moves fast — when something disagrees, trust the official docs at code.claude.com/docs.