Project skills in .claude/skills/ not discovered when running in a worktree
Bug description
Project-level skills placed in .claude/skills/ are not listed or discoverable when Claude Code is running inside a git worktree. The same skill works fine when running from the main repo checkout.
Reproduction steps
- Create a project skill at
.claude/skills/pr/SKILL.mdwith valid frontmatter:
``yaml``
---
name: pr
description: Create a PR from the template
disable-model-invocation: true
allowed-tools: Bash(gh *), Bash(git *), Read, Edit, Grep, Glob
---
- Commit and push the skill so it's part of the repo.
- Start Claude Code inside a worktree (e.g. via
EnterWorktreeorclaude --worktree). - The worktree is at:
<repo>/.claude/worktrees/<name>/ - Confirm the skill file exists in the worktree:
<repo>/.claude/worktrees/<name>/.claude/skills/pr/SKILL.md - Check available skills —
/prdoes not appear in the list.
Expected behavior
Project skills in .claude/skills/ should be discovered regardless of whether Claude Code is running in the main checkout or a worktree.
Actual behavior
The skill file exists at the correct path within the worktree, has valid frontmatter, and no encoding issues — but it is not listed among available skills. Only built-in and plugin skills appear.
Environment
- Claude Code version: 2.1.87
- OS: macOS (Darwin 25.4.0)
- Shell: zsh
- Worktree path:
<repo>/.claude/worktrees/<name>/
Notes
The worktree is nested inside the main repo's .claude/ directory (<repo>/.claude/worktrees/<name>/). This may cause skill discovery to resolve the wrong .claude directory or skip it entirely.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗