SIGN IN SIGN UP

test(slash-commands): pin one registration per command, not a stub per command

07cb21b dropped the four commands/*.md stubs that duplicated skills/*/SKILL.md,
which left this file asserting the opposite: ten #571 cases demanded a .md for
every documented command.

#571's premise no longer holds. Claude Code loads commands/*.md as flat skills
in the same namespace as skills/*/SKILL.md, so shipping both registers the name
twice — `claude plugin details` listed caveman, caveman-commit, caveman-review
and caveman-stats twice each. The stubs were the only registration when #571
landed; skills/ auto-discovery from the plugin root superseded them.

Replace "a .md must exist" with "exactly one provider must exist", which still
fails on the "Unknown command" regression #571 guarded against and now also
fails on the duplication.

Drop the stats-body assertion. It encoded a wrong model of the flow — that
Claude Code expands a command body before UserPromptSubmit sees it, so the body
had to re-emit the command text for the hook regex to catch. Verified against
Claude Code 2.1.235 with a hook that logs its stdin: invoking a plugin skill
delivers the raw typed prompt ("/probe:probeskill"), not the expanded body.
Assert what the handler actually receives instead: the bare and plugin-
namespaced forms of the typed command.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ez7w7BBtKrMZCiZz9ea4cb
J
Julius Brussee committed
ec134859ad8dfd9d5a2b19e2faf2e5bc65b44462
Parent: 7a03e6f