Skip to content

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, source directory in ~/.claude/plugins/known_marketplaces.json). Claude Code still installs a versioned copy of each plugin, ~/.claude/plugins/cache/<owner>/<name>/<version>/, which installPath in ~/.claude/plugins/installed_plugins.json names. 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 to false, so set it, in settings as above or under Marketplaces in /plugin. Otherwise run claude plugin marketplace update <owner>.
  • Everywhere, a copy is replaced only when the plugin's version changes. So every change to a plugin bumps the version in its plugin.json, and CI refuses a pull request that changes a plugin without one. To let a repository pin a plugin, cut a release tag with claude 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 login followed by gh 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), and github.com in known_hosts. For owner/repo, Claude Code tries SSH first and falls back to HTTPS. On a machine without a GitHub SSH key, set CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1 to skip that probe.
  • A token in the environment is not enough on its own. GITHUB_TOKEN or GH_TOKEN authenticates git only through a helper that reads it, such as gh's. On the Linux host, the home session and login shells have no GITHUB_TOKEN (#304). There gh and git (through gh auth git-credential) use gh's stored login. In a sandbox, the sbx proxy puts the token into the requests.
  • Optional: CLAUDE_CODE_PLUGIN_KEEP_MARKETPLACE_ON_FAILURE=1 keeps 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 ref or sha, 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/skills only works where it was made; marketplace add behaves 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.