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

Resolved 💬 5 comments Opened Jun 21, 2025 by petebytes 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 ↗

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