Slash commands blocked when skill exists with same name

Resolved 💬 9 comments Opened Dec 21, 2025 by frytyler Closed Jan 12, 2026

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

  1. Create a skill and command with the same name:

``
~/.claude/skills/brain/SKILL.md
~/.claude/commands/brain.md
``

  1. Try to invoke the command directly:

``
> /brain
> This slash command can only be invoked by Claude, not directly by users.
``

  1. 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
``

  1. 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:

  1. Ask Claude to invoke the command for you
  2. Rename the skill to avoid collision (e.g., brain-skill instead of brain)

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-invocation exists to block Claude from invoking commands, but there's no documented way to control user invocation

View original on GitHub ↗

This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗