[BUG] Custom skill appears twice in available skills list despite single SKILL.md file

Resolved 💬 3 comments Opened Mar 16, 2026 by hellomrfan-hk Closed Apr 13, 2026

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

  1. Create a project directory (does not need to be a git repo)
  2. Create a single custom skill:

mkdir -p .claude/skills/my-skill

  1. Add .claude/skills/my-skill/SKILL.md with frontmatter:

```yaml
---
name: my-skill
description: Example skill with sub-commands.
allowed-tools: Bash, Read
argument-hint: "[sub-command]"
---

Skill instructions here.

  1. Start a Claude Code session in the project directory
  2. 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

  1. Create a project directory (does not need to be a git repo)
  2. Create a single custom skill:

mkdir -p .claude/skills/my-skill

  1. Add .claude/skills/my-skill/SKILL.md with frontmatter:

```yaml
---
name: my-skill
description: Example skill with sub-commands.
allowed-tools: Bash, Read
argument-hint: "[sub-command]"
---

Skill instructions here.

  1. Start a Claude Code session in the project directory
  2. 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_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗