Naming collision: skill with same name as command blocks user invocation

Resolved 💬 6 comments Opened Dec 30, 2025 by jzillmann Closed Feb 24, 2026

Feature Request

Is your feature request related to a problem?

Yes. Custom slash commands defined in .claude/commands/*.md cannot be invoked directly by users typing /command-name. Instead, users see:

"This slash command can only be invoked by Claude, not directly by users. Ask Claude to run /code-review for you."

Current behavior:

  • User types /code-review
  • Error message appears saying only Claude can invoke it
  • User must ask Claude to run the command for them

Expected behavior:

  • User types /code-review
  • The command executes (same as if Claude invoked it)

Use Case

We have project-specific workflows defined as slash commands:

  • /code-review - Comprehensive code review workflow
  • /fix-tests - Download and analyze failing test reports
  • /session-reflection - End-of-session analysis

These are reusable prompts that users should be able to invoke directly, similar to built-in commands like /help or /clear.

Investigation

  1. Verified command files exist with valid YAML frontmatter
  2. Added "Skill" to permissions allow list - did not help
  3. No allowed-tools or other restrictive frontmatter present
  4. The error message suggests this is intentional behavior, not a configuration issue

Suggested Solution

Either:

  1. Allow all .claude/commands/ to be user-invocable by default
  2. Add a frontmatter field like user-invocable: true to opt-in
  3. Document how to make custom commands user-invocable if there's already a way

Environment

  • Claude Code CLI
  • macOS
  • Custom commands in .claude/commands/ directory

View original on GitHub ↗

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