[BUG] Skills named `agent-*` render with a stray `*` and wrong row style in the slash menu (id prefix collision with agent-mention suggestions)
Environment
- Claude Code version: 2.1.199
- Platform: macOS (darwin 25.5.0), zsh, terminal TUI
Description
Any skill whose registered name starts with the literal string agent- is rendered in the slash-command menu with a stray * prefix and a different, compact row style (* /name – description…), while all other skills get the normal aligned two-column row.
This looks like an id namespace collision in the suggestion renderer, and is purely cosmetic — the skill loads and runs fine.
Reproduction
mkdir -p ~/.claude/skills/agent-zzz ~/.claude/skills/xagent-zzz
printf -- '---\nname: agent-zzz\ndescription: test skill A\n---\ntest\n' > ~/.claude/skills/agent-zzz/SKILL.md
printf -- '---\nname: xagent-zzz\ndescription: test skill B\n---\ntest\n' > ~/.claude/skills/xagent-zzz/SKILL.md
Start claude, type /zzz. The two skills differ only in the name prefix, yet render differently:
* /agent-zzz – test skill A (user)
/xagent-zzz test skill B (user)
Root cause (from the v2.1.199 bundle)
Command suggestions get their id from ` ${name}:${source} (e.g. agent-zzz:userSettings), but the row renderer dispatches on string prefixes of the id, where agent- is reserved for @-mention subagent suggestions ( id: agent-${agentType} `):
function Jra(e){return e.startsWith("file-")||e.startsWith("mcp-resource-")||e.startsWith("mcp-template")||e.startsWith("agent-")}
function rup(e){
if(e.startsWith("file-"))return"+";
if(e.startsWith("mcp-resource-"))return NR;
if(e.startsWith("mcp-template"))return NR;
if(e.startsWith("agent-"))return"*"; // marker for agent mention rows
return"+"
}
So a skill named agent-browser produces the id agent-browser:userSettings, which false-positives startsWith("agent-") and takes the agent-mention rendering branch (asterisk marker + name – description truncated layout).
Note the id is built from the skill's registered (directory) name, so renaming only the frontmatter name: doesn't avoid it — a directory like agent-browser-2/ still collides.
Expected
Skills named agent-* render like every other skill row. Suggestion-type dispatch probably shouldn't rely on unscoped string prefixes of the id.