Skip to content

Invoke the skill from a $code-review-ad prompt mention - #10

Merged
dkropachev merged 1 commit into
mainfrom
skill-mention-hook
Nov 12, 2026
Merged

dkropachev merged 1 commit into
mainfrom
skill-mention-hook

Conversation

@dkropachev

Copy link
Copy Markdown
Contributor

Fixes #9

Issue

In Claude Code, only a leading /code-review-ad:code-review-ad slash command reliably runs the skill. A plain-text mention leaves invocation to the model, and Codex-style $code-review-ad mentions mean nothing.

Fix

The Claude plugin now registers a UserPromptSubmit hook (claude/hooks/hooks.json, claude/hooks/skill_mention.py). When a prompt mentions $code-review-ad or $code-review-ad:code-review-ad anywhere, the hook adds context telling Claude to invoke the skill with the Skill tool before doing anything else. Other prompts and malformed hook input pass through with no output.

Version synchronized at 1.1.0; README and PROVENANCE updated.

Testing

  • python3 scripts/check.py, python3 scripts/test.py (92 passed, including new tests/test_skill_mention.py)
  • claude plugin validate . passes (only the existing marketplace-description and icon warnings)
  • claude -p --plugin-dir .: a prompt with $code-review-ad received the hook context; a prompt with a plain code-review-ad mention did not

In Claude Code a plain-text mention of the skill leaves invocation to
the model, and Codex-style $code-review-ad mentions mean nothing.

Ship a UserPromptSubmit hook with the Claude plugin. When a prompt
mentions $code-review-ad or $code-review-ad:code-review-ad, it adds
context telling Claude to invoke the skill with the Skill tool first.

Synchronize the plugin version at 1.1.0.

Fixes #9
@dkropachev
dkropachev merged commit ca02a7d into main Nov 12, 2026
1 check passed
@dkropachev
dkropachev deleted the skill-mention-hook branch November 12, 2026 18:37
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.

Invoke the skill from a $code-review-ad mention in Claude Code prompts

1 participant