Skip to content

fix: handle symlinks when scanning user/project skill directories#453

Open
tangdogdaihuman wants to merge 2 commits into
NanmiCoder:mainfrom
tangdogdaihuman:main
Open

fix: handle symlinks when scanning user/project skill directories#453
tangdogdaihuman wants to merge 2 commits into
NanmiCoder:mainfrom
tangdogdaihuman:main

Conversation

@tangdogdaihuman
Copy link
Copy Markdown

Summary

Fix collectSkillsFromRoots to handle symlinked skill directories — the same way collectPluginSkillDirectories already does.

Problem

On Windows (and potentially other platforms), Dirent.isDirectory() returns false for directories that are symbolic links. The user/project skill scanning code only checked isDirectory(), silently skipping all symlinked skills in ~/.claude/skills/. In practice this caused ~14 of 22 user skills to be hidden from the desktop settings UI.

Fix

Changed the guard in collectSkillsFromRoots from:

if (!entry.isDirectory() || ...)

to:

if ((!entry.isDirectory() && !entry.isSymbolicLink()) || ...)

This exactly matches the pattern already used at line 317 in collectPluginSkillDirectories.

Test plan

  • On Windows with symlinked skills in ~/.claude/skills/, open Settings > Skills tab — all 22 skills should now appear instead of 8
  • Real directories (non-symlinks) continue to work as before
  • Symlinks pointing to non-directories are filtered by loadSkillMeta returning null

Previously collectSkillsFromRoots only checked isDirectory(), which
returns false for symbolic links on some platforms (particularly
Windows). This caused symlinked skills in ~/.claude/skills/ to be
silently skipped in the settings UI. The plugin scanning path already
had the correct isDirectory() || isSymbolicLink() guard — this aligns
the user/project scanning to match.
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels May 14, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 14, 2026

PR quality triage

Changed areas: area:server

CLI core policy: No CLI-core policy block detected.

Missing-test policy: No missing-test policy block detected.

Coverage baseline policy: No coverage-baseline policy block detected.

CLI core files:

  • none

Coverage policy files:

  • none

Expected checks:

  • change-policy
  • desktop-checks
  • server-checks
  • desktop-native-checks
  • coverage-checks

Test coverage signals:

  • No obvious missing-test signal from changed paths.

Risk notes:

  • No special risk notes from changed paths.

Hard merge gates still come from GitHub Actions, not AI review.

Dosu handoff: Dosu can be used as the AI reviewer for risk explanation, missing-test prompts, and maintainer Q&A. If it does not comment automatically from the PR template, ask:

@dosubot review this PR for changed-area risk, missing tests, docs impact, desktop startup risk, and CLI core impact.

Verifies that collectSkillsFromRoots correctly discovers symlinked
skill directories alongside regular directories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:server bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant