Skip to content

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

Open
johno-stripe wants to merge 4 commits into
masterfrom
johno/claude-plugin-hint
Open

Emit Claude Code plugin hint at module load time#1
johno-stripe wants to merge 4 commits into
masterfrom
johno/claude-plugin-hint

Conversation

@johno-stripe

Copy link
Copy Markdown
Owner

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 and others added 4 commits July 26, 2026 16:51
Update generated code for v2349 and 44014016ec56efb57a8cf6d0ee0771c2e6b4eebe

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
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.

2 participants