[BUG] Palette shows duplicate entries when a skill and a command share a name; triplicates when cwd is $HOME
Environment
- Claude Code v2.1.235, Linux (Fedora, kernel 7.1.8), CLI entrypoint
- No plugins provide the affected commands
Summary
When the same name exists as both a legacy markdown command (~/.claude/commands/<name>.md) and a skill (~/.claude/skills/<name>/SKILL.md), the slash-command palette shows duplicate entries instead of the skill shadowing the command. When the session's working directory is $HOME (so <cwd>/.claude resolves to the same ~/.claude directory as the user config dir), the palette shows three entries for the same name, all labeled (user).
Expected
Per https://code.claude.com/docs/en/skills.md#where-skills-live:
"if a skill and a command share the same name, the skill takes precedence. For example, with both.claude/commands/deploy.mdand.claude/skills/deploy/SKILL.md,/deployruns the skill."
One palette entry per name.
Actual
Typing /gsd showed /gsd-fast three times and /gsd-help three times (same description, all (user)), with:
~/.claude/commands/gsd-fast.md(frontmattername: gsd-fast)~/.claude/skills/gsd-fast/SKILL.md(same name, near-identical description)- cwd =
/home/<user>(home directory), no git repo
Deduplication appears to fail both across source types (commands vs skills) and across scan roots when the user config dir and the "project" .claude dir are the same physical directory.
Related issue in the same area
skillOverrides in settings only applies to skills, so a name that exists only as ~/.claude/commands/<name>.md cannot be hidden at all — "<name>": "off" has no effect and the command still surfaces in the palette and the model-visible skill list. If commands are surfaced through the skill mechanism, skillOverrides should arguably cover them (or an equivalent knob should exist).
Workaround
Deleting the superseded commands/*.md files removes the duplicates.
---
Filed via Claude Code on the user's behalf.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗