Single logo
  • Courses
  • Blog
  • About
Join on SkoolJoin on Skool

In this topic

Claude
  • CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages
  • Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It
  • One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI
  • Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges
  • Hooks That Block Destructive Actions: a PreToolUse Gate That Allows, Asks or Denies
  • Choosing a Claude Code Extension: Skill, Hook, Rules File, Subagent, Slash Command or Plugin
  • Rolling Out Claude Code to a Team: Settings Precedence, dontAsk in CI, a Hook for Every-Time Rules and a Plugin for Five Repos
  • A Claude Code Review Bot in CI: Headless -p, JSON Findings, Team Rules in Git and a Person on the Merge
  • Lab: Three Planted Bugs in a Claude Code CI Repo, a Permission Mode, a Plugin Path and an MCP Token Variable
  • Configuring MCP Servers in Claude Code: A Command or a URL, Three Scopes, and Three Moves When One Breaks
  • The Claude Messages API: Your First Call, Field by Field
  • Claude Tool Use: How tool_use and tool_result Work in the Messages API
  • Claude Client SDKs Wrap One REST API: Raw HTTP, Python, TypeScript and Async Calls Compared
  • Anthropic SDK Timeouts, Retries and Error Classes: Configure the Client Once, Then Give 429, 529, 400 and Timeouts Their Own Move
  • Claude Streaming Events: The Event Order, message_stop, Tool Arguments, Stop Reasons and a WebSocket Relay
  • Images, PDFs and Thinking Blocks in the Claude Messages API: Typed Blocks In, Typed Blocks Out
  • Getting Data Into Claude: PDF Documents, the Files API, Search Results and Citations
  • Opus, Sonnet or Haiku: Pick the Claude Model per Job, and Test the Request When a New Release Arrives
  • Adaptive Thinking and Effort in Claude: Two Dials, Set per Workload, and the Thinking Block You Must Pass Back
  • Claude Cost Tracking From usage: Count Before, Cap During, Read After, Then Find the Line That Drives the Bill
  • Claude Cache Breakpoints: Where to Put cache_control, How to Move It With the Chat, and Why the Reads Stay at Zero
  • Claude Message Batches or Real Time: Choose by Who Is Waiting, Match by custom_id, Resend Only the Failures
  • Calling Claude Through Amazon Bedrock, Google Cloud and Microsoft Foundry: Same Call, Different Door
  • The Life Cycle of a Claude App: Six Phases, a Model That Retires, and a Release Gate for Every Change
  • Pinning Claude Model IDs and Upgrading Safely: One Change at a Time, a Golden-Set Replay and a Staged Rollout
  • Content Boundaries and Schema Design for Claude: Fence the Input in a Tag, Let the Output Say I Don't Know
  • The Agentic Loop and stop_reason: Keep Turning on tool_use, Stop on end_turn, Cap the Turns
  • The Claude Agent SDK: query(), ClaudeAgentOptions and @tool, in Python and TypeScript
  • Fix the Agent: Four Broken Claude Agent SDK Configs, From the Symptom to the One Wrong Line
  • Claude Managed Agents: Cloud Sandbox, Self-Hosted Sandbox or Self-Hosted Service
  • Agent SDK Hooks for Deterministic Actions: PreToolUse, PostToolUse, and Four Hooks That Fail Silently
  • Memory and Context-Window Patterns for Claude Agents: Context Editing, Compaction and the Memory Tool
  • Reading an Agent Trace: Five Signatures, Five Missing Patterns, and How Long a Fact Must Live
  • Tool Descriptions for Claude: How Claude Picks a Tool, and How to Stop It Picking the Wrong One
  • Tool Input Schemas and Error Responses for Claude: Required Fields, Enums, is_error and a Retry Flag
  • Tool Response Shaping and a Lean Tool Set: Give Claude a Sticky Note, Not the Filing Cabinet
  • Fix the Tool Schema: Read the Trace, Fix the Card, Re-Run (Four Real Schema Bugs)
  • Client Tools, Server Tools and Approval Gates: Who Runs the Tool, and Who Says Yes First
  • Built-in Tool, Custom Tool, Skill or MCP Server? Pick the Lightest One That Fits
  • System Prompt or User Turn: Where Each Instruction Goes, and Output Limits Your Code Enforces
  • Refine the Prompt One Line at a Time, Then Clean and Fence the Customer's Text
  • Prompt Revision Driven by Evals: Name the Cause, Change One Thing, Rerun the Whole Suite
  • Long-Running Sessions: Compact, Prune, Isolate or Start Fresh, Decided by Naming the Failure
  • Context Isolation Through Subagents: Read the Logs Elsewhere, Keep One Line
  • Defensive Parsing of Claude Replies: Check the Stop Reason, Read the Block or the Text, Then Validate the Values
  • Full Context or Retrieval: Choose by Corpus Size, Cost and Freshness
  • Skepticism Toward Confident Output: Check the Quote, the Record and the Sum Before You Send
  • Debugging a Claude App: Three Error Types, the Recovery Each One Earns, and the First Failing Row
  • Six Ways a 200 Can Still Be Wrong: Hallucination, Refusal, Under-Acting, Context Loss, Format Drift and Inconsistency
  • Fix the Cause, Not the Symptom: Four Recovery Drills for an LLM App, Each Checked on a New Input
  • Integration Layer or Model Output? Three Taps and Three Questions to Find Where a Wrong Answer Lives
  • Which Test Layer Owns the Failure? Unit, Functional, Integration and End-to-End Tests for a Claude App
  • Designing an Overnight Document Pipeline on Claude: Batch Lane, Live Lane, a Cached Prefix and a custom_id Reconcile
  • Proving a Model Upgrade Is Ready: A Frozen Golden Set, a Calibrated Judge, the Right Layer and a Release Gate
  • From Requirement to Design for a Claude App: Eight Requirements, Five Elements and a Trace With No Gaps
  • Build a Claude Refund App: the Messages API, Two Tools, an MCP Server and a Hook in One Loop
  • Ship a Claude App: an Eval Gate, Two Guardrail Layers, a Cost Check From usage and a Pinned Model
  • Lab: a 30-Case Golden Set, a Calibrated Judge and a Per-Slice CI Gate on a Claude Refund App
  • Lab: Cut a Claude App's Bill by 62 Percent With Usage Data, Layered Cache Breakpoints and a Batch Job
  • Lab: Three Planted Bugs in a Claude App, a Vague Prompt, a Mistyped Tool Schema and a Broken Stream Handler
  • Lab: Three Planted Bugs in a Claude Code CI Repo, a Permission Mode, a Plugin Path and an MCP Token Variable
  • Lab: Harden a Claude App, an Uncalibrated Judge, a Retry Loop That Retries Everything and a Hook Matcher With a Gap
  • Lab: Turn a Claude App Into a Reusable Template, One Pinned Model Id, No Key in Code and Evals Built From Data
  • Building an MCP Server: Tools, Resources and Prompts in Python and TypeScript
  • MCP Transports: stdio or Streamable HTTP, and Who Starts the Server
  • Deploying and Authenticating an MCP Server: Environment Keys for stdio, Bearer Tokens and Scopes for HTTP
  1. Blog
  2. /
  3. Claude
  4. /
  5. Claude Code

One Change, Four Environments: Where a Claude Config Edit Lands in Dev, Staging, Prod and CI

Change one line in a repo and ask where it lands. A small resolver for bookshop-bot shows that a new model id in settings.json reaches only CI, a prompt bump reaches dev and CI, and a prod block edit reaches only prod.

Chaand Sheikh

·27 November 2026Claude Code

What you will learn

  • List which files a developer laptop, a deployed app and a CI run each read
  • Predict where an edit to settings.json, app_config.json or CLAUDE.md takes effect
  • Explain why a CI checkout never sees settings.local.json
  • Ship one change per release by pinning model id and prompt version per environment

Before you start

  • CLAUDE.md, settings.json and plugins
  • Git basics

bookshop-bot is one small repo with one small team. Today we change one line and ask a simple question: where does it land? On a developer laptop, in staging, in prod, or in the CI run?

That's four places, and each one reads a different set of files. So a change that matters in one place can do nothing at all in another. The rule for the whole article: a change lands where it is read.

One repo, four places

Which place reads which file file dev staging prod CI CLAUDE.md reads--reads .claude/settings.json reads--reads .claude/settings.local.json reads--not here app_config.json readsreadsreadsreads review-tools plugin reads--reads
A file only matters in the places that read it. Staging and prod run the deployed app, which reads one file.
  • Dev, a developer laptop. Claude Code reads CLAUDE.md, the shared settings and the developer's own local file. The app config and the plugin come along.
  • Staging and prod run the deployed app. It reads one file, app_config.json. No Claude Code settings, no CLAUDE.md.
  • CI starts from a fresh checkout. It gets the committed files only, so the local settings file isn't there.

Five files, each read for one thing

FileRead forValue today
CLAUDE.mdClaude's rulesThe test command; change one thing per release
.claude/settings.jsonClaude Code's pinned modelclaude-sonnet-5-5
.claude/settings.local.jsonOne developer's own modelclaude-opus-5-5, that laptop only
app_config.jsonThe app's model id and prompt version per environmentProd runs triage_v2
review-tools/.claude-plugin/plugin.jsonPlugin version and what it needs1.2.0, needs lint-rules

Model id, prompt version and plugin version are all plain text in the repo, so every one of them can be diffed and reviewed.

.claude/settings.json

{
  "model": "claude-sonnet-5-5",
  "permissions": {
    "deny": ["Read(./.env)", "Read(./.env.*)"]
  },
  "enabledPlugins": {
    "review-tools@bookshop-plugins": true
  }
}

The model line pins Claude Code's model, the deny rule blocks .env wherever this file loads, and the plugin id switches the review tools on. The file is committed, so every clone and every CI checkout gets it. The developer's .claude/settings.local.json holds just {"model": "claude-opus-5-5"}, and .gitignore lists it together with .env.

app_config.json

{
  "default": {"model": "claude-sonnet-5-5", "prompt": "triage_v2"},
  "staging": {"prompt": "triage_v3"},
  "prod": {"model": "claude-sonnet-5-5", "prompt": "triage_v2"}
}

The default block sets a model id and a prompt version. Staging overrides only the prompt, trying the new triage_v3 while prod stays on the old one. Prod pins both, so it never drifts when the default moves. The app reads this file and never the Claude Code settings.

A model of who reads what: envconfig.py

The project's resolver is a simplified model of the documented rules, not Claude Code or GitHub:

def tracked(files):
    """A CI checkout holds only what git does not ignore."""
    rules = files[".gitignore"].split()
    return {rel: text for rel, text in files.items()
            if not any(fnmatch.fnmatch(rel, r) for r in rules)}


def claude_model(files):
    """Claude Code: the local file wins over the shared file."""
    model = None
    for rel in LAYERS:
        if rel in files:
            model = json.loads(files[rel]).get("model", model)
    return model


def app_settings(files, env):
    """The app: default block, then this environment's block."""
    cfg = json.loads(files["app_config.json"])
    return {**cfg["default"], **cfg.get(env, {})}


def resolve(files, env):
    seen = tracked(files) if env == "ci" else files
    app = app_settings(seen, env)
    row = {"claude model": "-", "claude.md": "-",
           "app model": app["model"], "prompt": app["prompt"]}
    if env in ("dev", "ci"):
        row["claude model"] = claude_model(seen)
        row["claude.md"] = digest(seen["CLAUDE.md"])
    return row
  • CI keeps only the files git doesn't ignore.
  • For Claude Code, a later settings file replaces the model, so the local file wins.
  • The app takes the default block, then its own environment's block.
  • Only dev and CI run Claude Code, so only they get a Claude model and a CLAUDE.md (shown as a short hash).

Today's state, from python envconfig.py:

env     claude model      claude.md app model          prompt
dev     claude-opus-5-5   7b484f    claude-sonnet-5-5  triage_v2
staging -                 -         claude-sonnet-5-5  triage_v3
prod    -                 -         claude-sonnet-5-5  triage_v2
ci      claude-sonnet-5-5 7b484f    claude-sonnet-5-5  triage_v2

The workflow that runs in CI

The CI run is described by a plain text file in the repo, .github/workflows/claude-review.yml:

name: Claude Review
on:
  pull_request:
    types: [opened, synchronize]
jobs:
  review:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: read
      id-token: write
    steps:
      - uses: actions/checkout@v6
      - uses: anthropics/claude-code-action@v1
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          plugin_marketplaces: |
            https://github.com/bookshop/plugins.git
          plugins: review-tools@bookshop-plugins
          prompt: "/review-tools:review"
      - run: python envconfig.py ci
  • Checkout brings the committed files and nothing else. Anything git ignores stays behind.
  • The Claude Code action starts Claude Code inside that checkout. The key comes from a repository secret, never from the file.
  • The plugin is installed from the plugins line, name@marketplace.
  • There's no model argument, so CI follows the committed settings. A model argument here would win over the file.

Predict first: which places move?

Before running anything, read the files and predict.

Change 1: move the model in .claude/settings.json to claude-haiku-5-5. Dev stays the same, because the local file wins there. Staging and prod stay the same, because the app never reads this file. Only CI moves.

Change 2: move the default prompt in app_config.json to triage_v3. Dev and CI move, because both read the default. Staging already has triage_v3, and prod is pinned.

Now what_if.py applies four changes in memory and diffs every environment:

change 1  .claude/settings.json: model -> claude-haiku-5-5
  ci      claude model claude-sonnet-5-5 -> claude-haiku-5-5
  same    dev, staging, prod
change 2  app_config.json: default prompt -> triage_v3
  dev     prompt triage_v2 -> triage_v3
  ci      prompt triage_v2 -> triage_v3
  same    staging, prod
change 3  CLAUDE.md: one more rule
  dev     claude.md 7b484f -> 51eb3e
  ci      claude.md 7b484f -> 51eb3e
  same    staging, prod
change 4  app_config.json: prod prompt -> triage_v3
  prod    prompt triage_v2 -> triage_v3
  same    dev, staging, ci

Both predictions hold. Change 3 adds a rule to CLAUDE.md, which dev and CI read. Change 4 edits the prod block, so only prod moves: that's a release, one change at a time.

The answer comes from reading who loads the file, not from the size of the edit.

The CI log

A stand-in runner, ci_run.py, writes the log of one CI run after change 1:

workflow Claude Review on pull_request
step 1  actions/checkout@v6
  14 files checked out
  ignored: .claude/settings.local.json
step 2  anthropics/claude-code-action@v1
  settings .claude/settings.json
  settings .claude/settings.local.json: not here
  model: claude-haiku-5-5
  CLAUDE.md 7b484f
  plugin: review-tools@bookshop-plugins 1.2.0
  needs: lint-rules
  prompt: /review-tools:review
step 3  python envconfig.py ci
  env     claude model      claude.md app model          prompt
  ci      claude-haiku-5-5  7b484f    claude-sonnet-5-5  triage_v2

The local settings file never left the laptop. The new model id reached the CI run. The plugin is there at version 1.2.0, and the app row still shows triage_v2, because change 1 touched only the model.

Common mistakes

  • "The new model in settings.json applies everywhere." The deployed app reads its own file, and a developer with a local model keeps that model. CI and every session without a local model follow the shared file.
  • Testing a setting only on your laptop. Your local file may be hiding the shared value. CI shows what the committed files really say.
  • Leaving prod on the default block. Then a change meant for staging or dev drifts into prod. Pin prod's model id and prompt version.
  • Changing two things in one release. If the model and the prompt move together, you can't tell which one changed the behaviour.

For how the settings layers merge, see CLAUDE.md, settings.json and Plugins. For a review bot built on the same kind of workflow, see A Claude Code Review Bot in CI.

Quick recap

StepQuestion to ask
Read the setWhich files hold the model id, the prompt version and the plugin version?
Predict each placeDoes dev, staging, prod or CI read the file that changed?
Check the runWho moved, and who held?

Try it yourself

Delete the developer's settings.local.json and apply change 1 again. Which environments move now? Then add a staging model of claude-haiku-5-5 to app_config.json: which single row changes?

Tried the exercise? Share your answer or ask a question.

The StudyEasy AI Community is free to join, with the lesson files, notebooks and code.

Join free on Skool

Keep going in Claude · 3 of 66

Previous
Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It
Next post
Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges

Related course on Udemy

Claude Certified Developer - Foundations (CCDV-F) Exam Prep

Build and ship Claude apps: the API, agents, tools and MCP, prompts, evals, security and model choice.View on Udemy ↗: Claude Certified Developer - Foundations (CCDV-F) Exam Prep (paid course, opens in a new tab)

Related posts

CLAUDE.md, settings.json and Plugins: Which Claude Code File Advises, Which Enforces, Which Packages

Three needs in one repo: a test command, a rule that Claude must never read .env, and a shared deploy skill. See which file each belongs in, how the settings layers merge, and what a plugin manifest carries.

Authoring a Claude Skill: SKILL.md, Frontmatter, Progressive Disclosure and the Description That Triggers It

Pack a support team's ticket-triage routine into one skill folder, then watch three requests load one, two or all three levels: the catalog, the SKILL.md body, and a script whose code never enters the context.

Claude in the SDLC: Prompts in Git, a Change Gate by Path, a Claude Review That Advises and a Person Who Merges

Follow one prompt edit from a branch to a merge: version prompts and the model pin like code, keep the API key in GitHub Secrets, gate changes by path, let Claude review the diff, and leave the merge to a person.

Hooks That Block Destructive Actions: a PreToolUse Gate That Allows, Asks or Denies

A coding agent is told to clean up the data folder and picks rm -rf data/. A PreToolUse hook sees the call before the tool runs: tests and single-file deletes pass, a force push asks a person, and rm -rf, DROP TABLE and a write to .env are denied with a reason.

On this page

  • One repo, four places
  • Five files, each read for one thing
  • .claude/settings.json
  • app_config.json
  • A model of who reads what: envconfig.py
  • The workflow that runs in CI
  • Predict first: which places move?
  • The CI log
  • Common mistakes
  • Quick recap
  • Try it yourself
Community · Free to join
Single logo

StudyEasy AI Community

Hosted onSkool

Learn AI engineering, share what you build, and connect with other learners.

  • Free resources: lesson files, notebooks and code

  • Ask questions and join engineering discussions

  • Meet real people learning and building with AI

Join free on Skool

Related course on Udemy

Claude Certified Developer - Foundations (CCDV-F) Exam Prep

Build and ship Claude apps: the API, agents, tools and MCP, prompts, evals, security and model choice.View on Udemy ↗: Claude Certified Developer - Foundations (CCDV-F) Exam Prep (paid course, opens in a new tab)

Single logo

Empowering Education, One Course at a Time

About
About usContact usFAQs
Legal
Terms of ServicePrivacy Policy

© 2026 StudyEasy Organization. All rights reserved.