~/academy $ claude learn team-settings-and-plugins
Team settings, plugins and marketplaces
Claude Code settings files and precedence, sharing project settings through git, and installing plugins from marketplaces so a whole team gets the same setup. 9 min
$ Read
Four settings files
Claude Code reads settings from JSON files, and the file decides who a setting affects. Settings files are strict JSON: no comments, no trailing commas. Add the $schema line to get autocomplete in your editor.
A separate file, ~/.claude.json, holds your account details, MCP servers and per-project state such as trust decisions. Claude Code manages it, so you rarely edit it.
You, in every project on this machine
Everyone in the project. Commit it
You, in this project only. Kept out of git
Everyone your organisation deploys it to
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"permissions": {
"allow": ["Bash(npm run lint)", "Bash(npm run test *)"],
"deny": ["Read(./.env)", "Read(./.env.*)"]
}
}Lesson notes: Team settings, plugins and marketplaces
Everything in this lesson as text, for revision or to read without the interactive steps. By the end you will be able to: You share one settings file and one plugin with your team, and know which file wins when values clash.
Step 1 of 7 · Read
Four settings files
Claude Code reads settings from JSON files, and the file decides who a setting affects. Settings files are strict JSON: no comments, no trailing commas. Add the
$schemaline to get autocomplete in your editor.A separate file,
~/.claude.json, holds your account details, MCP servers and per-project state such as trust decisions. Claude Code manages it, so you rarely edit it.~/.claude/settings.json You, in every project on this machine
.claude/settings.json Everyone in the project. Commit it
.claude/settings.local.json You, in this project only. Kept out of git
Managed settings Everyone your organisation deploys it to
Start of any settings file { "$schema": "https://json.schemastore.org/claude-code-settings.json", "permissions": { "allow": ["Bash(npm run lint)", "Bash(npm run test *)"], "deny": ["Read(./.env)", "Read(./.env.*)"] } }Step 2 of 7 · Read
Which value wins
Highest first: managed settings, then command line (
--settingsfor one session), then project local, then shared project, then user. A value higher up overrides the same key lower down, and nothing you set overrides a managed key.Lists such as
permissions.allowmerge across files instead of replacing each other. Deny rules beat allow rules from any file, so a user-level deny blocks a project-level allow.Allow rules in a committed
.claude/settings.jsononly apply after each person accepts the workspace trust dialog for that folder; deny and ask rules apply straight away. Run/statusto see which settings files loaded, andclaude doctorto see entries Claude Code rejected.Step 3 of 7 · Quiz
Check your understanding
Your team's committed settings set the model to Sonnet. You want Opus in this project, just for you. Where do you set it?
- In .claude/settings.json
- In .claude/settings.local.json
- In ~/.claude/settings.json
- In CLAUDE.md
Show the answer
In .claude/settings.local.json Project local sits above shared project, and it is kept out of git, so only your sessions change.
Step 4 of 7 · Read
Plugins and marketplaces
A plugin bundles skills, subagents, hooks and MCP servers so they install as one unit. Its skills appear as
/plugin-name:skill-name. A marketplace is a catalogue that lists plugins and where to fetch them.Claude Code adds Anthropic's official marketplace,
claude-plugins-official, the first time you start an interactive session. Run/pluginto browse it, or/plugin install commit-commands@claude-plugins-officialto open a plugin's details, review what it adds and pick a scope: user, project or local.To add another marketplace, run
/plugin marketplace addwith a GitHubowner/repo, a git URL or a local path. From your normal shell,claude plugin installdoes the same job, which suits setup scripts.Step 5 of 7 · Try it in the terminal
Install a plugin for the whole project
From your shell (not inside a session), install commit-commands from claude-plugins-official at project scope so it is enabled for everyone in this repository.
Hint: claude plugin install, the name@marketplace, then --scope project.
Show the command
$ claude plugin install commit-commands@claude-plugins-official --scope project Successfully installed plugin: commit-commands@claude-plugins-official (scope: project)
Step 6 of 7 · Read
Share the setup with the team
Commit a
.claude/settings.jsonthat registers your team's marketplace and enables its plugins. Each teammate still installs a plugin once on their own machine; the file turns it on but does not download it.A plugin runs code with your user permissions: its hooks and MCP servers run outside the sandbox. Read the details pane and the plugin's source before you install. Official marketplaces auto-update by default and third-party ones do not. Organisations can limit plugins to approved marketplaces with
strictKnownMarketplacesin managed settings..claude/settings.json { "permissions": { "allow": ["Bash(npm run *)"], "ask": ["Bash(git push *)"], "deny": ["Read(./.env)", "Read(./secrets/**)"] }, "extraKnownMarketplaces": { "acme-tools": { "source": { "source": "github", "repo": "acme-corp/claude-plugins" } } }, "enabledPlugins": { "code-formatter@acme-tools": true } }Step 7 of 7 · Sort
Which file?
Should each setting go in the shared project file or your local file?
- Deny reads of the secrets folder
- Your preference for a different model in this repo
- The team marketplace and the plugins it enables
- An extra folder on your laptop you want Claude to read
- A PostToolUse hook that runs the project formatter
Show the answers
- Deny reads of the secrets folder: .claude/settings.json (shared). A rule everyone on the project should have.
- Your preference for a different model in this repo: .claude/settings.local.json (just you). Personal, and it overrides the shared value without touching teammates.
- The team marketplace and the plugins it enables: .claude/settings.json (shared). Shared tooling belongs in the committed file.
- An extra folder on your laptop you want Claude to read: .claude/settings.local.json (just you). The path only exists on your machine.
- A PostToolUse hook that runs the project formatter: .claude/settings.json (shared). Everyone should get the same formatting on every edit.