RoyShen on X (yuushabu_buyinn): with the skill router on, / in the agent
no longer picks a skill. A listed skill has no link of its own in the
skills folder, so Claude Code had no /name for it.
For each skill the router lists for Claude Code (any profile; not a
plugin agent or WSL), routerCommands writes <claude dir>/commands/
<name>.md: the skill's description, disable-model-invocation: true, and
a body that has the agent read the skill's SKILL.md at the router's path
and follow it, with $ARGUMENTS. The flag keeps the description out of
the model's prompt, so the router still saves what it saved. The stubs
go in the commands folder, not the skills folder, because Crush, DevEco
Code and Kimi Code read ~/.claude/skills too and ignore the flag.
Applied.RouterCommands records the files with their hash (syncOwnFiles):
one the user changed is theirs. A user's own command file by that name,
or a Library command of that name given to Claude Code, means no stub;
syncCommands takes a stub's file over when such a command is added. The
command import leaves the stubs out. Router off, or the skill kept
direct: the stub goes.
Run:
- mica-run go test -tags nogui ./internal/library -count=1 -timeout 45m: ok
(277s); GOOS=linux and GOOS=windows go vet ./internal/library: ok;
gofmt -l clean. Base 18fe1e2dc (fetch failed at commit time).
- Broken by hand: routerCommandsDir returning "" (the old behaviour)
turns TestSkillRouterKeepsSlashCommands red.
- Real Claude Code 2.1.316 in a sandbox HOME, magpie built from this
tree placing two skills (okapi, zebu) with the router on, through a
recording proxy to the gateway (auto/claude-haiku-5-5): the / menu
lists /okapi and /zebu with their descriptions; "/okapi" answered the
codeword from okapi's SKILL.md; "Use my zebu skill." went through
magpie-skills and answered zebu's; every run's first request has each
description once, in the router's own line, none from a stub. Router
off: both stubs gone, links back, settings.json's rules gone.
Not tried: Windows and Linux Claude Code (the path is the same
filepath.Join; Windows rules use claudePath already). The Library's
"keep direct" tooltip still says "to type it as /name", which stays
true for the other agents.