[BUG] Custom skill appears twice in available skills list despite single SKILL.md file
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
## Summary
A custom skill defined via .claude/skills/<name>/SKILL.md appears twice in the available skills list shown in system
reminders. Only one file exists on disk.
## Reproduction steps
- Create a project directory (does not need to be a git repo)
- Create a single custom skill:
mkdir -p .claude/skills/my-skill
- Add
.claude/skills/my-skill/SKILL.mdwith frontmatter:
```yaml
---
name: my-skill
description: Example skill with sub-commands.
allowed-tools: Bash, Read
argument-hint: "[sub-command]"
---
Skill instructions here.
- Start a Claude Code session in the project directory
- Observe the available skills listed in system reminders
Actual behavior
The skill appears twice with identical entries:
- my-skill: Example skill with sub-commands.
- my-skill: Example skill with sub-commands.
Both entries are byte-for-byte identical. The skill still functions correctly — it's a cosmetic/loading issue.
Environment
- Claude Code version: 2.1.76
- OS: Ubuntu 24.04 (Linux 6.8.0-101-generic)
- Shell: bash
- Git repo: No (plain directory, no .git/, no worktrees)
- Skill location: .claude/skills/my-skill/SKILL.md (single file, confirmed via ls)
Not a duplicate of #27069
This is not the same issue as #27069 ("Skills/commands appear duplicated when using git worktrees"):
┌───────────────────┬────────────────────────────────────────────────────────┬────────────────────┐
│ │ #27069 │ This issue │
├───────────────────┼────────────────────────────────────────────────────────┼────────────────────┤
│ Root cause │ Git worktrees — loads from both worktree and main repo │ No git repo at all │
├───────────────────┼────────────────────────────────────────────────────────┼────────────────────┤
│ Affected path │ .claude/commands/ │ .claude/skills/ │
├───────────────────┼────────────────────────────────────────────────────────┼────────────────────┤
│ Git status │ Inside a git worktree │ Not a git repo │
├───────────────────┼────────────────────────────────────────────────────────┼────────────────────┤
│ Duplication count │ 2x–6x+ │ Exactly 2x │
├───────────────────┼────────────────────────────────────────────────────────┼────────────────────┤
│ Workaround │ claude --worktree flag │ None known │
└───────────────────┴────────────────────────────────────────────────────────┴────────────────────┘
The underlying cause appears to be a separate skill registration/loading bug where the skill file is discovered or registered
twice during initialization, unrelated to worktree path resolution.
Possibly related: #31425
What Should Happen?
Expected behavior
The skill appears once:
- my-skill: Example skill with sub-commands.
Error Messages/Logs
Steps to Reproduce
Reproduction steps
- Create a project directory (does not need to be a git repo)
- Create a single custom skill:
mkdir -p .claude/skills/my-skill
- Add
.claude/skills/my-skill/SKILL.mdwith frontmatter:
```yaml
---
name: my-skill
description: Example skill with sub-commands.
allowed-tools: Bash, Read
argument-hint: "[sub-command]"
---
Skill instructions here.
- Start a Claude Code session in the project directory
- Observe the available skills listed in system reminders
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.1.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗