Global skills registered N times — duplicates in slash command autocomplete
Description
Custom skills in ~/.claude/skills/ appear multiple times in the / autocomplete. Each skill is duplicated exactly as many times as there are projects with a local .claude/settings.local.json.
Environment
- Claude Code version: 2.1.92
- OS: macOS 14.6 (Darwin 24.6.0)
- Interface: JetBrains (WebStorm) plugin
Steps to Reproduce
- Have custom skills in
~/.claude/skills/(e.g.agent-commit,commit, etc.) - Have multiple projects each with a
.claude/settings.local.json - Open Claude Code and type
/to open the autocomplete
Expected Behavior
Each skill appears once in the autocomplete.
Actual Behavior
Each skill appears 6 times. The duplication count (6) correlates exactly with the number of projects that have both a ~/.claude/projects/<project>/ entry and a local .claude/settings.local.json:
~/.claude(global)~/WebStormProjects/omodo-ai/.claude/~/WebStormProjects/tidywl/.claude/~/WebStormProjects/tidywl-site/.claude/~/Documents/Documents/dev/code-scratchpad/.claude/~/Documents/Documents/dev/range/.claude/
Investigation
~/.claude/skills/contains exactly 9 skill directories, all real directories (no symlinks)- No other
skills/directories exist anywhere under~/WebStormProjectsor~/Documents - No project-level CLAUDE.md files register slash commands
- 11 total project contexts in
~/.claude/projects/, 6 with local settings - Issue persists after full computer reboot
Suspected Cause
Global skills (~/.claude/skills/) appear to be registered once per project that has a settings.local.json, rather than being loaded once and deduplicated. This results in N registrations of every global skill where N = number of projects with local settings.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗