Custom slash commands in .claude/commands/ hijacked by built-in skill matcher
Resolved 💬 1 comment Opened Apr 29, 2026 by beschne Closed May 30, 2026
Summary
Custom slash commands defined in .claude/commands/ are silently intercepted and replaced by built-in skills instead of loading the command file.
Version
Claude Code 2.1.116
Steps to reproduce
- Create
.claude/commands/run.mdwith the following content:
````
Execute the following bash command and show the output:
python3 transit_finder.py --lat 50.23 --lon 8.62 --radius 30 --name "Bad Homburg" --days 7
- Type
/runin a Claude Code session in that project.
Expected: Claude loads run.md and executes the command.
Actual: The /loop skill is invoked instead (as shown by <command-name>/loop</command-name> in the harness output).
Additional observations
- Renaming the file to
transit.mdand typing/transittriggered/fewer-permission-promptson some invocations and/loopon others — neither is the custom command. - The
<command-name>tag in the conversation is set to the matched skill name, not the custom command name, which indicates the interception happens at the harness level before the file content is read. - The command file content was varied across attempts (different phrasing, neutral language,
!-prefixed command) — the name alone appears to be sufficient to trigger the mismatch.
Impact
Custom slash commands are unusable when their name or content fuzzy-matches a built-in skill trigger. There is no error or warning — the wrong skill silently runs instead.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗