Claude Code guide in three levels, Beginner to Advanced: hands-on lessons with checked exercises, every volatile fact cited to its source. Independent community guide.
Share your setup with a team
Advanced · Lesson 6 of 7 · about 20 minutes · Needs: GitHub Actions · Verified against Claude Code v2.1.308 (stable) on 2026-10-25
Goal
By the end of this lesson you can share your Claude Code setup with a team: commit the settings everyone should get, keep your personal files out of git, and give the team a plugin that loads from a marketplace inside the repository.
You need
- Your own repository with your Intermediate setup: the committed
.claude/settings.jsonfrom Intermediate lesson 4, and the skills, hooks and subagents from lessons 1, 5 and 6. Set up its.practice/folder as the Intermediate index describes, if you haven't yet. - Your copy of the practice template with Node.js LTS and the Advanced checks (Practice): the check runs from the copy.
- bash,
curland git, on macOS, Linux or WSL 2. - Usage: light.
The idea
What everyone should get is committed: .claude/settings.json, CLAUDE.md, .claude/rules/, skills, agents and .mcp.json (Explore the .claude directory). What is yours stays out of git: .claude/settings.local.json and CLAUDE.local.md (Choose the right file, What's not shown). Your local file outranks the shared one, so a teammate can override a team setting for themselves without a commit, though lists such as permission rules merge instead (Settings files and precedence).
A committed .claude/ folder already shares skills, agents and hooks with everyone who clones this one repository. The docs say to keep that standalone setup while it serves one project, and to make a plugin when you want to share the setup with teammates, install it in several projects, or publish versioned releases (Create a Claude Code plugin). Inside one repository, a plugin can live in .claude/skills/<name>/ (Share the plugin through a repository) or in a marketplace folder. This lesson uses a marketplace: when a second repository needs the kit, you move that folder to its own repository and keep the same plugin (Go further).
A plugin shares skills, agents and hooks as one unit, and a marketplace is a folder whose .claude-plugin/marketplace.json lists plugins (Create a marketplace). Commit a marketplace inside the repository, declare it in extraKnownMarketplaces by a relative directory path, and turn its plugin on in enabledPlugins. Each teammate gets the plugin once they accept the workspace trust dialog for the folder (Manage Claude Code plugins for your organization), and installs nothing: a plugin listed by a relative path loads from the marketplace itself (Plugin loading reference).
Worked example
Your teammates keep asking how the repository's Claude Code setup works. Share a skill that explains it with everyone who clones the repository.
At your repository's root, download this guide's example marketplace into
team-marketplace/. Read each file before you commit it:base=https://raw.githubusercontent.com/wesammustafa/Claude-Code-Everything-You-Need-to-Know/main/examples/advanced/06-share-your-setup curl -fsSL --create-dirs "$base/dot-claude-plugin/marketplace.json" -o team-marketplace/.claude-plugin/marketplace.json for f in plugins/team-kit/.claude-plugin/plugin.json plugins/team-kit/skills/onboard/SKILL.md plugins/team-kit/agents/config-reviewer.md; do curl -fsSL --create-dirs "$base/$f" -o "team-marketplace/$f" doneThe marketplace,
team-tools, lists one plugin,team-kit, by the relative path./plugins/team-kit. The plugin holds a skill,onboard, that tells Claude to explain the repository's shared setup without changing files, and a subagent,config-reviewer, that can only read and search. The firstcurlsaves the marketplace file as.claude-plugin/marketplace.json, the path a marketplace uses (Create a marketplace).Validate the marketplace, then the plugin:
claude plugin validate ./team-marketplace claude plugin validate ./team-marketplace/plugins/team-kit --strictEach run ends with
✔ Validation passed(Create a marketplace). A marketplace run checks the marketplace file and its entries but doesn't open the skill and agent files of the plugins it lists (Validate a directory), so the second run validates the plugin directory, and--strictturns warnings into failures (Plugin commands reference).Share it in
.claude/settings.json. Add these keys beside the ones from the Intermediate lessons; ifenabledPluginsis already there from lesson 8, add theteam-kitline to it:"extraKnownMarketplaces": { "team-tools": { "source": { "source": "directory", "path": "./team-marketplace" } } }, "enabledPlugins": { "team-kit@team-tools": true }The key under
extraKnownMarketplacesis the marketplace'sname(Manage Claude Code plugins for your organization), and the plugin's id is<entry name>@<marketplace name>, hereteam-kit@team-tools(Entry name and manifest name). Adirectorysource names a local folder inpath(All settings). The example'ssettings.snippet.jsonholds the same keys plus a deny rule for.env, for a repository that has none.Commit both:
git add team-marketplace .claude/settings.json git commit -m "Share the team's Claude Code setup"If git reports a path as ignored,
git check-ignore -v <path>shows the rule that matches it; add the path withgit add -f, as in Intermediate lesson 1.Start
claudeat the repository's root, and accept the trust dialog if it appears. After the session starts, Claude Code registers the marketplace your settings declare and loadsteam-kitfrom it, with no install command (Plugin loading reference). Run/team-kit:onboard(Add components to a plugin). Claude reads the committed setup and explains what the repository shares and what stays personal; your wording will differ. The subagent loads too, asteam-kit:config-reviewer(Add components to a plugin).Turn the plugin off for yourself only. Add this key to
.claude/settings.local.json, beside the sandbox setting Intermediate lesson 4 saved there; ifenabledPluginsis already there, add theteam-kitline to it. If you're creating the file, wrap the key in{ }:"enabledPlugins": { "team-kit@team-tools": false }Save the file, then run
/reload-plugins(Plugin commands reference)./team-kit:onboardis gone from your session, while the committed file still turns the plugin on for everyone else: your local file outranks the project's (All settings). Then delete the entry, save the file and run/reload-pluginsagain. Ifgit statuslists.claude/settings.local.json, don't commit it: Your turn adds it to.gitignore.
Your turn
Brief: give every teammate the same Claude Code kit from git, and let each of them opt out without a commit. Your team wants the kit in its other repositories too, so start the move: take one piece of your Intermediate setup into team-kit, so everyone who clones this repository gets it from the plugin, and the same plugin can later serve the others. Take a skill, such as tdd from Intermediate lesson 1, or a subagent, such as test-gaps from lesson 6. For a harder move, take a hook from lesson 5: its entry goes in the plugin's hooks/hooks.json, in the same shape as in a settings file, with its script inside the plugin, called through ${CLAUDE_PLUGIN_ROOT} (Add components to a plugin).
Acceptance criteria:
- The component lives in
team-marketplace/plugins/team-kit/, asskills/<name>/SKILL.md,agents/<name>.mdor an entry inhooks/hooks.json, and the original is gone from.claude/; a moved hook is also gone from.claude/settings.json. claude plugin validate ./team-marketplace/plugins/team-kit --strictpasses. Save its report for the check, from the repository's root:claude plugin validate ./team-marketplace/plugins/team-kit --strict --json > .practice/a-6-validate.json.- A committed
.gitignorelists.claude/settings.local.jsonandCLAUDE.local.md, and git tracks neither. The rule Claude Code adds for the local settings file goes in your global git excludes file, which teammates don't share (Settings files and precedence), and the docs say to createCLAUDE.local.mdby hand and add it to.gitignoreyourself (Explore the .claude directory). Add its rule even if you have noCLAUDE.local.md. - Everything is committed, and in a new session the component runs under the plugin's name, such as
/team-kit:tddor theteam-kit:test-gapssubagent.
Because team-kit is listed by a relative path in a marketplace on your disk, Claude Code loads it in place: an edit under team-marketplace/ takes effect at the next session start or after /reload-plugins, with no version change (Plugin loading reference).
Check
You are done when all of these are true:
- A committed team marketplace lists a plugin by a relative path, and
.practice/a-6-validate.jsonrecords a strict validation of that plugin that passed. - The committed
.claude/settings.jsonregisters that marketplace by a relative path and turns the plugin on. - A component you moved is in the plugin and gone from
.claude/. - A committed
.gitignorekeeps.claude/settings.local.jsonandCLAUDE.local.mdout, and git tracks neither. - Self-check (not tested): you can say why a teammate gets
team-kitwith noclaude plugin install, when each teammate had to installclaude-code-setupin Intermediate lesson 8.
Run npm run check -- a-6 --dir <your repo> from your practice copy.
If the first item fails, run claude plugin validate ./team-marketplace and compare the entry's name with the plugin's plugin.json. If the second fails, check that the key under extraKnownMarketplaces is the marketplace's name, that the path is relative, such as ./team-marketplace, and that the plugin's value is true, not "true". If the third fails, run git status: the original may still be committed under .claude/, or the plugin's copy may not be committed yet. If the fourth fails, run git rm --cached on the tracked file, add both lines to .gitignore and commit.
Watch out
- Everyone who trusts the repository runs what
team-kitholds, with their own rights. A plugin's hooks and MCP server processes run outside the sandbox, and permission rules don't cover the code they run (Plugin security and trust). Review a change underteam-marketplace/as you review code. - The marketplace waits, without a message, until each teammate accepts the trust dialog for the folder, and a
claude -prun adds it only in a folder whose trust was already accepted (Manage Claude Code plugins for your organization). CI is such a run: a fresh checkout was never trusted, so it doesn't getteam-kitfrom these settings (When each surface applies the plugin keys). The committed allow rules wait for the same dialog (Configure permissions). - A component left in both
.claude/and the plugin loads twice:/tddand/team-kit:tddboth work, and a hook runs twice each time its event fires (Create a Claude Code plugin).
Go further
- Host and maintain a marketplace: move the marketplace to its own repository once several repositories need it, and release versions.
- Manage Claude Code plugins for your organization: require or restrict marketplaces and plugins on every machine through managed settings.
- A team's shared settings: a complete committed settings file to compare with yours.
Sources: Settings files and precedence · Explore the .claude directory · Create a Claude Code plugin · Manage Claude Code plugins for your organization · Plugin loading reference · Create a marketplace · Plugin commands reference · All settings · Add components to a plugin · Plugin security and trust · Configure permissions
← GitHub Actions · Advanced index · Put bounds on autonomous runs → · Topic: Plugins · Stuck on this lesson?