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

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 platform team puts Claude Code into five repositories on Monday. Settle four things first: which settings file wins, how a CI run works with nobody to approve, which extension fits a team habit, and how one setup reaches every repo.

Chaand Sheikh

·27 November 2026Claude Code

What you will learn

  • Predict which settings file wins, and why permission lists add up across files
  • Run Claude Code in CI with dontAsk and an allowlist instead of bypassing checks
  • Pick a hook for a rule that must always hold, and a plugin for a setup shared by many repositories
  • Check a plugin marketplace file before you ship it

Before you start

  • What Claude Code is
  • Choosing a Claude Code extension

A platform team has a good problem. Claude Code goes live in five repositories on Monday, and the lead's message is short: roll it out the same way everywhere.

Each repository has its own committed settings. Developers keep personal files too, and the company has a policy. Before Monday, four things need an answer:

  1. When two settings files disagree, which one wins?
  2. How does a pipeline run Claude Code with nobody there to say yes?
  3. Which extension fits a team habit?
  4. How does one setup reach every repository, with its updates?

The settings stack

What each file is for (CLAUDE.md advises, settings.json enforces, a plugin packages) is covered in CLAUDE.md, settings.json and plugins. This walk-through is about rolling them out to a whole team.

Settings come from several levels. A higher level wins.

Which level wins Managed deployed by the org, never overridden Command line settings flag, one session only Project local .claude/settings.local.json, yours Shared project .claude/settings.json, in git User ~/.claude/settings.json, every project higher level wins for a single value allow / deny lists merge across levels
The highest level wins, and lists add up.
  • Managed settings are deployed by the organization. Nothing overrides a managed key, not even the settings flag.
  • The command-line settings flag lasts for one session and sits just below managed.
  • The project local file holds your own overrides for this repository.
  • The shared project file is committed, so everyone who clones the repo gets it.
  • The user file applies in every project, at the bottom.

One exception: lists, such as the allow and deny rules, merge across files. They add up instead of replacing each other. In real Claude Code, the status command shows which settings sources loaded.

stack.py: the stack as a tiny stand-in

The example project models the stack in plain Python, with no model at all, so you can see the rule work. These are the four files:

// managed/managed-settings.json
{ "spinnerTipsEnabled": true,
  "permissions": { "deny": ["Bash(git push *)"] } }

// .claude/settings.local.json  (project local)
{ "spinnerTipsEnabled": false,
  "permissions": { "defaultMode": "plan", "allow": ["Bash(npm run lint)"] } }

// .claude/settings.json  (shared project)
{ "spinnerTipsEnabled": false,
  "permissions": { "defaultMode": "acceptEdits",
                   "allow": ["Bash(npm test)"], "deny": ["Read(./.env)"] } }

// home/.claude/settings.json  (user)
{ "model": "sonnet",
  "permissions": { "defaultMode": "default", "allow": ["Read"] } }
ORDER = [
    "managed", "command line", "project local", "shared project", "user",
]


def resolve(key, cli=None):
    for level in ORDER:
        value = dig(load(level, cli), key)
        if value is not None:
            return value, level
    return None, "nowhere"


def merged(key):
    rules = []
    for level in ORDER:
        rules += dig(load(level), key) or []
    return rules

resolve() walks the list from the top, and the first level that sets the key wins. merged() does the opposite for a list key: it adds every level together.

settings precedence
  defaultMode -> plan (project local)
  defaultMode -> dontAsk (command line)
  spinnerTipsEnabled -> True (managed)
  model -> sonnet (user)
lists merge
  allow: Bash(npm run lint), Bash(npm test), Read
  deny:  Bash(git push *), Read(./.env)

The default mode comes from the developer's own project local file. Pass a settings flag and the command line wins for that session. The tips key comes from managed, so both project files that set it to false lose. The model comes from the user file, because nobody higher sets it. And the allow and deny rules from every file are all in force together.

Decision 1: one developer wants plan mode

The committed settings set the default mode to acceptEdits. One developer wants plan mode for herself, in this repository only. It goes in the project local file. It is hers alone and sits above the shared file. The committed file would change it for every teammate, the user file is too low to beat the team's value, and managed settings would change policy for the whole organization.

Decision 2: CI runs with nobody to approve

A pipeline step runs Claude Code with the print flag to review pull requests. Nobody can answer a prompt. It may read files and run the test command, and nothing else.

The fit is dontAsk mode with an allowlist of read and the test command. dontAsk denies everything that isn't pre-approved, which is exactly what a locked-down pipeline needs. Here is the stand-in for what each mode does with one call:

def decide(mode, call, allow, deny):
    if call in deny:
        return "denied (deny rule)"
    if mode == "bypassPermissions":
        return "runs (no checks)"
    if call in allow:
        return "runs (allowed)"
    return "denied (not pre-approved)"
claude -p in CI
  dontAsk: npm test -> runs (allowed)
  dontAsk: npm publish -> denied (not pre-approved)
  dontAsk: git push * -> denied (deny rule)
  bypassPermissions: npm publish -> runs (no checks)
  bypassPermissions: git push * -> denied (deny rule)

The test command runs because it was pre-approved. Publish is denied because nobody approved it. A deny rule holds in every mode, bypass included. But look at the fourth line: bypass lets publish run, because it turns the checks off. It belongs only in an isolated container. The default mode with no rules would deny even the test command, and plan mode is for exploring a codebase before changes; it gives the run no allowlist. The review job itself is covered in a Claude Code review bot in CI.

Decision 3: a rule that must hold every time

Every file Claude edits must be formatted, every time, no exceptions. A line in CLAUDE.md is sometimes skipped. The fix is a hook that runs the formatter after each edit. A hook fires on its event without Claude deciding. A skill is instructions that Claude chooses whether to apply. A subagent isolates context for a side task and guarantees nothing runs. A slash command depends on people remembering to type it.

The demo prints the choice for five team habits:

extension choice
  hook      format every file after each edit, no exceptions
  skill     our release checklist, run when someone asks
  subagent  read forty files, report only the findings
  CLAUDE.md build and test commands every session must know
  plugin    the same setup in five repositories

The full decision guide is in choosing a Claude Code extension.

Decision 4: one setup, five repositories

The team built a review skill, a format hook and a test subagent. All five repositories need the same setup and its updates, from one place. Package them as a plugin in a marketplace, and declare it in each repository's committed project settings. A plugin bundles skills, hooks and subagents as one unit, and the marketplace delivers updates.

The alternatives drift. Hand copies mean a fix in one repo never reaches the other four. CLAUDE.md holds context and cannot define a hook. Asking each developer to install leaves no single place, so someone always misses an update.

{
  "name": "acme-tools",
  "description": "Plugins for the Acme platform team",
  "owner": { "name": "Acme Platform Team" },
  "plugins": [
    { "name": "team-kit",
      "source": "./plugins/team-kit",
      "description": "Review skill, format hook and test subagent" }
  ]
}

The project also has a miniature version of what claude plugin validate checks: the marketplace needs a name, an owner and a plugin list, a source must not climb out with .., and each entry's name must match the plugin's own manifest.

marketplace check
  acme-tools: ok
  renamed:    ['teamkit: manifest name is team-kit']

Rename the entry to teamkit and the check catches it, because the plugin's plugin.json still says team-kit. Run the real validator before you ship a marketplace change.

Common mistakes

  • Putting a personal preference in the committed file, so every teammate gets it.
  • Expecting a project file to override a managed key.
  • Thinking a lower file's allow rule disappears. Lists merge.
  • Using bypassPermissions in CI because "nobody can answer anyway".
  • Writing an every-time rule as a line in CLAUDE.md instead of a hook.
  • Copying the same .claude folder into five repos by hand.

Recap

QuestionAnswer
Which setting wins?The highest level that sets it; managed is never overridden; lists merge
Where does a personal tweak go?The project local file
How does CI run?-p with dontAsk and an allowlist; deny rules hold in every mode
A rule that must always hold?A hook
The same setup in many repos?A plugin from a marketplace, declared in each committed project file

Try it yourself

Add "model": "opus" to the shared project file and predict what resolve("model") returns before you run it. Then add Bash(npm publish) to the managed deny list and work out which of the five CI lines change.

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 · 7 of 66

Previous
Choosing a Claude Code Extension: Skill, Hook, Rules File, Subagent, Slash Command or Plugin
Next post
A Claude Code Review Bot in CI: Headless -p, JSON Findings, Team Rules in Git and a Person on the Merge

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.

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.

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.

On this page

  • The settings stack
  • stack.py: the stack as a tiny stand-in
  • Decision 1: one developer wants plan mode
  • Decision 2: CI runs with nobody to approve
  • Decision 3: a rule that must hold every time
  • Decision 4: one setup, five repositories
  • Common mistakes
  • 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.