[BUG] User-level slash commands in `~/.claude/commands` incorrectly labeled as `(project, gitignored)`

Resolved 💬 3 comments Opened Aug 14, 2025 by BobbyWang0120 Closed Aug 18, 2025

Environment

  • Platform (select one):
  • [x] Claude Max Plan
  • Claude CLI version: v1.0.81
  • Operating System: macOS 15.5
  • Terminal: iTerm2

Bug Description

When placing custom slash command files in the user-level directory ~/.claude/commands, they are displayed in the command list as if they belong to the project scope and are marked (project, gitignored).
This happens even when:
• The files are actually located in ~/.claude/commands (no symlinks involved)
• They are not inside the project folder and are not intended to be affected by .gitignore

Steps to Reproduce

  1. Create a new command file:
  2. Open Claude Code in a project where some paths are listed in .gitignore (not related to ~/.claude/commands).
  3. Type / to open the command list.
  4. Observe that test is labeled (project, gitignored) instead of (user).

Expected Behavior

Commands in ~/.claude/commands should always be shown under the user scope (user).

Actual Behavior

They are incorrectly shown as (project, gitignored) in the command list.

Additional Context

• This looks like the scope detection logic is erroneously applying .gitignore checks to global user commands.
• Reproduced without any symlinks between ~/.claude/commands and project directories.

View original on GitHub ↗

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