Answer: Emit the tag only when `CLAUDECODE` or `CLAUDE_CODE_CHILD_SESSION` is set, writing a line like `` to stderr, replacing `example-cli` with your plugin's name in the official marketplace.
Status: Confirmed
Entry: tool/claude-code/integrations/emit-claude-code-hint-tag
Revision: 1
Digest: sha256:204c8eda9eb15631 (changes whenever the content changes)
Timeline:
Created: 2026-11-13T03:04:56Z
Last changed: 2026-11-13T03:04:56Z
Last verified: 2026-11-20T12:22:47Z
Next check: 2026-11-21T12:22:47Z
Check interval: Daily
Expected change: No fixed schedule
Data:
Field | Value | Source | As of
gate variable | CLAUDECODE | [1] | 2026-11-20
tag format | | [1] | 2026-11-20
output stream | stderr | [1] | 2026-11-20
child session version | v2.1.172 | [1] | 2026-11-20
CLAUDECODE value | CLAUDECODE=1 | [1] | 2026-11-20
Sources:
[1] Anthropic. "Recommend your plugin from your CLI". https://code.claude.com/docs/en/plugins/cli-hints.md
Role: primary. Accessed: 2026-11-20T12:22:47Z
Quote: "Emit the tag only when `CLAUDECODE` or `CLAUDE_CODE_CHILD_SESSION` is set" (Supports: gate variable)
Quote: "'\n'," (Supports: tag format)
Quote: "confirm the tag line appears on stderr" (Supports: output stream)
Quote: "On v2.1.172 and later it also sets `CLAUDE_CODE_CHILD_SESSION=1` there." (Supports: child session version)
Quote: "Claude Code sets `CLAUDECODE=1` in the commands it runs through the Bash and PowerShell tools and in hook commands." (Supports: CLAUDECODE value)
Published: 2026-11-20T03:41:00Z
Snapshot SHA-256: 3ffe67731f851b2c1b3ed0bc4f4dcea4a1cdbccd675575840610e8f883c75c66 (captured 2026-11-13T03:04:56Z)
Verification:
Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:04:56Z, so the values verified then were kept.
Cross-check: not-available at 2026-11-20T12:22:47Z. No independent second source is configured for this entry
Last successful check: 2026-11-20T12:22:47Z
Last attempt: 2026-11-20T12:22:47Z
Notes and limitations:
Extracted automatically from a single official source (section "Emit the hint").
Related:
https://latestn.com/tool/claude-code/integrations/enable-telemetry-export How do I enable OpenTelemetry telemetry export in the Claude Agent SDK?
https://latestn.com/tool/claude-code/integrations/expose-reply-tool How do I expose a reply tool so Claude can send messages back through a Claude Code channel?
https://latestn.com/tool/claude-code/integrations/features-by-provider Which Claude Code features are available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry?
https://latestn.com/tool/claude-code/integrations/cwd-vs-repo-parameter What is the difference between the cwd and repo parameters in a Claude Code deep link?
https://latestn.com/tool/claude-code/integrations/disable-mcp-server-without-removing How do I disable an MCP server in Claude Code without removing it?
https://latestn.com/tool/claude-code/integrations/eligible-marketplaces-for-hints Which marketplaces qualify for Claude Code CLI plugin hints?
https://latestn.com/tool/ All entries in AI tools
Change log:
Time | Event | Change | Source
2026-11-13T03:04:56Z | added | Entry created | —
Changes for this entry as a feed: https://latestn.com/tool/claude-code/integrations/emit-claude-code-hint-tag/latest
Challenge this entry:
Open challenges: None
How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so.
Form: https://latestn.com/dispute/tool/claude-code/integrations/emit-claude-code-hint-tag
POST: https://latestn.com/dispute/tool/claude-code/integrations/emit-claude-code-hint-tag with claim, evidence_url, and optionally field and contact (form-encoded or JSON)
GET: https://latestn.com/dispute/tool/claude-code/integrations/emit-claude-code-hint-tag?claim={what is wrong}&evidence_url={link}
How to cite:
LatestN. (2026). How do I emit a claude-code-hint tag from my CLI so Claude Code users are prompted to install my plugin? Revision 1, last verified 2026-11-20T12:22:47Z. https://latestn.com/tool/claude-code/integrations/emit-claude-code-hint-tag (accessed 2026-11-21T10:00:46Z).
@misc{LatestN_tool_claude_code_integrations_emit_claude_code_hint_tag_r1,
title = {How do I emit a claude-code-hint tag from my CLI so Claude Code users are prompted to install my plugin?},
author = {{LatestN}},
year = {2026},
howpublished = {\url{https://latestn.com/tool/claude-code/integrations/emit-claude-code-hint-tag}},
note = {Revision 1; digest sha256:204c8eda9eb15631; last verified 2026-11-20T12:22:47Z; accessed 2026-11-21T10:00:46Z}
}
Reuse:
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation.
URL: https://latestn.com/tool/claude-code/integrations/emit-claude-code-hint-tag