Project skills in .claude/skills/ not discovered when running in a worktree

Resolved 💬 3 comments Opened Apr 9, 2026 by kwinto Closed Apr 10, 2026

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

  1. Create a project skill at .claude/skills/pr/SKILL.md with 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
---
``

  1. Commit and push the skill so it's part of the repo.
  2. Start Claude Code inside a worktree (e.g. via EnterWorktree or claude --worktree).
  3. The worktree is at: <repo>/.claude/worktrees/<name>/
  4. Confirm the skill file exists in the worktree: <repo>/.claude/worktrees/<name>/.claude/skills/pr/SKILL.md
  5. Check available skills — /pr does 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.

View original on GitHub ↗

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