Skip to main content
guidesSource-backed

Adding Plugin Install Hints to Developer CLIs

A practical walkthrough of the claude-code-hint protocol. When CLAUDECODE is set, have your CLI write a self-closing tag to stderr; Claude Code strips the line before it reaches the model and shows a one-time prompt to install your plugin — but only for plugins in the official Anthropic marketplace.

by JPette1783·added 2026-06-05·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://code.claude.com/docs/en/plugin-hints, https://github.com/JSONbored/awesome-claude/blob/main/content/guides/adding-plugin-install-hints-to-developer-clis.mdx
Safety notes
The hint never auto-installs anything; Claude Code only shows a one-time prompt and the user always confirms., Gate emission on the CLAUDECODE environment variable so the marker never appears in a human user's terminal or in normal pipelines., Hints are only acted on for plugins in an official Anthropic marketplace; pointers to other marketplaces are silently dropped.
Privacy notes
Claude Code strips the hint line before output reaches the model, so it is not counted toward token usage and does not enter the conversation., Write the tag to stderr to keep it out of shell pipelines like `your-cli deploy | jq`; do not embed it mid-line in logs., The hint carries only your plugin identifier; do not append user data or secrets to the marker line.
Author
JPette1783
Submitted by
JPette1783
Claim status
unclaimed
Last verified
2026-06-05

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

63

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Needs review

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    No reviewed flag detected in metadata.

    Pending

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Copy & paste

Copy-ready — paste the snippet to get started.

Adoption plan

Balanced adoption plan

Current risk score 24/100. Use staged verification before broader rollout.

Risk 24

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    No review metadata found; increase manual validation.

    Pending
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Missing required evidence: Metadata review. Risk score 31.

Risk 31

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Missing

Review metadata is missing.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required gaps: Metadata review

Decision timeline

Decision timeline · balanced

Blocking gaps: Check metadata review status. Risk 28.

Risk 28

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is missing.

Pending

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

Blockers: Check metadata review status

Prerequisite readiness

Prerequisite readiness

3 prerequisites to line up before setup.

0/3 ready
Install & runtime2General1

Safety & privacy surface

Safety & privacy surface

3 safety and 3 privacy notes across 3 risk areas. Review closely: credentials & tokens.

3 areas
  • SafetyExecution & processesThe hint never auto-installs anything; Claude Code only shows a one-time prompt and the user always confirms.
  • SafetyGeneralGate emission on the CLAUDECODE environment variable so the marker never appears in a human user's terminal or in normal pipelines.
  • SafetyGeneralHints are only acted on for plugins in an official Anthropic marketplace; pointers to other marketplaces are silently dropped.
  • PrivacyCredentials & tokensClaude Code strips the hint line before output reaches the model, so it is not counted toward token usage and does not enter the conversation.
  • PrivacyExecution & processesWrite the tag to stderr to keep it out of shell pipelines like `your-cli deploy | jq`; do not embed it mid-line in logs.
  • PrivacyCredentials & tokensThe hint carries only your plugin identifier; do not append user data or secrets to the marker line.

Safety notes

  • The hint never auto-installs anything; Claude Code only shows a one-time prompt and the user always confirms.
  • Gate emission on the CLAUDECODE environment variable so the marker never appears in a human user's terminal or in normal pipelines.
  • Hints are only acted on for plugins in an official Anthropic marketplace; pointers to other marketplaces are silently dropped.

Privacy notes

  • Claude Code strips the hint line before output reaches the model, so it is not counted toward token usage and does not enter the conversation.
  • Write the tag to stderr to keep it out of shell pipelines like `your-cli deploy | jq`; do not embed it mid-line in logs.
  • The hint carries only your plugin identifier; do not append user data or secrets to the marker line.

Prerequisites

  • A CLI or SDK you maintain, plus a plugin listed in the official Anthropic marketplace (claude-plugins-official).
  • The ability to write a line to stderr (or stdout) from your CLI.
  • Knowledge of your plugin's identifier in name@marketplace form.

Schema details

Install type
copy
Troubleshooting
No
Full copyable content
## Overview

If you maintain a CLI or SDK and have a plugin in the official Anthropic
marketplace, your tool can prompt Claude Code users to install it. Your CLI
writes a one-line marker to stderr when it detects it is running inside Claude
Code; Claude Code reads the marker, strips it from the output, and shows a
one-time install prompt. The user always confirms; nothing installs
automatically.

## How it works

Claude Code sets the `CLAUDECODE` environment variable to `1` for commands it runs
through the Bash and PowerShell tools. When your CLI sees that variable, it writes
a self-closing `<claude-code-hint />` tag to stderr. Claude Code then:

1. Scans for hint lines and removes them before output reaches the model.
2. Checks the hint targets a plugin in an official Anthropic marketplace.
3. Checks the plugin is not already installed and has not been prompted before.
4. Shows an install prompt naming the command that emitted the hint.

## Emit the hint

Gate on `CLAUDECODE` and write the tag on its own line:

```javascript
// Node.js
if (process.env.CLAUDECODE) {
  process.stderr.write(
    '<claude-code-hint v="1" type="plugin" value="example-cli@claude-plugins-official" />\n',
  )
}
```

```python
# Python
import os, sys
if os.environ.get("CLAUDECODE"):
    print(
        '<claude-code-hint v="1" type="plugin" value="example-cli@claude-plugins-official" />',
        file=sys.stderr,
    )
```

Replace `example-cli` with your plugin's name in the official marketplace.

## Hint format

```text
<claude-code-hint v="1" type="plugin" value="name@marketplace" />
```

| Attribute | Required | Description |
| --- | --- | --- |
| `v` | Yes | Protocol version; `1` is the only supported value. |
| `type` | Yes | Hint kind; `plugin` is the only supported value. |
| `value` | Yes | Plugin identifier in `name@marketplace` form. |

## Where to emit

Claude Code deduplicates by plugin, so emitting on every invocation is fine. Good
touchpoints: `--help` output, unknown-subcommand errors, login/auth success, and
first-run welcome messages.

## What the user sees

Claude Code shows a one-time prompt naming the command, with options to install,
decline, or disable future hints. Frequency is bounded: once per plugin, and at
most one hint prompt per Claude Code session across all CLIs. If there is no
response within 30 seconds, it dismisses as No.

## Requirements

- The tag must occupy its own line; mid-line tags are ignored.
- The `value` must reference a plugin in an official Anthropic marketplace such as
  `claude-plugins-official`; other marketplaces are silently dropped.
- Recommended: write to stderr and gate on `CLAUDECODE`.

The hint protocol only takes effect for plugins listed in the official Anthropic
marketplace, which Anthropic curates at its discretion. The community-marketplace
submission form does not enable the hint protocol.

## Source

- Recommend your plugin from your CLI: https://code.claude.com/docs/en/plugin-hints

About this resource

Overview

If you maintain a CLI or SDK and have a plugin in the official Anthropic marketplace, your tool can prompt Claude Code users to install it. Your CLI writes a one-line marker to stderr when it detects it is running inside Claude Code; Claude Code reads the marker, strips it from the output, and shows a one-time install prompt. The user always confirms; nothing installs automatically.

How it works

Claude Code sets the CLAUDECODE environment variable to 1 for commands it runs through the Bash and PowerShell tools. When your CLI sees that variable, it writes a self-closing <claude-code-hint /> tag to stderr. Claude Code then:

  1. Scans for hint lines and removes them before output reaches the model.
  2. Checks the hint targets a plugin in an official Anthropic marketplace.
  3. Checks the plugin is not already installed and has not been prompted before.
  4. Shows an install prompt naming the command that emitted the hint.

Emit the hint

Gate on CLAUDECODE and write the tag on its own line:

// Node.js
if (process.env.CLAUDECODE) {
  process.stderr.write(
    '<claude-code-hint v="1" type="plugin" value="example-cli@claude-plugins-official" />\n',
  )
}
# Python
import os, sys
if os.environ.get("CLAUDECODE"):
    print(
        '<claude-code-hint v="1" type="plugin" value="example-cli@claude-plugins-official" />',
        file=sys.stderr,
    )

Replace example-cli with your plugin's name in the official marketplace.

Hint format

<claude-code-hint v="1" type="plugin" value="name@marketplace" />
Attribute Required Description
v Yes Protocol version; 1 is the only supported value.
type Yes Hint kind; plugin is the only supported value.
value Yes Plugin identifier in name@marketplace form.

Where to emit

Claude Code deduplicates by plugin, so emitting on every invocation is fine. Good touchpoints: --help output, unknown-subcommand errors, login/auth success, and first-run welcome messages.

What the user sees

Claude Code shows a one-time prompt naming the command, with options to install, decline, or disable future hints. Frequency is bounded: once per plugin, and at most one hint prompt per Claude Code session across all CLIs. If there is no response within 30 seconds, it dismisses as No.

Requirements

  • The tag must occupy its own line; mid-line tags are ignored.
  • The value must reference a plugin in an official Anthropic marketplace such as claude-plugins-official; other marketplaces are silently dropped.
  • Recommended: write to stderr and gate on CLAUDECODE.

The hint protocol only takes effect for plugins listed in the official Anthropic marketplace, which Anthropic curates at its discretion. The community-marketplace submission form does not enable the hint protocol.

Source

Source citations

Add this badge to your README

Show that Adding Plugin Install Hints to Developer CLIs is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/guides/adding-plugin-install-hints-to-developer-clis.svg)](https://heyclau.de/entry/guides/adding-plugin-install-hints-to-developer-clis)

How it compares

Adding Plugin Install Hints to Developer CLIs side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

2 trust signals differ across this comparison (Source provenance, Submitter).

Field

A practical walkthrough of the claude-code-hint protocol. When CLAUDECODE is set, have your CLI write a self-closing tag to stderr; Claude Code strips the line before it reaches the model and shows a one-time prompt to install your plugin — but only for plugins in the official Anthropic marketplace.

Open dossier

A practical walkthrough of building and distributing a Claude Code plugin marketplace.

Open dossier

Step-by-step guide to packaging Claude Code plugins as zip archives: directory layout, manifest files, validation, and internal distribution.

Open dossier

Guide to pinning Claude Code plugin dependency versions, semver constraints, upgrade testing, and preventing surprise behavior changes during team rollouts.

Open dossier
Next steps
Trust
Review statusNot reviewedNot reviewedNot reviewedNot reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceDiffersSource-backedSource-backedSubmission linkedSource submissionSubmission linkedSource submission
SubmitterDiffersJPette1783JPette1783kiannidevkiannidev
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓
Brand
Categoryguidesguidesguidesguides
SourceSource-backedSource-backedSource-backedSource-backed
AuthorJPette1783JPette1783kiannidevkiannidev
Added2026-06-052026-06-052026-06-142026-06-14
Platforms
Harness
Source repo
Safety notesThe hint never auto-installs anything; Claude Code only shows a one-time prompt and the user always confirms. Gate emission on the CLAUDECODE environment variable so the marker never appears in a human user's terminal or in normal pipelines. Hints are only acted on for plugins in an official Anthropic marketplace; pointers to other marketplaces are silently dropped.A marketplace distributes plugins that can bundle hooks, MCP servers, and bin executables that run with the user's privileges; document what each plugin does and review before sharing. Encourage installers to review plugin source and pin versions; treat installing from an untrusted marketplace as a supply-chain decision. For internal-only distribution, host the marketplace in a private repository rather than a public one.Zip archives execute hooks and MCP configuration on install; scan for secrets, hard-coded tokens, and unexpected network endpoints before publishing. Sign or checksum zips when distributing internally so teams can detect tampered archives. Do not bundle personal credentials, `.env` files, or developer machine paths into shared plugin archives.Unpinned dependencies can silently change hooks, MCP servers, or skills bundled with a dependent plugin after a marketplace update. Treat dependency upgrades like application dependency upgrades: review changelogs, test tool permissions, and verify MCP surfaces did not expand. Do not auto-upgrade production plugin bundles during an active incident response or release freeze without explicit approval.
Privacy notesClaude Code strips the hint line before output reaches the model, so it is not counted toward token usage and does not enter the conversation. Write the tag to stderr to keep it out of shell pipelines like `your-cli deploy | jq`; do not embed it mid-line in logs. The hint carries only your plugin identifier; do not append user data or secrets to the marker line.Do not bundle secrets, tokens, or private endpoints into plugins or the marketplace catalog; use environment variables or helpers. Private marketplaces keep the catalog and plugin source within your access controls; public ones expose both. Marketplace metadata (names, descriptions) is visible to anyone who can add the marketplace.Plugin zips may contain internal hostnames, repository URLs, and runbook excerpts that should not leave the corporate network. Remove sample data, customer names, and debug logs from the source tree before creating the archive. Document whether the zip phone-home telemetry or MCP tools send data externally when users install it.Dependency metadata can reveal internal plugin names, private marketplace URLs, or staging registry hosts when committed to shared repositories. Keep internal marketplace credentials and download tokens out of dependency files; reference them through environment variables or managed settings. When sharing plugin dependency lock files externally, redact internal plugin identifiers that expose unreleased product codenames.
Prerequisites
  • A CLI or SDK you maintain, plus a plugin listed in the official Anthropic marketplace (claude-plugins-official).
  • The ability to write a line to stderr (or stdout) from your CLI.
  • Knowledge of your plugin's identifier in name@marketplace form.
  • One or more Claude Code plugins you want to distribute.
  • A git host (GitHub, GitLab, or another) to host the marketplace repository.
  • Claude Code installed for testing the marketplace and installs.
  • A working plugin source tree with manifest, skills, hooks, commands, or MCP entries as needed.
  • Claude Code installed locally to test-install the zip before wider distribution.
  • Agreement on internal hosting location, checksum publication, and who may publish new plugin zips.
  • Optional access to discover-plugins documentation if submitting to a shared marketplace.
  • A Claude Code plugin with one or more declared dependencies on other plugins or external packages.
  • Access to the plugin manifest or dependency file documented in Claude Code plugin dependencies.
  • A test environment where you can install the plugin graph at pinned and unpinned versions.
  • Team agreement on who approves dependency upgrades and how breaking changes are communicated.
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.