Plugin dependencies changedplugins/dependencies
Nearest release: v2.1.334, published 9 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 2 Dec 2026 04:14 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 2 Dec 2026 04:37 UTC.
Upstream edited
Recorded here
Lines+11added
Lines−9removed
From line
2
where the diff opens
First seen
25 Sep 2026
this site's first read of the page
Recorded edits10to this page, all time
The whole hunk
from line 2, old and new numbered
/
from line 2
22
33> Declare the plugins your plugin depends on, with version ranges such as ^1.2, and see how Claude Code installs, resolves, and prunes them.
44
5A plugin dependency is another plugin that your plugin relies on, such as one whose MCP server or skill it calls. Each dependency tracks the latest version its marketplace provides unless you declare a version constraint, a semantic-version range such as `^2.0` or `~2.1.0` that you've tested against.
5A plugin dependency is another plugin that your plugin relies on, such as one whose MCP server or skill it calls. For each dependency, you can declare a version constraint, a semantic-version range such as `^2.0` or `~2.1.0` that you've tested against.
66
77This page is for plugin authors who declare dependencies in `plugin.json` and for marketplace maintainers who tag releases.
88
from line 18
1818
1919## Declare dependencies
2020
21Without a version constraint, a dependency moves to each new release its marketplace publishes the next time users update. If that release renames an MCP tool your plugin calls, your plugin breaks for everyone who updates.
21Without a version constraint, your plugin accepts any new release of a dependency. If that release renames an MCP tool your plugin calls, your plugin breaks for everyone who updates.
2222
2323With a constraint such as `~2.1.0` on a dependency from a git-backed source, users who have your plugin installed keep receiving `2.1.x` patches of the dependency and never move to `2.2`. To upgrade on your own schedule, test against a newer release and then publish a new version of your plugin with a wider constraint.
2424
from line 37
3737}
3838```
3939
40An entry can be a string: the plugin name alone, such as `"audit-logger"` in this manifest, or `"name@marketplace"` to resolve it in another marketplace. With a bare string, your plugin depends on whatever version that plugin's marketplace provides.
40An entry can be a string: the plugin name alone, such as `"audit-logger"` in this manifest, or `"name@marketplace"` to resolve it in another marketplace. With a bare string, your plugin accepts any version of the dependency.
4141
4242To set a version constraint, use an object with these fields, each a string:
4343
from line 44
4444| Field | Description |
4545| :- | :- |
4646| `name` | The dependency's plugin name, as it appears in its marketplace entry. Claude Code looks it up in the same marketplace as the declaring plugin unless you set `marketplace`. Required. |
47| `version` | A [semantic-version range](https://github.com/npm/node-semver#ranges) such as `~2.1.0`, `^2.0`, `>=1.4`, or `=2.1.0`. The dependency installs at the highest git tag that satisfies this range, so the dependency's maintainer must [tag releases](#tag-plugin-releases-for-version-resolution). |
47| `version` | A [semantic-version range](https://github.com/npm/node-semver#ranges) such as `~2.1.0`, `^2.0`, `>=1.4`, or `=2.1.0`. For a git-backed dependency, check that its maintainer [tags releases](#tag-plugin-releases-for-version-resolution), and see [how a constraint resolves against tags](#how-a-constraint-resolves-against-tags). |
4848| `marketplace` | A different marketplace to resolve `name` in. An allowlist controls cross-marketplace dependencies, described in [Depend on a plugin from another marketplace](#depend-on-a-plugin-from-another-marketplace). |
4949
5050A range doesn't match pre-release versions such as `2.0.0-beta.1` unless you opt in with a pre-release suffix such as `^2.0.0-0`.
from line 161
161161
162162### Constrain a dependency that has a non-git source
163163
164Tag-based resolution applies only to git-backed sources. For a dependency with an `npm`, `archive`, or `command` [plugin source](https://code.claude.com/docs/en/plugins/marketplace-reference.md#plugin-sources), the constraint doesn't control which version is fetched. It's still checked when the plugin loads, and the dependent plugin is disabled if the installed version doesn't satisfy it.
164Tag-based resolution applies only to git-backed sources. For a dependency with an `npm`, `archive`, or `command` [plugin source](https://code.claude.com/docs/en/plugins/marketplace-reference.md#plugin-sources), your users can get a version outside the constraint. The constraint is still checked when the plugin loads, and the dependent plugin is disabled if the installed version doesn't satisfy it.
165165
166166For `npm`, `archive`, and `command` sources, the version checked is the `version` in the dependency's `plugin.json`. Set one there before you constrain that dependency, because a `plugin.json` that sets no version satisfies no constraint.
167167
from line 183
183183
184184### How a constraint resolves against tags
185185
186When a user installs a plugin that declares `{ "name": "secrets-vault", "version": "~2.1.0" }`, the dependency installs from the highest `secrets-vault--v` tag that satisfies `~2.1.0` on the repository that hosts `secrets-vault`. When no tag satisfies the range, the install either fails or uses the marketplace's current copy:
186To resolve `{ "name": "secrets-vault", "version": "~2.1.0" }` against tags, Claude Code looks up the highest `secrets-vault--v` tag that satisfies `~2.1.0` on the repository that hosts `secrets-vault`. If that release doesn't support a user's Claude Code version, the user can get [an earlier release](https://code.claude.com/docs/en/plugins/publish.md#offer-an-earlier-compatible-release) that satisfies `~2.1.0`. When no tag satisfies `~2.1.0`, the install either fails or uses the marketplace's current copy:
187187
188188* **Plugin with its own repository**: the install fails with a message containing `Dependency "secrets-vault@your-marketplace" has no git tag satisfying`.
189189* **Plugin referenced by a relative path**: the install uses the marketplace's current copy instead, and the constraint is checked when the plugin loads. If that copy is outside the range, the dependent plugin stays disabled and `claude plugin list` shows `Requires "secrets-vault@your-marketplace" ~2.1.0, installed 3.0.0`.
from line 200
200200
201201### Combine constraints from several plugins
202202
203When several installed plugins constrain the same dependency, the dependency resolves to the highest version that satisfies all of their ranges. Common combinations resolve like this:
203When several installed plugins constrain the same dependency and Claude Code installs or updates it from tags, it looks up the highest tag that satisfies all of their ranges.
204204
205Common combinations resolve like this:
206
205207| Plugin A requires | Plugin B requires | Result |
206208| :- | :- | :- |
207| `^2.0` | `>=2.1` | One install at the highest `2.x` tag at or above `2.1.0`. Both plugins load. |
209| `^2.0` | `>=2.1` | A `2.x` version at or above `2.1.0` satisfies both plugins. |
208210| `~2.1` | `~3.0` | Installing plugin B fails with a `has conflicting version requirements` message. Plugin A and the dependency stay as they were. |
209211| `=2.1.0` | none | The dependency stays at `2.1.0`. Auto-update skips newer versions while plugin A is installed. |
210212
211Auto-update fetches a constrained dependency at the highest git tag that satisfies every installed plugin's range, rather than at the marketplace's latest version. If the installed plugins' ranges don't overlap, auto-update leaves that dependency at its current version, and the `/plugin` **Errors** tab shows an entry naming the constraining plugin. If they overlap but no tag falls in the range, auto-update fetches the marketplace's current copy and skips the update when that copy's `version` falls outside any installed plugin's range.
213If the installed plugins' ranges don't overlap, auto-update leaves that dependency at its current version, and the `/plugin` **Errors** tab shows an entry naming the constraining plugin. If they overlap but no tag falls in the range, auto-update falls back to the marketplace's current copy. It skips the update when that copy's `version` falls outside any installed plugin's range.
212214
213215When a user uninstalls the last plugin that constrains a dependency, the dependency is no longer constrained to a version range and resumes tracking its marketplace entry on the next update.
214216
No line in this hunk matches that.