Skip to contentমূল লেখায় যান

Part 09পর্ব 09 · Configure

Settings & the .claude Folder

A test project shares its permissions, hooks, skills, and subagents through files. This page shows where each file lives, which setting wins when two files disagree, and what your QA team commits or keeps local.

10 min read10 মিনিটে পড়া যায় · 9 sections9টি সেকশন · 9 sources9টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Which setting winsকোন সেটিং জেতে

Stack five levels, switch each one on or off, and see which model value Claude Code really uses.পাঁচটা লেভেল সাজান, প্রতিটা চালু বা বন্ধ করুন, আর দেখুন Claude Code আসলে কোন model মান ব্যবহার করে।

2 min2 মিনিট8 steps8টি ধাপ
  • Model in useব্যবহৃত মডেলunset
  • Levels setting modelমডেল সেট করা লেভেল0 / 5
Managedম্যানেজডnot setসেট নেই--settingsকমান্ড লাইনnot setসেট নেইProject localপ্রজেক্ট লোকালnot setসেট নেইShared projectশেয়ার্ড প্রজেক্টnot setসেট নেইUserব্যবহারকারীnot setসেট নেইmodelমডেলunsetসেট নেইno level sets itকোনো লেভেল দেয়নি

You’ll learnআপনি শিখবেন

  • The five levels, highest firstপাঁচটা লেভেল, উঁচু থেকে নিচু✓
  • The highest level that sets a key winsযে উঁচু লেভেল key set করে সে জেতে
  • Managed settings cannot be overriddenmanaged settings বদলানো যায় না
  • List keys merge instead of competinglist key প্রতিযোগিতা না করে মার্জ হয়
  • An env var is not a level, and it winsenv var লেভেল নয়, তবু সে জেতে

Settings files

Settings are the JSON keys that change how Claude Code behaves:

There are four settings scopes: Source 1সোর্স 1

ScopeFileWho it affects
User~/.claude/settings.jsonYou, in all your projects
Shared project.claude/settings.jsonEveryone working in the folder. Teammates get it when you commit it.
Project local.claude/settings.local.jsonYou, in this project only
Managedmanaged-settings.json and other managed sourcesEveryone your organization deploys it to

~/.claude.json is a fifth file that Claude Code writes for itself. It holds your account details, MCP server configurations, per-project state such as trust decisions, and the global config keys that /config writes for you. You do not need to edit it. Source 1সোর্স 1 When Claude Code rewrites ~/.claude.json, it copies earlier versions into ~/.claude/backups/. It keeps the five newest, and also a copy of any version that it could not parse. Source 2সোর্স 2

Write valid JSON

Settings files are strict JSON. A // comment or a trailing comma is a syntax error. Source 1সোর্স 1 Add the $schema key to get autocomplete and validation in your editor: Source 1সোর্স 1

{
  "$schema": "https://json.schemastore.org/claude-code-settings.json"
}

সহজ English

Settings are JSON keys that change how Claude Code behaves. They set the default model, the actions that run without a question, the files that Claude cannot read, and the rules that an organization enforces. Source 1সোর্স 1

There are four settings scopes: Source 1সোর্স 1

  • User: ~/.claude/settings.json. It applies to you, in all your projects.
  • Shared project: .claude/settings.json. It applies to everyone in the folder. Teammates get it when you commit it.
  • Project local: .claude/settings.local.json. It applies to you, in this project only.
  • Managed: managed-settings.json and other managed sources. It applies to everyone that your organization deploys it to.

Installing Claude Code does not create a settings file. Claude Code writes ~/.claude/settings.json the first time you change a user option in /config. It writes .claude/settings.local.json the first time you give a standing approval ("Yes, and don't ask again"). Source 1সোর্স 1

Claude Code also writes ~/.claude.json for itself. You do not need to edit it. Source 1সোর্স 1

Settings files are strict JSON. A // comment or a trailing comma is a syntax error. Add the $schema key to get autocomplete and validation in your editor. Source 1সোর্স 1

বাংলা ব্যাখ্যা

Settings হলো JSON key, যা Claude Code-এর আচরণ বদলায়: default model, কোন কাজ জিজ্ঞাসা ছাড়াই চলবে, Claude কোন file পড়তে পারবে না, এবং একটি organization কী enforce করে। Source 1সোর্স 1

Settings-এর চারটি scope আছে: Source 1সোর্স 1

  • User: ~/.claude/settings.json। এটি আপনার সব project-এ আপনার জন্য প্রযোজ্য।
  • Shared project: .claude/settings.json। Folder-এ যাঁরা কাজ করেন, তাঁদের সবার জন্য প্রযোজ্য। আপনি commit করলে teammate-রা এটি পান।
  • Project local: .claude/settings.local.json। শুধু এই project-এ আপনার জন্য প্রযোজ্য।
  • Managed: managed-settings.json এবং অন্যান্য managed source। আপনার organization যাঁদের কাছে এটি deploy করে, তাঁদের সবার জন্য প্রযোজ্য।

Claude Code install করলে কোনো settings file তৈরি হয় না। আপনি প্রথমবার /config-এ কোনো user option বদলালে Claude Code ~/.claude/settings.json লেখে। প্রথমবার স্থায়ী অনুমতি ("Yes, and don't ask again") দিলে Claude Code .claude/settings.local.json লেখে। Source 1সোর্স 1 Windows-এ ~/.claude মানে %USERPROFILE%\.claude। Source 1সোর্স 1

~/.claude.json হলো পঞ্চম একটি file, যা Claude Code নিজের জন্য লেখে। এতে আপনার account details, MCP server configuration, project-ভিত্তিক state (যেমন trust decision) এবং global config key থাকে। এটি edit করার দরকার নেই। Source 1সোর্স 1

Settings file হলো strict JSON। // comment বা trailing comma থাকলে syntax error হয়। Editor-এ autocomplete ও validation পেতে $schema key যোগ করুন। Source 1সোর্স 1

Which setting wins

When two files set the same key, Claude Code uses the value from the highest level that sets it. Source 1সোর্স 1 The levels, highest first: Source 1সোর্স 1

  1. Managed settings
  2. Command line (--settings)
  3. Project local (.claude/settings.local.json)
  4. Shared project (.claude/settings.json)
  5. User (~/.claude/settings.json)

On macOS, the managed settings file is /Library/Application Support/ClaudeCode/managed-settings.json. On Linux and WSL it is /etc/claude-code/managed-settings.json. On Windows it is C:\Program Files\ClaudeCode\managed-settings.json. Source 4সোর্স 4

Example: the team commits "model": "sonnet" in .claude/settings.json. You put "model": "opus" in .claude/settings.local.json. Project local is higher than shared project, so your sessions in this project use opus. Source 1সোর্স 1 The Claude Models page lists the model aliases.

সহজ English

When two files set the same key, Claude Code uses the value from the highest level that sets it. Source 1সোর্স 1 The levels, from highest to lowest, are: managed settings, the command line (--settings), project local, shared project, and user. Source 1সোর্স 1

List keys such as permissions.allow merge: Claude Code combines the lists from the files. Source 1সোর্স 1 A single-value key such as model uses the most specific value. Source 2সোর্স 2 Nothing in your own settings files or in --settings overrides a managed key. Source 1সোর্স 1

Environment variables are not a level in this stack. For example, ANTHROPIC_MODEL in your shell applies over the model key from any settings file. --model overrides both for one session. Source 1সোর্স 1 Source 3সোর্স 3

Example: the team commits "model": "sonnet" in .claude/settings.json. You put "model": "opus" in .claude/settings.local.json. Project local is higher than shared project, so your sessions in this project use opus. Source 1সোর্স 1

বাংলা ব্যাখ্যা

দুটি file একই key set করলে, যে সবচেয়ে উঁচু level key-টি set করে, Claude Code সেই level-এর value ব্যবহার করে। Source 1সোর্স 1 Level-গুলো, উঁচু থেকে নিচু: managed settings, command line (--settings), project local (.claude/settings.local.json), shared project (.claude/settings.json), এবং user (~/.claude/settings.json)। Source 1সোর্স 1

  • permissions.allow-এর মতো list key বিভিন্ন file থেকে merge হয়। Claude Code একটি list বেছে না নিয়ে list-গুলো একসাথে করে। Source 1সোর্স 1 model-এর মতো single-value key সবচেয়ে specific value-টি নেয়। Source 2সোর্স 2
  • Managed settings সবচেয়ে উঁচু level। আপনার নিজের settings file বা --settings কোনো managed key override করতে পারে না। Source 1সোর্স 1 কিছু restrictive key ব্যতিক্রম, যেমন disableClaudeAiConnectors: true যেকোনো scope থেকে কাজ করে। Source 1সোর্স 1
  • Environment variable এই stack-এর কোনো level নয়। যেমন, আপনার shell-এর ANTHROPIC_MODEL যেকোনো settings file-এর model key-এর উপরে প্রযোজ্য হয়, আর --model এক session-এর জন্য দুটিকেই override করে। Source 1সোর্স 1 Source 3সোর্স 3

macOS-এ managed settings file হলো /Library/Application Support/ClaudeCode/managed-settings.json, Linux ও WSL-এ /etc/claude-code/managed-settings.json, আর Windows-এ C:\Program Files\ClaudeCode\managed-settings.json। Source 4সোর্স 4

উদাহরণ: team .claude/settings.json-এ "model": "sonnet" commit করে। আপনি .claude/settings.local.json-এ "model": "opus" রাখেন। Project local, shared project-এর চেয়ে উঁচু, তাই এই project-এ আপনার session-গুলো opus ব্যবহার করে। Source 1সোর্স 1

The settings you will use most

permissions

permissions.allow, permissions.ask, and permissions.deny take rule strings in the form Tool or Tool(specifier). Source 3সোর্স 3 For example: Bash, Bash(npm run *), Read(./.env), or WebFetch(domain:example.com). Source 3সোর্স 3 Claude Code evaluates deny rules first, then ask, then allow, and the first match decides. Source 3সোর্স 3

Example: a shared .claude/settings.json for a test project.

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

Deny rules do not stop every read

A deny rule does not cover a command that reads files without naming them, such as grep -r pattern ., or any subprocess. For enforcement at the operating system level, use the sandbox. Source 3সোর্স 3 Source 1সোর্স 1

permissions.defaultMode sets the starting permission mode. Its values are default, acceptEdits, plan, auto, dontAsk, bypassPermissions, and manual (an alias of default). auto and bypassPermissions do not take effect from project or local settings. Source 3সোর্স 3 The Permission Modes page explains each mode.

সহজ English

These are the keys that a QA team uses most:

  • permissions: allow, ask, and deny take rules such as Bash(npm run *) or Read(./.env). Claude Code checks deny rules first, then ask, then allow. The first match decides. Source 3সোর্স 3 A deny rule does not cover a command that reads files without naming them, such as grep -r pattern .. For enforcement at the operating system level, use the sandbox. Source 3সোর্স 3
  • permissions.defaultMode sets the starting permission mode. Source 3সোর্স 3

বাংলা ব্যাখ্যা

QA team সবচেয়ে বেশি যে key-গুলো ব্যবহার করে:

  • permissions.allow, permissions.ask এবং permissions.deny rule string নেয়, যেমন Bash(npm run *) বা Read(./.env)। Claude Code প্রথমে deny, তারপর ask, তারপর allow rule দেখে, এবং প্রথম match-টিই সিদ্ধান্ত নেয়। Source 3সোর্স 3
  • Committed .claude/settings.json-এর allow rule শুধু আপনি workspace trust dialog accept করার পরে কাজ করে। deny ও ask rule সঙ্গে সঙ্গে কাজ করে। Source 3সোর্স 3 Source 1সোর্স 1
  • Deny rule এমন command-কে আটকায় না, যা file-এর নাম না দিয়েই file পড়ে (যেমন grep -r pattern .), বা কোনো subprocess-কে। Operating system level-এ enforce করতে sandbox ব্যবহার করুন। Source 3সোর্স 3 Source 1সোর্স 1
  • permissions.defaultMode শুরুর permission mode set করে। auto এবং bypassPermissions project বা local settings থেকে কাজ করে না। Source 3সোর্স 3

env

env sets environment variables for every session and its subprocesses. Source 3সোর্স 3 An example from the docs: Source 3সোর্স 3

{
  "env": {
    "DISABLE_AUTO_COMPACT": "1"
  }
}

Project and local settings cannot set some variables, for example the ones for telemetry export. Source 3সোর্স 3

Example: a test team can set the URL of its test environment in env, for example "BASE_URL": "https://staging.example.com". Keep secrets out of committed files.

hooks

hooks is an object keyed by hook event. Each value is an array of groups with a matcher and a hooks list. Source 3সোর্স 3 The handler type can be command, prompt, agent, http, or mcp_tool. Hooks from different files merge. Source 3সোর্স 3

This example uses a script from your own repository. Its shape follows the hooks key in the settings reference:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          { "type": "command", "command": "./scripts/format-changed-file.sh" }
        ]
      }
    ]
  }
}

The Hooks page explains hooks in detail.

model

model sets the model for new sessions. Its value is an alias or a full model ID, and it is unset by default. Source 3সোর্স 3 --model beats ANTHROPIC_MODEL, and both beat this key for one session. Source 3সোর্স 3

{
  "model": "sonnet"
}

Keys from other pages

The CLAUDE.md & Memory page explains the memory keys.

সহজ English

Some other keys: claudeMdExcludes skips CLAUDE.md files in a monorepo. Source 5সোর্স 5 outputStyle selects an output style. Source 6সোর্স 6 cleanupPeriodDays deletes old session transcripts. Its default is 30 days. Source 2সোর্স 2

বাংলা ব্যাখ্যা

  • env প্রতিটি session ও তার subprocess-এর জন্য environment variable set করে। Source 3সোর্স 3 Committed file-এ secret রাখবেন না।
  • hooks একটি object, যার key হলো hook event-এর নাম। বিভিন্ন file-এর hook merge হয়। Source 3সোর্স 3
  • model নতুন session-এর model set করে। Default-এ এটি unset থাকে। Source 3সোর্স 3

অন্যান্য key: autoMemoryEnabled ও autoMemoryDirectory auto memory নিয়ন্ত্রণ করে। Source 3সোর্স 3 Source 5সোর্স 5 claudeMdExcludes monorepo-তে CLAUDE.md file বাদ দেয়। Source 5সোর্স 5 outputStyle একটি output style বেছে নেয়। Source 6সোর্স 6 cleanupPeriodDays পুরোনো session transcript মুছে দেয়; এর default 30 দিন। Source 2সোর্স 2

Check and change settings

TaskCommand
Open the settings menu/config Source 1সোর্স 1 Source 7সোর্স 7
Set one option/config key=value Source 1সোর্স 1 Source 7সোর্স 7
See which settings files loaded/status, the Setting sources line Source 1সোর্স 1
List entries that Claude Code rejectedclaude doctor Source 1সোর্স 1

Claude Code watches the settings files. It applies most edits, including edits to permissions and hooks, to the running session without a restart. Source 1সোর্স 1

To apply settings for one session, pass --settings with a JSON string or a file path. These keys sit above the user, project, and local files and below managed settings. Source 1সোর্স 1

claude --settings '{"model": "opus"}'

সহজ English

Use these commands to check and change settings:

Claude Code watches the settings files. It applies most edits, including edits to permissions and hooks, to the running session. You do not need to restart. Source 1সোর্স 1

To apply settings for one session only, pass --settings with a JSON string or a file path. These keys are above the user, project, and local files, and below managed settings. Source 1সোর্স 1

বাংলা ব্যাখ্যা

Settings দেখা ও বদলানোর command:

Claude Code settings file-গুলোর উপর নজর রাখে। বেশিরভাগ edit, permissions ও hooks-এর edit-সহ, restart ছাড়াই চলমান session-এ প্রয়োগ হয়। Source 1সোর্স 1

শুধু একটি session-এর জন্য settings দিতে --settings-এর সাথে একটি JSON string বা একটি file path দিন। এই key-গুলো user, project ও local file-এর উপরে এবং managed settings-এর নিচে থাকে। Source 1সোর্স 1

The .claude folder

A project .claude/ folder can hold these files and folders. The commands/ folder is the older format: it still works, but prefer a skill for new work. Source 2সোর্স 2 Source 8সোর্স 8

your-project/
├── CLAUDE.md
├── .mcp.json                  ← team MCP servers
└── .claude/
    ├── settings.json          ← committed
    ├── settings.local.json    ← gitignored
    ├── rules/
    ├── skills/
    ├── commands/              ← legacy, use skills/
    ├── output-styles/
    ├── agents/
    ├── workflows/
    └── agent-memory/

workflows/ holds dynamic workflow scripts that orchestrate many subagents. agent-memory/ holds subagent persistent memory, separate from the auto memory of your main session. Source 2সোর্স 2

The project root can also hold .worktreeinclude. Source 2সোর্স 2

Your user folder ~/.claude/ holds CLAUDE.md, settings.json, keybindings.json, themes/, projects/<project>/memory/ (auto memory), rules/, skills/, commands/, output-styles/, agents/, and agent-memory/. Source 2সোর্স 2

PathWhat it holds
.claude/skills/<name>/SKILL.mdOne skill. Each skill is a folder with a SKILL.md file. User skills live in ~/.claude/skills/. Source 2সোর্স 2 Source 8সোর্স 8
.claude/commands/*.mdCustom commands. They merged into skills. Existing files still work, but new work should use skills. Source 8সোর্স 8 Source 2সোর্স 2
.claude/agents/*.mdSubagents. User subagents live in ~/.claude/agents/. Source 2সোর্স 2
.claude/rules/*.mdTopic rules, optionally limited to some paths with paths: frontmatter Source 2সোর্স 2
.claude/output-styles/*.mdOutput styles. User styles live in ~/.claude/output-styles. Source 6সোর্স 6 Source 2সোর্স 2
~/.claude/projects/<project>/memory/Auto memory. It is not in ~/.claude/memory/. Source 5সোর্স 5 Source 2সোর্স 2

.claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both create /deploy. If a skill and a command have the same name, the skill wins. Source 8সোর্স 8

সহজ English

A project .claude/ folder can hold the settings files and folders for rules, skills, commands, output styles, subagents (agents/), workflows, and subagent memory. The team MCP servers go in .mcp.json at the project root. Source 2সোর্স 2

বাংলা ব্যাখ্যা

একটি project-এর .claude/ folder-এ settings file এবং rules, skills, commands, output styles, subagents (agents/), workflows ও agent memory-র folder থাকতে পারে। Team-এর MCP server-গুলো থাকে project root-এর .mcp.json-এ। Source 2সোর্স 2

  • workflows/-এ dynamic workflow script থাকে, যা অনেক subagent-কে orchestrate করে। agent-memory/-এ subagent-এর persistent memory থাকে, যা আপনার main session-এর auto memory থেকে আলাদা। Source 2সোর্স 2
  • প্রতিটি skill হলো .claude/skills/<name>/-এ একটি folder, যার ভেতরে একটি SKILL.md file থাকে। User skill থাকে ~/.claude/skills/-এ। Source 2সোর্স 2 Source 8সোর্স 8
  • commands/ folder পুরোনো format। এটি এখনও কাজ করে, তবে নতুন কাজের জন্য skill ব্যবহার করুন। একই নামের skill ও command থাকলে skill জেতে। Source 8সোর্স 8
  • Subagent থাকে .claude/agents/-এ। Source 2সোর্স 2
  • Auto memory থাকে ~/.claude/projects/<project>/memory/-এ, ~/.claude/memory/-এ নয়। Source 5সোর্স 5 Source 2সোর্স 2

Which file do I edit?

You want toEdit
Give Claude project contextCLAUDE.md Source 2সোর্স 2
Allow or block tool callspermissions or hooks in settings.json Source 2সোর্স 2
Set environment variablesenv in settings.json Source 2সোর্স 2
Override a setting for yourselfsettings.local.json Source 2সোর্স 2
Add a /name promptskills/<name>/SKILL.md Source 2সোর্স 2
Add a subagentagents/*.md Source 2সোর্স 2
Add an MCP server for the team.mcp.json Source 2সোর্স 2
Change the response formatoutput-styles/*.md Source 2সোর্স 2

Settings are enforced, CLAUDE.md is not

The docs say about permissions and hooks in settings: "Unlike CLAUDE.md, which Claude reads as guidance, these are enforced whether Claude follows them or not." Source 2সোর্স 2

সহজ English

To find the file to edit: put project context in CLAUDE.md. To allow or block tool calls, use permissions or hooks in settings.json. To override a setting for yourself, use settings.local.json. Source 2সোর্স 2

Claude reads CLAUDE.md as guidance. The permissions and hooks in settings are enforced, whether Claude follows them or not. Source 2সোর্স 2

বাংলা ব্যাখ্যা

কোন file edit করবেন: project context-এর জন্য CLAUDE.md; tool call allow বা block করতে settings.json-এর permissions বা hooks; environment variable-এর জন্য settings.json-এর env; নিজের জন্য কোনো setting override করতে settings.local.json; team-এর MCP server যোগ করতে .mcp.json। Source 2সোর্স 2

Claude CLAUDE.md-কে guidance হিসেবে পড়ে। কিন্তু settings-এর permissions ও hooks enforce করা হয়, Claude সেগুলো মানুক বা না মানুক। Source 2সোর্স 2

MCP configuration files

MCP servers have three scopes: Source 9সোর্স 9

ScopeStored inWho gets it
Local (default)~/.claude.jsonYou, in the current project only
Project.mcp.jsonEveryone, through version control
User~/.claude.jsonYou, in all your projects

.mcp.json lives at the project root, not inside .claude/. Commit it to share the servers with the team. Source 9সোর্স 9 Source 2সোর্স 2 This command writes a server to .mcp.json: Source 9সোর্স 9

claude mcp add --transport http shared-server --scope project https://example.com/mcp

In interactive sessions, Claude Code asks for approval before it uses a project-scoped server. Source 9সোর্স 9

.mcp.json supports references to environment variables such as ${API_KEY}, with an optional default in the form ${VAR:-default}, so secrets stay out of the file. Source 2সোর্স 2 Source 9সোর্স 9 Example: a QA team writes ${QA_DB_DSN} for its test database server, and each tester sets the real value in the shell. A remote server that needs OAuth, such as one for Jira, signs in through /mcp: run /mcp and follow the steps in your browser, so the file holds no Jira token. Source 9সোর্স 9 The MCP Servers page covers MCP servers in detail.

সহজ English

MCP servers have three scopes: Source 9সোর্স 9

  • Local (the default): stored in ~/.claude.json. It is for you, in the current project only.
  • Project: stored in .mcp.json. It is for everyone, through version control.
  • User: stored in ~/.claude.json. It is for you, in all your projects.

.mcp.json is at the project root, not in .claude/. Commit it to share the servers with the team. Source 9সোর্স 9 Source 2সোর্স 2 The command claude mcp add with --scope project writes a server to .mcp.json. Source 9সোর্স 9 In interactive sessions, Claude Code asks for approval before it uses a project-scoped server. Source 9সোর্স 9

.mcp.json can refer to environment variables such as ${API_KEY}, with an optional default in the form ${VAR:-default}. Thus secrets stay out of the file. Source 2সোর্স 2 Source 9সোর্স 9 For example, a QA team writes ${QA_DB_DSN} for its test database server, and each tester sets the real value in the shell. A remote server that needs OAuth, such as one for Jira, signs in through /mcp: run /mcp and follow the steps in your browser. Thus the file holds no Jira token. Source 9সোর্স 9

বাংলা ব্যাখ্যা

MCP server-এর তিনটি scope আছে: Source 9সোর্স 9

  • Local (default): ~/.claude.json-এ থাকে। শুধু বর্তমান project-এ আপনার জন্য।
  • Project: .mcp.json-এ থাকে। Version control-এর মাধ্যমে সবার জন্য।
  • User: ~/.claude.json-এ থাকে। আপনার সব project-এ আপনার জন্য।

.mcp.json থাকে project root-এ, .claude/-এর ভেতরে নয়। Team-এর সাথে server share করতে এটি commit করুন। Source 9সোর্স 9 Source 2সোর্স 2 --scope project-সহ claude mcp add command একটি server-কে .mcp.json-এ লেখে। Source 9সোর্স 9 Interactive session-এ project-scoped server ব্যবহারের আগে Claude Code অনুমতি চায়। Source 9সোর্স 9

.mcp.json-এ ${API_KEY}-এর মতো environment variable-এর reference দেওয়া যায় (${VAR:-default} দিয়ে default-ও দেওয়া যায়), তাই secret file-এর বাইরে থাকে। Source 2সোর্স 2 Source 9সোর্স 9 উদাহরণ: একটি QA team তার test database server-এর জন্য ${QA_DB_DSN} লেখে, আর প্রত্যেক tester নিজের shell-এ আসল value set করেন। OAuth লাগে এমন remote server (যেমন Jira-র জন্য একটি) /mcp দিয়ে sign in করে: /mcp চালিয়ে browser-এর ধাপগুলো অনুসরণ করুন। ফলে file-এ কোনো Jira token থাকে না। Source 9সোর্স 9

What to commit

Commit .claude/settings.json so that everyone who clones the repository gets the same permissions, hooks, and plugins. Each teammate can override a setting in .claude/settings.local.json. Source 1সোর্স 1

CommitKeep local
CLAUDE.md Source 2সোর্স 2.claude/settings.local.json Source 2সোর্স 2
.claude/settings.json Source 2সোর্স 2CLAUDE.local.md Source 5সোর্স 5
.claude/rules/ Source 2সোর্স 2~/.claude.json Source 2সোর্স 2
.claude/skills/ and .claude/agents/ Source 2সোর্স 2.claude/agent-memory-local/ Source 2সোর্স 2
.mcp.json and .claude/agent-memory/ Source 2সোর্স 2
  • When Claude Code first writes .claude/settings.local.json, it adds **/.claude/settings.local.json to your global git excludes. If you create the file yourself, add it to .gitignore. Source 1সোর্স 1 Source 2সোর্স 2
  • A committed key does not always reach your teammates. Some keys never apply from a repository file. permissions.allow, additionalDirectories, extraKnownMarketplaces, and most env values wait until the user accepts workspace trust. Source 1সোর্স 1
  • In a git repository, if you start Claude Code in a subdirectory, it reads and writes .claude/settings.local.json at the repository root (v2.1.211 or later). It reads the shared .claude/settings.json from the session's primary working directory. Source 1সোর্স 1 On Windows, outside a git repository, and in a few other cases, the local file stays next to .claude/settings.json. Source 1সোর্স 1
  • Of the settings files, a cloud session reads the committed .claude/settings.json. It does not read user or local settings files. Server-managed settings also reach a cloud session. Source 1সোর্স 1

Example

A test repository that a QA team shares:

payment-service/
├── CLAUDE.md                     ← test commands and conventions
├── .mcp.json                     ← Jira (OAuth) and test database (${QA_DB_DSN}) servers
└── .claude/
    ├── settings.json             ← allow test commands, deny .env
    ├── skills/test-design/SKILL.md
    └── agents/
        ├── qa-agent.md
        └── sdet-agent.md

Each tester keeps a personal .claude/settings.local.json and, if needed, a CLAUDE.local.md.

সহজ English

Commit the file .claude/settings.json. Then everyone who clones the repository gets the same permissions, hooks, and plugins. A teammate can change a setting for themselves in .claude/settings.local.json. Source 1সোর্স 1

Commit these files and folders. They are shared with the team: Source 2সোর্স 2

  • CLAUDE.md
  • .claude/settings.json
  • .claude/rules/
  • .claude/skills/
  • .claude/agents/
  • .mcp.json
  • .claude/agent-memory/

Keep these on your own machine. They are personal:

Some things to know:

বাংলা ব্যাখ্যা

.claude/settings.json commit করুন, যাতে repository clone করা সবাই একই permissions, hooks ও plugins পান। প্রত্যেক teammate .claude/settings.local.json-এ কোনো setting override করতে পারেন। Source 1সোর্স 1

Commit করুন: CLAUDE.md, .claude/settings.json, .claude/rules/, .claude/skills/, .claude/agents/, .mcp.json এবং .claude/agent-memory/। Local রাখুন: .claude/settings.local.json, ~/.claude.json এবং .claude/agent-memory-local/। Source 2সোর্স 2 CLAUDE.local.md-ও local রাখুন। Source 5সোর্স 5

  • Claude Code প্রথমবার .claude/settings.local.json লেখার সময় আপনার global git excludes-এ **/.claude/settings.local.json যোগ করে। File-টি নিজে তৈরি করলে এটি .gitignore-এ যোগ করুন। Source 1সোর্স 1 Source 2সোর্স 2
  • Commit করা key সবসময় teammate-দের কাছে পৌঁছায় না। কিছু key repository file থেকে কখনো প্রয়োগ হয় না। permissions.allow, additionalDirectories, extraKnownMarketplaces এবং বেশিরভাগ env value আপনি workspace trust accept করা পর্যন্ত অপেক্ষা করে। Source 1সোর্স 1
  • Git repository-তে subdirectory থেকে Claude Code চালু করলে এটি repository root-এর .claude/settings.local.json পড়ে ও লেখে (v2.1.211 বা তার পরের version)। Shared .claude/settings.json এটি session-এর primary working directory থেকে পড়ে। Windows-এ, git repository-র বাইরে এবং আরও কিছু ক্ষেত্রে local file .claude/settings.json-এর পাশেই থাকে। Source 1সোর্স 1
  • Settings file-গুলোর মধ্যে cloud session শুধু commit করা .claude/settings.json পড়ে, user বা local settings file পড়ে না। Server-managed settings-ও cloud session-এ পৌঁছায়। Source 1সোর্স 1
  1. [1]
    Settings files and precedence

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  2. [2]
    Explore the .claude directory

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  3. [3]
    Settings reference

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  4. [4]
    Deploy managed settings

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  5. [5]
    How Claude remembers your project

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  6. [6]
    Output styles

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  7. [7]
    Commands

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  8. [8]
    Extend Claude with skills

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  9. [9]
    Connect Claude Code to tools via MCP

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10