Command scanner surfaces archived subdirectories (e.g. commands/_archive/) as namespaced commands

Resolved 💬 1 comment Opened Jul 12, 2026 by myclawbbbot-cyber Closed Jul 13, 2026

Environment

  • Claude Code v2.1.177, macOS (darwin 25.x)

Steps to reproduce

  1. Create a custom command, e.g. ~/.claude/commands/foo.md.
  2. Retire it by moving it into an archive subdirectory: ~/.claude/commands/_archive/2026-07-11-foo.md.
  3. List available commands/skills (same session — hot-reload picks it up immediately — or a fresh session).

Expected

Underscore-prefixed (or hidden) subdirectories are ignored by the command scanner, so retired commands disappear from the command list.

Actual

The archived file surfaces as a namespaced command _archive:2026-07-11-foo — retired commands stay invocable and clutter the command list.

Reproduced live on v2.1.177: creating commands/_archive/probe-archive-scan.md made it appear immediately as skill _archive:probe-archive-scan in the available-skills list.

Suggestion

Skip _-prefixed and dot-hidden subdirectories when scanning commands/ (matching the common "underscore = private" convention), or document a supported way to retire a command in place.

Workaround

Move retired commands out of the scanned tree entirely (e.g. ~/.claude/.archive/commands/).

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗