Slash commands blocked when skill exists with same name
Description
When a custom slash command has the same name as an installed skill, users cannot invoke the command directly. Instead, they see:
This slash command can only be invoked by Claude, not directly by users. Ask Claude to run /brain for you.
The command works fine when Claude invokes it via the SlashCommand tool, but direct user invocation is blocked.
Reproduction Steps
- Create a skill and command with the same name:
````
~/.claude/skills/brain/SKILL.md
~/.claude/commands/brain.md
- Try to invoke the command directly:
````
> /brain
> This slash command can only be invoked by Claude, not directly by users.
- Create a command with a different name than any skill:
````
~/.claude/commands/pr.md # No skill named "pr"
~/.claude/skills/pr-workflow/ # Skill has different name
- This command works fine:
````
> /pr
✓ Works normally
Evidence
| Command | Skill | Name Collision? | User Invoke? |
|---------|-------|-----------------|--------------|
| pr.md | pr-workflow/ | No | ✅ Works |
| brain.md | brain/ | Yes | ❌ Blocked |
| comments.md | comments/ | Yes | ❌ Blocked |
| code-review.md | code-review/ | Yes | ❌ Blocked |
Expected Behavior
Users should be able to directly invoke slash commands regardless of whether a skill with the same name exists.
Environment
- Claude Code version: Latest (Dec 2025)
- OS: macOS
Workaround
Either:
- Ask Claude to invoke the command for you
- Rename the skill to avoid collision (e.g.,
brain-skillinstead ofbrain)
Notes
- This appears to be a recent change - commands worked fine for weeks before this started happening
- The behavior is inconsistent across Claude Code instances (works in some, blocked in others)
disable-model-invocationexists to block Claude from invoking commands, but there's no documented way to control user invocation
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗