Skip to content

feat: emit Claude Code plugin hint from CLI#5153

Merged
avallete merged 4 commits intodevelopfrom
feat/claude-code-hint
Apr 30, 2026
Merged

feat: emit Claude Code plugin hint from CLI#5153
avallete merged 4 commits intodevelopfrom
feat/claude-code-hint

Conversation

@Rodriguespn
Copy link
Copy Markdown
Contributor

@Rodriguespn Rodriguespn commented Apr 30, 2026

Summary

  • Adds SuggestClaudePlugin() to internal/utils/misc.go that returns the <claude-code-hint /> tag when the CLAUDECODE env var is set (no-op otherwise)
  • Calls it in Execute() (cmd/root.go) so every supabase invocation can trigger the hint
  • Calls it after login success in internal/login/login.go (both token and browser paths) to catch users in a setup flow

Claude Code deduplicates by plugin per session, so emitting broadly is safe. The tag is stripped from output before it reaches the model and never counts toward token usage.

Closes AI-689

image

References

Adds a claude-code-hint tag to stderr when running inside Claude Code
(CLAUDECODE env var set). Claude Code strips the tag before it reaches
the model and shows a one-time prompt to install the Supabase plugin.

Emits on every invocation via Execute() for maximum coverage, and again
after login success so users in a setup flow are reached too.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 30, 2026

Coverage Report for CI Build 25172242271

Coverage decreased (-0.04%) to 63.751%

Details

  • Coverage decreased (-0.04%) from the base build.
  • Patch coverage: 9 uncovered changes across 3 files (9 of 18 lines covered, 50.0%).
  • 5 coverage regressions across 1 file.

Uncovered Changes

File Changed Covered %
internal/login/login.go 6 2 33.33%
cmd/root.go 3 0 0.0%
internal/utils/misc.go 5 3 60.0%

Coverage Regressions

5 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
internal/utils/git.go 5 57.14%

Coverage Stats

Coverage Status
Relevant Lines: 15650
Covered Lines: 9977
Line Coverage: 63.75%
Coverage Strength: 7.02 hits per line

💛 - Coveralls

@Rodriguespn Rodriguespn self-assigned this Apr 30, 2026
@Rodriguespn Rodriguespn marked this pull request as ready for review April 30, 2026 14:23
@Rodriguespn Rodriguespn requested a review from a team as a code owner April 30, 2026 14:23
Comment thread internal/utils/misc.go Outdated
Rodriguespn and others added 3 commits April 30, 2026 16:38
Adds a claude-code-hint tag to stderr when running inside Claude Code
(CLAUDECODE env var set). Claude Code strips the tag before it reaches
the model and shows a one-time prompt to install the Supabase plugin.

Emits on every invocation via Execute() for maximum coverage, and again
after login success so users in a setup flow are reached too.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extracts IsClaudeCode() from the existing IsAgent() check in agent.go
and reuses it in SuggestClaudePlugin(). This ensures both places check
the same env vars (CLAUDECODE and CLAUDE_CODE) consistently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@avallete avallete merged commit 3f01508 into develop Apr 30, 2026
20 checks passed
@avallete avallete deleted the feat/claude-code-hint branch April 30, 2026 15:08
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