# [BUG] Slash command namespacing with subdirectories not working as documented

Status Closed — not planned
Maintainer reply None cached
Activity 5 comments · opened Jun 21, 2025 · closed Jan 15, 2026

Description

According to the official documentation, slash commands should support namespacing through subdirectories:

Organize commands in subdirectories to create namespaced commands. Structure: <prefix>:<namespace>:<command> For example, a file at .claude/commands/frontend/component.md creates the command /project:frontend:component

However, this feature doesn't work in practice. Commands placed in subdirectories are not accessible using the documented namespace syntax.

Steps to Reproduce

  1. Create a namespaced command structure:

``bash
mkdir -p ~/.claude/commands/test-namespace
echo "Test namespaced command" > ~/.claude/commands/test-namespace/test-command.md
``

  1. Start Claude Code and try to use the command:

``
/user:test-namespace:test-command
``

  1. The command is not recognized or available in autocomplete

Expected Behavior

Based on the documentation, the command should be accessible as /user:test-namespace:test-command

Actual Behavior

The namespaced command is not recognized. The autocomplete doesn't show the command, and attempting to use it results in the command not being found.

Environment

  • Claude Code version: 1.0.31
  • OS: macOS Darwin 24.5.0
  • Installation method: npm install -g @anthropic-ai/claude-code

View original on GitHub ↗

5 Comments

tonydehnke · 11 months ago

Has anyone found a fix for this.. running into it with CC 2.0.25 and MacOS 26.1

github-actions[bot] · 10 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

DillonN · 10 months ago

Workaround I found is use the NPM client instead of the native one.

github-actions[bot] · 9 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 8 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.