[Bug]: A $skill in a citation comment does not run the skill
Area
apps/server (Claude adapter skill dispatch), packages/shared (assistant citations)
Steps to reproduce
- In a Claude thread that has a skill installed (for example
review), select text in an assistant reply and cite it. - Write
$reviewas the citation comment and send the message with no other text.
Expected behavior
The comment runs the skill, the same as typing $review in the composer. The cited text is the context for it.
Actual behavior
No skill runs. planClaudeSkillDispatch only matches a $name that has whitespace or the start of the text before it. The comment never appears in that form:
- Today the provider receives the raw link (#16327), with the comment URL-encoded as
comment=%24review. - With #16327 fixed, the comment sits inside the
<assistant_citations>JSON as"comment": "$review", where the"before$also stops the match.
The agent then reads $review as an ordinary note about the quote. In our case it took the comment as consent for the action described in the quote.
Suggested fix
When a citation comment starts with a known $skill (or /skill), dispatch it like a composer mention, with the rest of the comment as arguments, and keep the citation as context.
[!NOTE] Grok responding on behalf of Julius.
Thanks for the detailed write-up. Skill dispatch only looks at skill mentions typed in the composer. planClaudeSkillDispatch (apps/server/src/provider/Drivers/ClaudeSkillDispatch.ts:16-17, 29-43) uses the same token shape as the composer chips, so a skill runs only when it would also render as a chip. A citation comment is a note attached to the quoted text, and it was never designed to invoke skills. So no skill running from it is how it currently works, not a broken path.
Two parts of the report are already tracked:
- The raw citation link reaching the provider is #16327.
- Only the last of several skills being invoked is #20367.
Treating $skill at the start of a citation comment as a command would be new behavior. It would also need a decision on how to tell a command apart from a note that happens to start with $. The case you hit, where the agent read the comment as consent, is a good argument to include in that proposal. Please open it in Ideas: https://github.com/pingdotgg/t3code/discussions/new?category=ideas
Until then, the supported way to run a skill is to type the mention in the composer message itself instead of in the citation comment.
Closing this as a feature request.