relevance block to a plugin’s entry in marketplace.json, then allowlist the marketplace in managed settings. When a user’s session matches one of the declared signals, Claude Code surfaces an install suggestion for that plugin.
Marketplace-declared suggestions are opt-in per marketplace through managed settings. No marketplace’s relevance declarations produce suggestions until an administrator adds it to the allowlist, including the official Anthropic marketplace. Claude Code also includes one built-in suggestion that is independent of this allowlist; that tip and all marketplace-declared tips are disabled when spinnerTipsEnabled is set to false.
This feature requires Claude Code v2.1.152 or later. Older clients ignore the relevance field.
This page is for marketplace operators and enterprise administrators. If you are looking to install plugins, see Discover and install plugins.
How it works
Each plugin entry inmarketplace.json can carry a relevance object. The object names a topic and one or more signals. A signal is a pattern that Claude Code tests against the current session, such as the working directory or files Claude has read.
Signal matching happens locally on the user’s machine. The matching adds no network traffic and does not report which signals matched, or their values, to Anthropic or to the marketplace operator.
When a signal matches and the plugin is not already installed, Claude Code shows the plugin in three places:
- Spinner tip: a “Working with topic? Install the plugin plugin” message with the
/plugin installcommand appears below the spinner while Claude is responding. - Session-start suggestion: if the
cwdsignal matches the working directory, a one-lineplugin suggestion: <name>@<marketplace> · /pluginnotification appears before the first turn. This surface requires Claude Code v2.1.153 or later. /pluginDiscover tab: the plugin is pinned to the top of the Discover list with an annotation such as “suggested for this directory” or “suggested for stripe commands”. This surface requires Claude Code v2.1.154 or later.
spinnerTipsEnabled to false, or when a custom spinnerTipsOverride is configured with excludeDefault. The Discover-tab pin is independent of tip settings.
Claude Code never installs a plugin automatically. The user always confirms.
Add relevance to a plugin entry
Add arelevance object to the plugin’s entry in your marketplace.json. The following example declares that the terraform-helpers plugin is relevant when Claude reads a .tf file or when Claude runs terraform:
relevance block but no matching signal behaves like any other marketplace entry. It appears in the Discover list in its normal position and never surfaces as a spinner tip.
Field reference
relevance
relevance.signals
The
cli, hosts, filesRead, and manifestDeps signals need session history, so they can only match on the spinner tip and the Discover tab. Only cwd can match at session start. The filesRead and manifestDeps signals test the session’s recorded file state, which also includes files Claude has written or edited and auto-loaded CLAUDE.md memory files.
The following example uses manifestDeps to suggest a Stripe plugin once Claude has read a package.json that depends on stripe. The file pattern uses [/\\\\] so it matches both forward-slash and backslash path separators, and \\. so the dot is literal. In JSON, each backslash in the regular expression is written twice.
Unknown fields under
relevance and relevance.signals are ignored at load time so older Claude Code clients continue to load your marketplace. Run claude plugin validate to surface them as warnings.Enable suggestions in managed settings
Declaringrelevance in marketplace.json is not enough on its own. An administrator must allowlist the marketplace in managed settings before its suggestions appear to users.
Add the marketplace name to pluginSuggestionMarketplaces. For any marketplace other than the official Anthropic marketplace, also declare the marketplace source in the same managed settings, either as that name’s entry in extraKnownMarketplaces or as an entry in strictKnownMarketplaces. The allowlisted name is ignored if the marketplace registered on the machine came from a different source. This prevents an unrelated source from registering under an allowlisted name to have its plugins suggested across your org.
The following managed-settings.json registers an org marketplace from a GitHub repository and enables its suggestions:
pluginSuggestionMarketplaces and extraKnownMarketplaces for full configuration details.
What the user sees
When a signal matches during a session, the spinner tip reads:cwd signal surfaces the one-line notification:
/plugin Discover tab, the plugin is pinned above the other results with an annotation that names the matching signal, such as suggested for this directory or suggested for terraform commands. The Discover tab pins a given plugin once; later visits list it in normal order. The Discover-tab pin requires Claude Code v2.1.154 or later. On v2.1.152 only the spinner tip appears; the session-start notification is added in v2.1.153.
Validate your marketplace
Runclaude plugin validate against your marketplace directory to check the relevance block before publishing:
relevance and relevance.signals as warnings, flags a relevance value that is not an object, and rejects a signals.hosts entry that includes a scheme, port, or path.
See also
- Create and distribute a plugin marketplace: build the marketplace that hosts your plugins
- Recommend your plugin from your CLI: prompt users from your own CLI instead of from Claude Code’s session signals
- Settings: full reference for
pluginSuggestionMarketplacesandextraKnownMarketplaces