[BUG] A command file named skill.md in .claude/commands/ silently swallows all top-level commands in that directory (matched as SKILL.md; Windows case-insensitive)

Status Open
Reported on v2.1.227
Maintainer reply None cached
Activity 1 comment · opened Aug 11, 2026

Environment

  • Claude Code v2.1.227 (npm @anthropic-ai/claude-code, native claude.exe)
  • Windows 11 Pro 10.0.26200, NTFS (case-insensitive filesystem)

Summary

If a project contains a custom command file literally named skill.md inside .claude/commands/, the unified skills/commands scanner appears to match it as a SKILL.md package manifest. The entire .claude/commands/ directory is then loaded as one skill package named after the parent directory (commands), and every other top-level *.md command in that directory silently disappears — from the / autocomplete (No commands match "attend"), from the system:init slash_commands list, and from Skill-tool invocation. Commands in subdirectories (.claude/commands/foo/bar.md/foo:bar) are unaffected.

There is no warning anywhere; the failure is fully silent.

Minimal repro

mkdir -p proj/.claude/commands && cd proj

cat > .claude/commands/pingtest.md <<'MD'
---
description: Probe command - reply PING.
---
Reply with PING.
MD

claude --model claude-haiku-4-5-20251001 --max-turns 1 -p "ok" \
  --output-format stream-json --verbose | grep -o '"slash_commands":\[[^]]*\]'
# → contains "pingtest"  ✅

cat > .claude/commands/skill.md <<'MD'
---
description: Any command content. Filename is the trigger.
---
Load a skill.
MD

# re-run the same claude command:
# → "pingtest" is GONE; a phantom entry "commands" appears,
#   carrying skill.md's description  ❌

rm .claude/commands/skill.md
# re-run: "pingtest" is back  ✅

Measured on a real project with 48 top-level command files + 3 subdirectories: all 48 top-level commands hidden, all 6 namespaced (subdirectory) commands survive, and a phantom "commands" skill is listed with skill.md's description.

Expected

.claude/commands/skill.md should register as a command named /skill (or at minimum should not affect sibling files). Per the docs, .claude/commands/*.md are commands; SKILL.md packaging semantics should only apply under .claude/skills/<name>/SKILL.md.

Notes

  • The file on disk is lowercase skill.md, so the manifest match appears case-insensitive — likely an SKILL.md existence lookup that the Windows filesystem resolves case-insensitively. Linux/macOS behavior untested; if the lookup is exact-case there, this would be Windows-specific, which may explain why it has gone unreported.
  • Frontmatter name: is ignored for commands (name comes from the filename), so there is no workaround that preserves the /skill invocation name other than renaming the file.
  • Possibly related to older "commands not loading" reports such as #41864 (closed; that repro was a single command file, which loads fine on 2.1.227 — different root cause).

View original on GitHub ↗

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