CertSafari
    Anthropic Claude Certified Developer – Foundations (CCDV-F) - December 7 onwards· Lessons

    Domain 2 · Lesson 6/24

    Claude Code configuration across scopes, models, plugins and CI

    Configuration and SDLC Integration

    18 min read
    5% of exam
    7 sources
    Published 18 Nov 2026
    Docs as of 18 Nov 2026

    What you will be able to do

    • Pick the settings file or CLAUDE.md file that reaches exactly the people and environments a change is meant for
    • Predict which value wins when a key or permission rule is set in more than one scope
    • Choose between a model alias and a full model ID, and explain how each one behaves on different providers
    • Configure a headless CI run of Claude Code so it neither stalls on prompts nor runs with blanket permissions
    • Trace a configuration change through a developer laptop, a teammate's clone, a CI checkout and a cloud session

    Key concept

    Configuration scope — Every Claude Code configuration artifact, whether a settings file, a CLAUDE.md or a model value, applies only to the places its file actually reaches. So who and where a change affects depends on where the file lives and whether it is committed, more than on what it says.

    1.Settings files, their scopes and precedence

    Claude Code reads settings.json from several places, and each place reaches a different audience. Your user file, ~/.claude/settings.json, applies to every project on your machine and to nobody else. The shared project file, .claude/settings.json, is the one a team commits. It carries team permissions, hooks, plugins and the environment variables the project needs. The project local file, .claude/settings.local.json, is for personal overrides in one repository. Managed settings are deployed by your organization as a managed-settings.json file, an MDM policy or server-managed settings, and you never edit them yourself.

    Settings scopes, highest precedence first
    ScopeFile or sourceWho it affects
    Managedmanaged-settings.json, MDM policy, server-managed settingsEveryone the organization deploys it to
    Command line--settings <file-or-json>This session only
    Project localYour private settings for this project.claude/settings.local.json
    Shared project.claude/settings.jsonEveryone with the committed file
    User~/.claude/settings.jsonYou, in every project

    For a single-valued key such as model, the highest scope that sets it wins. A key you pass with --settings overrides the same key in your project and user files and sits below managed settings. Some ordered values are never stitched together from several files. For fallbackModel, for example, Claude Code takes the whole chain from the highest-precedence file that defines it. Nothing in your own files overrides a managed key.

    Permission rules don't follow the winner-takes-all pattern. Allow rules from every scope are merged into one combined set, and deny rules from every scope end up in that set too. Nothing is discarded because another file mentions the same pattern. Within the combined set a deny rule prevents the tool from running. So a teammate's personal allow cannot override a deny the team committed, and neither does the order the files load in. The result is the same refusal whichever file you read first.

    A shared project settings file that pre-approves two commands and blocks reads of environment filesjson
    {
      "$schema": "https://json.schemastore.org/claude-code-settings.json",
      "permissions": {
        "allow": [
          "Bash(npm run lint)",
          "Bash(npm run test *)"
        ],
        "deny": [
          "Read(./.env)",
          "Read(./.env.*)"
        ]
      }
    }

    Broken files fail in different ways. Invalid JSON or a value the schema rejects in a user, project or local file is a Settings Error. An interactive session then offers to fix the file, exit, or continue without it. A single malformed permission rule is only a Settings Warning: that entry is skipped and the rest of the file stays in effect. If ~/.claude.json can't be parsed, a claude -p run simply exits, which matters on an unattended CI runner.

    Checkpoint 1 of 9· Fill the gap

    This committed .claude/settings.json should pre-approve the two npm commands. It should also stop Claude from reading the project's environment files, even for a teammate whose user settings allow Read(./.env). Which key completes the file?

    {
      "$schema": "https://json.schemastore.org/claude-code-settings.json",
      "permissions": {
        "allow": [
          "Bash(npm run lint)",
          "Bash(npm run test *)"
        ],
        " ? ": [
          "Read(./.env)",
          "Read(./.env.*)"
        ]
      }
    }

    Checkpoint 2 of 9· Exam question

    User-level settings allow Bash(git push:*), but the committed project settings contain a deny rule for the same pattern. A developer runs a session in that repository and Claude tries git push origin main. What happens?

    Sources12

    2.CLAUDE.md files as versioned instructions

    Settings control what Claude Code is allowed to do. CLAUDE.md files tell Claude how to work. They are plain markdown loaded into every session, and they use the same scope ladder: a managed policy file deployed by IT, ~/.claude/CLAUDE.md for your preferences in all projects, ./CLAUDE.md or ./.claude/CLAUDE.md for the team, and ./CLAUDE.local.md for personal notes on one project.

    CLAUDE.md locations and who sees them
    ScopeLocationShared with
    Managed policy/etc/claude-code/CLAUDE.md (Linux and WSL)All users in organization
    User instructions~/.claude/CLAUDE.mdOnly you (all projects)
    Project instructions./CLAUDE.md or ./.claude/CLAUDE.mdTeam members via source control
    Local instructions./CLAUDE.local.mdOnly you (current project)

    A preference such as your own sandbox URL belongs in CLAUDE.local.md at the repository root, listed in .gitignore. That keeps it to one project, keeps it out of commits, and leaves your other repositories alone. ~/.claude/CLAUDE.md is the wrong place because it loads in every project. A .claude/settings.json entry is also wrong: settings files hold keys like permissions and models, not natural-language guidance Claude reads.

    Committing the project CLAUDE.md gives a team versioned prompts for free. Instruction changes go through review, ship with the code they describe, and can be reverted like any other file. Organizations that need the same instructions on every machine deploy the managed CLAUDE.md with their configuration management system.

    Size and structure affect whether instructions are followed. Aim for under 200 lines per file. Instructions that matter only for part of a codebase go in .claude/rules/ files with a paths glob, and those load only when Claude touches matching files. A several-thousand-line root CLAUDE.md in a monorepo loads everything into every session. Path-scoped rules or a CLAUDE.md per subdirectory fix that. Contradictory instructions are a quieter failure, because Claude may pick either one.

    Checkpoint 3 of 9· Check yourself

    A team is reviewing four proposed additions to the project's committed CLAUDE.md. Which one should go somewhere other than CLAUDE.md to work as intended?

    Checkpoint 4 of 9· Exam question

    A developer wants Claude Code to follow a personal preference, such as using a private sandbox URL, only inside one repository, without committing that preference or affecting their other projects. Which artifact fits?

    Sources3

    3.Aliases versus pinned model IDs

    The model value can be an alias or an exact model name, and the two behave differently over time. Aliases such as opus, sonnet and haiku resolve to the latest model in that family for your provider. When Anthropic ships a newer model, the alias moves to it with no configuration change. A full model ID such as claude-sonnet-4-5-20250929 names one model, and that model stays put until you change the value.

    What the same alias resolves to on different providers
    Provideropussonnethaiku
    Anthropic APIOpus 5.5Sonnet 5.5Haiku 5.5
    Amazon Bedrock, Google Cloud's Agent PlatformOpus 5.5Sonnet 4.5Haiku 4.5
    Microsoft FoundryOpus 4.6Sonnet 4.5Haiku 4.5

    That table is why an alias is not a pin. A committed "model": "sonnet" gives Sonnet 5.5 to a developer on the Anthropic API and Sonnet 4.5 to a CI job routed through Bedrock. Moves happen silently too: once haiku resolves to Haiku 5.5, a session saved on Haiku 4.5 resumes on Haiku 5.5. Bedrock, Google Cloud's Agent Platform and Foundry also use provider-specific identifiers, such as an inference profile ARN or a deployment name, instead of Anthropic model IDs. A pin written for one provider doesn't carry over to another. To fix what an alias means without rewriting every config, set ANTHROPIC_DEFAULT_OPUS_MODEL and its sibling variables.

    Several sources can set the model, and the one closest to the run is not always the winner. The model can come from /model, --model, ANTHROPIC_MODEL, a model key in any settings file, or an organization default. A model value in project or managed settings, or ANTHROPIC_MODEL in the shell, applies again at every new-session launch and outranks the default a developer saved with /model. Resumed sessions usually keep the model they were using.

    Checkpoint 5 of 9· Check yourself

    A team commits "model": "sonnet" to .claude/settings.json. Developers run Claude Code on the Anthropic API, and the CI job runs through Amazon Bedrock. Which model does each environment get?

    Sources41

    4.Plugins and their dependencies

    Teams share plugins through the committed .claude/settings.json, the same file that carries team permissions and hooks. One plugin can depend on others. Its manifest lists them by name, optionally with a semantic-version range such as ~2.1.0, ^2.0, >=1.4 or an exact =2.1.0. A dependency is looked up in the declaring plugin's own marketplace unless marketplace names another one.

    A plugin manifest with one unversioned dependency and one constrained to a version rangejson
    {
      "name": "deploy-kit",
      "version": "3.1.0",
      "dependencies": [
        "audit-logger",
        { "name": "secrets-vault", "version": "~2.1.0" }
      ]
    }

    Version ranges resolve against git tags, not branch heads. Claude Code installs the dependency at the highest tag that satisfies the range. A maintainer who never tags releases gives the range nothing to match. A tight range such as ~2.1.0 takes patch releases only, so a plugin bundle stays reproducible across machines while still getting fixes. With auto-update on for the marketplace, the next update moves a bundle to its new version and installs any dependencies it adds.

    Checkpoint 6 of 9· Check yourself

    Where should a tech lead declare the deploy-kit plugin so every teammate who clones the repository gets it, along with the dependencies its manifest lists?

    Sources5

    5.Running Claude Code in CI

    In a pipeline, Claude Code runs headless with claude -p. It takes a prompt, works without a terminal session, and exits. Nobody is there to answer a permission prompt, so any action that would normally ask for approval needs a decision made in advance. The safe way is to pre-approve exactly the commands the job needs, with --allowedTools on the command line or permissions.allow rules in the committed project settings.

    A headless run that pre-approves only the git commands needed to write a commitbash
    claude -p "Look at my staged changes and create an appropriate commit" \
      --allowedTools "Bash(git diff *),Bash(git log *),Bash(git status *),Bash(git commit *)"

    Permission modes decide what happens to anything you didn't pre-approve. --permission-mode dontAsk denies every call that would otherwise prompt, while file reads and your allowlisted actions still run. A job that hits an unexpected command then fails fast instead of hanging until it times out. acceptEdits auto-approves file writes and common filesystem commands, but other shell commands still need an allow entry. Turning off checks entirely on a runner that also holds deployment credentials trades a stalled job for unlimited access. A longer timeout fixes nothing either, because no one will ever answer the prompt. Moving the command into CLAUDE.md doesn't approve it.

    The Claude Code GitHub Action packages this for GitHub. Quick setup is /install-github-app. It authenticates with an ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN stored as a repository or organization Actions secret, never as a value in the workflow file. Without a prompt input, the workflow runs in interactive mode and waits for an @claude mention. With one, it runs in automation mode and writes results to the run log. On issue and pull request events the triggering user needs write access, and bot actors are rejected unless listed in allowed_bots, which prevents trigger loops. Deleting the secret doesn't revoke the key; retire it in the Claude Console as well. Credential handling goes deeper.

    Checkpoint 7 of 9· Check yourself

    Your workflow uses the Claude Code GitHub Action on pull request events, and its step sets a prompt input. A teammate with write access opens a pull request. What does the Action do?

    Checkpoint 8 of 9· Exam question

    A GitHub Actions job runs claude -p to triage issues. It stalls and times out at a step where Claude wants to run a build command, because nobody is present to answer the permission prompt. What is the best fix?

    Sources617

    6.How one change lands in each environment

    Before merging a configuration change, ask which environments will actually read the file. A committed .claude/settings.json or CLAUDE.md reaches teammates' clones and every CI job that checks out the repository. CI starts from a fresh checkout, so it never sees anyone's settings.local.json, CLAUDE.local.md or user files. A developer with a model key in .claude/settings.local.json keeps that model after the team changes the shared default, because local outranks project. The fresh CI checkout picks up the new shared value.

    Which settings each environment reads
    ArtifactYour machineCI fresh checkoutCloud session, one repository
    ~/.claude/settings.jsonReadNot presentNot read
    .claude/settings.local.jsonReadNot in the cloneNot read
    .claude/settings.json (committed)ReadReadRead
    managed-settings.json or MDM on your deviceReadOnly if installed on the runnerDoes not reach it
    Server-managed settingsReadRead if the run signs in with the organization accountRead

    Cloud sessions narrow things further. A cloud session with several repositories starts above the clones and reads only enabledPlugins and extraKnownMarketplaces from each repository's settings, with no permission rules, hooks or env. To change a setting for a cloud session, set an environment variable on the environment. In a single-repository session, committing the key also works.

    Checkpoint 9 of 9· Match them up

    Before you merge a change, you need to know which environments will see it. Match each settings source to where it actually takes effect.

    Tap a term, then the definition that fits it.

    Sources1

    Sources

    (7)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Team permissions, hooks, plugins, and the environment variables the project needs”
      ↩︎ Settings files, their scopes and precedence
      “Claude Code applies it above your user, project, and local files and below managed settings.”
      ↩︎ Settings files, their scopes and precedence
      “fallbackModel is an ordered chain where position carries meaning, so Claude Code takes the whole value from the highest-precedence file that defines it.”
      ↩︎ Settings files, their scopes and precedence
      “Nothing in your own settings files or --settings overrides a managed key”
      ↩︎ Settings files, their scopes and precedence
      “Claude Code merges permissions.allow across scopes, unless your organization sets allowManagedPermissionRulesOnly.”
      ↩︎ Settings files, their scopes and precedence
      “Configuration error: ~/.claude.json can’t be parsed. A claude -p run exits.”
      ↩︎ Settings files, their scopes and precedence
      “A managed model is a starting default, not a lock; the locks are availableModels and deniedModels.”
      ↩︎ Aliases versus pinned model IDs
      “permissions.defaultMode values auto and bypassPermissions don’t take effect from project or local settings”
      ↩︎ Running Claude Code in CI
      “Both stay on your machine, and the local file isn’t in the clone.”
      ↩︎ How one change lands in each environment
      “reads only the enabledPlugins and extraKnownMarketplaces keys from each repository’s .claude/settings.json”
      ↩︎ How one change lands in each environment
      “To change a setting for a cloud session, set an environment variable on the environment.”
      ↩︎ How one change lands in each environment
      “It reaches your teammate’s clone and the cloud session only if you commit the file to version control”
      ↩︎ Key concept
      “Claude Code merges permissions.allow across scopes, unless your organization sets allowManagedPermissionRulesOnly.”
      ↩︎ Exam trap 1
      “A managed model is a starting default, not a lock; the locks are availableModels and deniedModels.”
      ↩︎ Exam trap 2
      “Team permissions, hooks, plugins, and the environment variables the project needs”
      ↩︎ Checkpoint
      “Managed settings: a managed-settings.json file or MDM profile on your device doesn’t reach a cloud session. Your organization’s server-managed settings do”
      ↩︎ Checkpoint
    2. 2.
      “Deny rules prevent Claude Code from using the specified tool.”
      ↩︎ Settings files, their scopes and precedence
    3. 3.
      “Personal project-specific preferences; add to .gitignore”
      ↩︎ CLAUDE.md files as versioned instructions
      “Move instructions that matter for only part of the codebase into path-scoped rules, which load only when Claude works with matching files.”
      ↩︎ CLAUDE.md files as versioned instructions
      “Deploy with your configuration management system”
      ↩︎ CLAUDE.md files as versioned instructions
      “if two instructions contradict each other, Claude may pick one arbitrarily”
      ↩︎ CLAUDE.md files as versioned instructions
      “Block specific tools, commands, or file paths | Managed settings: permissions.deny”
      ↩︎ Exam trap 4
      “Block specific tools, commands, or file paths | Managed settings: permissions.deny”
      ↩︎ Checkpoint
    4. 4.
      “Uses the latest Opus model for complex reasoning tasks”
      ↩︎ Aliases versus pinned model IDs
      “A full model ID such as claude-sonnet-4-5-20250929”
      ↩︎ Aliases versus pinned model IDs
      “once haiku resolves to Haiku 5.5, a session saved on Haiku 4.5 resumes on Haiku 5.5.”
      ↩︎ Aliases versus pinned model IDs
      “A model value in project or managed settings, ANTHROPIC_MODEL in your shell”
      ↩︎ Aliases versus pinned model IDs
      “A full model ID such as claude-sonnet-4-5-20250929”
      ↩︎ Exam trap 3
      “Amazon Bedrock, Google Cloud’s Agent Platform | Opus 5.5 | Sonnet 4.5 | Haiku 4.5”
      ↩︎ Checkpoint
    5. 5.
      “The dependency installs at the highest git tag that satisfies this range, so the dependency’s maintainer must tag releases.”
      ↩︎ Plugins and their dependencies
      “Turn on auto-update for the marketplace: the next auto-update moves the bundle to the new version and installs any dependencies it adds.”
      ↩︎ Plugins and their dependencies
    6. 6.
      “Actions covered by your --allowedTools entries or permissions.allow rules also run.”
      ↩︎ Running Claude Code in CI
      “which is useful for locked-down CI runs”
      ↩︎ Running Claude Code in CI
    7. 7.
      “If you delete a secret, the credential it held stays valid.”
      ↩︎ Running Claude Code in CI
      “Automation mode: when the workflow provides a prompt input, Claude runs without waiting for a mention”
      ↩︎ Running Claude Code in CI
      “runs without waiting for a mention, subject only to the checks on who can trigger runs. By default, results appear in the workflow run log”
      ↩︎ Checkpoint

    Ready to test yourself?

    Practise Anthropic Claude Certified Developer – Foundations (CCDV-F) - December 7 onwards in quiz mode.

    Spotted a mistake, or was something unclear? Tell us.