Skip to content

Emit Claude Code plugin hint at module load time - #2805

Merged
johno-stripe merged 4 commits into
masterfrom
johno/claude-plugin-hint
Aug 7, 2026
Merged

Emit Claude Code plugin hint at module load time#2805
johno-stripe merged 4 commits into
masterfrom
johno/claude-plugin-hint

Conversation

@johno-stripe

Copy link
Copy Markdown
Contributor

Why?

Claude Code supports a plugin hint feature, where if we detect the CLAUDECODE or CLAUDE_CODE_CHILD_SESSION environment variables, emitting the following string will prompt the user to install our official plugin:

<claude-code-hint v="1" type="plugin" value="stripe@claude-plugins-official" />

Our plugin's source code can be found here.

What?

  • Sets up a platform function for writing to stderr, void by default, implemented for Node.
  • During initialization, checks to see if either variable is set. If so, emits the relevant log line.

Note that while this will fire frequently, Claude Code will automatically hide these log lines and keep the user from being re-prompted:

Claude Code deduplicates by plugin, so emitting on every invocation has no downside (source)

My first approach was to emit this using a post-install script, but npm unfortunately hides the output from the installing process, so those error logs didn't successfully reach Claude.

See Also

Key source here is the documentation on how plugin hints work:

Changelog

  • Emits new Claude Code plugin hint when CLAUDECODE or CLAUDE_CODE_CHILD_SESSION environment variables are detected.

@johno-stripe
johno-stripe requested a review from a team as a code owner August 6, 2026 21:04
@johno-stripe
johno-stripe requested review from jar-stripe and a lite review from Copilot and removed request for a team August 6, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@johno-stripe
johno-stripe merged commit 2ca69d8 into master Aug 7, 2026
10 checks passed
@johno-stripe
johno-stripe deleted the johno/claude-plugin-hint branch August 7, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants