The marketplace¶
A marketplace is a git repository with a .claude-plugin/marketplace.json. This one is called
<owner> and offers the plugins listed in the plugin catalogue.
# on this machine, where the repository already lives
claude plugin marketplace add /srv/projects/claude
# on any other machine
claude plugin marketplace add <owner>/claude
claude plugin install dev-env@<owner>
claude plugin validate . --strict # before committing a manifest change
Inside a session the same commands exist as /plugin …. A repository that needs a plugin
declares it in its .claude/settings.json, so Claude Code offers it when the folder is first
trusted:
{
"extraKnownMarketplaces": {
"<owner>": { "source": { "source": "github", "repo": "<owner>/claude" }, "autoUpdate": true }
},
"enabledPlugins": { "dev-env@<owner>": true }
}
How changes reach a machine¶
- On the Linux host, the marketplace is a local directory (
/srv/projects/claude, sourcedirectoryin~/.claude/plugins/known_marketplaces.json). Claude Code still installs a versioned copy of each plugin,~/.claude/plugins/cache/<owner>/<name>/<version>/, whichinstallPathin~/.claude/plugins/installed_plugins.jsonnames. An edit in the checkout reaches a session only once that copy is refreshed. - Anywhere else, the marketplace is a clone of
<owner>/claude, and each plugin is a copy in~/.claude/plugins/cache/. With"autoUpdate": true, Claude Code refreshes both in the background after startup. Third-party marketplaces default tofalse, so set it, in settings as above or under Marketplaces in/plugin. Otherwise runclaude plugin marketplace update <owner>. - Everywhere, a copy is replaced only when the plugin's
versionchanges. So every change to a plugin bumps theversionin itsplugin.json, and CI refuses a pull request that changes a plugin without one. To let a repository pin a plugin, cut a release tag withclaude plugin tag plugins/<name>.
A Desktop session on a remote host¶
A Claude Desktop session on the Linux host runs the client's own copies of the plugins. They lose their file mode and keep the client's line endings: desktop-remote.md.
Access to the private repository¶
This repository is private. Claude Code has no git credential of its own, and
marketplace.json has no field for one. Adding, installing and updating all run the machine's
own git, with prompts turned off. So a credential that git would have to ask for fails. In a
background auto-update it fails quietly and leaves the last synced copy in place.
What has to be true on each machine:
- HTTPS (the usual case): a credential helper that already holds a GitHub credential. With
the GitHub CLI that is
gh auth loginfollowed bygh auth setup-git. On Windows, Git Credential Manager works once it has stored a login. - SSH: a key that works without a passphrase prompt (loaded in
ssh-agent), andgithub.cominknown_hosts. Forowner/repo, Claude Code tries SSH first and falls back to HTTPS. On a machine without a GitHub SSH key, setCLAUDE_CODE_PLUGIN_PREFER_HTTPS=1to skip that probe. - A token in the environment is not enough on its own.
GITHUB_TOKENorGH_TOKENauthenticates git only through a helper that reads it, such asgh's. On the Linux host, the home session and login shells have noGITHUB_TOKEN(#304). Thereghand git (throughgh auth git-credential) usegh's stored login. In a sandbox, the sbx proxy puts the token into the requests. - Optional:
CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE=1keeps the existing checkout when a background check cannot reach GitHub, instead of attempting a fresh clone.
The token needs read access to <owner>/claude. On the Linux host it has the classic scopes
(repo, read:org, project, workflow, user), because fine-grained tokens have no Projects
permission for projects owned by a user account. See Rotating tokens.
Why a marketplace¶
Why a marketplace, rather than copying skill folders into each repository or symlinking one
folder into ~/.claude/skills:
- One source. A copy in five repositories drifts, and a stale skill is worse than a missing one. A skill is instructions an agent follows silently, so an out-of-date copy produces wrong behaviour without ever producing an error.
- Pinning when needed. A marketplace entry can name a
reforsha, and<owner>/claude#<ref>pins the whole catalogue, so a repository can deliberately stay on an older plugin. - Namespacing. A plugin skill is addressed as
plugin:skill, so two skills of the same name in different plugins cannot collide. - Same on Windows. A symlink into
~/.claude/skillsonly works where it was made;marketplace addbehaves the same on the owner's workstation.
Plugins need not live in this repository. An entry can point at another GitHub repository or any
git URL; an Azure DevOps repository works the same way. Moving a plugin out later is a one-line
change to its source, so putting it here now is not a one-way door.
A skill bound to a single repository does not belong here. It stays in that repository's own
.claude/skills/. This marketplace is for what is needed in more than one place.