Advanced · Lesson 6 of 7 · about 20 minutes · Needs: GitHub Actions · Verified against Claude Code v2.1.292 (stable) on 2026-10-15
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.
- 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 Beginner lesson 1 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.
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, which that table doesn't mark for commit, and CLAUDE.local.md (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 plugin shares skills, agents and hooks with a team as one unit (Create a Claude Code plugin), 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).
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" done
The 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 guide keeps the marketplace file in a folder nameddot-claude-plugin/so that its own repository can't act as a marketplace; the firstcurlsaves it 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 --strict
Each 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). A relativepathresolves against the repository's main checkout, so a session in a worktree loads the main checkout'steam-marketplace/(Require plugins per repository). 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). Type/team-kit:to see the plugin's skill (Interactive mode), then 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. If it asks to run a command along the way, check that the command only reads files, then approve it. The subagent loads too, asteam-kit:config-reviewer(Add components to a plugin): type@and pick it from the typeahead, where it's listed under that name, to call it (Create custom subagents). -
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). If it's still listed, run/reload-pluginsagain, or start a new session: a settings change reaches the loaded plugins only after a reload or at the next start (Plugin loading reference). 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.
Brief: move one piece of your Intermediate setup into team-kit, so everyone who clones the repository gets it from the plugin. 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). The Intermediate check for the component you move reads it from .claude/, so that check fails after the move; that's expected.
You are done when all of these are true:
- A committed team marketplace lists a plugin by a relative path, and the entry's name matches the
namein the plugin'splugin.json. - 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. -
.practice/a-6-validate.jsonrecords a strict validation of the plugin directory that passed. - Self-check (not tested): in a new session in your repository, after trust, your moved component loads from
team-kitwith no install command.
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; a folder still named dot-claude-plugin/ isn't a marketplace until you rename it to .claude-plugin/. 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. If the fifth fails, run the strict validation again from the repository's root and save its report after it passes.
- 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 they already accepted in an interactive session, or whosehasTrustDialogAcceptedflag is set in~/.claude.json(Manage Claude Code plugins for your organization); a cloud session never adds it, because it never shows the trust dialog (Plugin loading reference). The committed allow rules wait for the same dialog, which lists them (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).
- 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 · Create custom subagents · Interactive mode · Plugin security and trust · Configure permissions
← GitHub Actions · Advanced index · Put bounds on autonomous runs → · Topic: Plugins · Stuck on this lesson?