fix: handle symlinks when scanning user/project skill directories#453
Open
tangdogdaihuman wants to merge 2 commits into
Open
fix: handle symlinks when scanning user/project skill directories#453tangdogdaihuman wants to merge 2 commits into
tangdogdaihuman wants to merge 2 commits into
Conversation
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.
PR quality triageChanged 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:
Coverage policy files:
Expected checks:
Test coverage signals:
Risk notes:
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix
collectSkillsFromRootsto handle symlinked skill directories — the same waycollectPluginSkillDirectoriesalready does.Problem
On Windows (and potentially other platforms),
Dirent.isDirectory()returnsfalsefor directories that are symbolic links. The user/project skill scanning code only checkedisDirectory(), 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
collectSkillsFromRootsfrom:to:
This exactly matches the pattern already used at line 317 in
collectPluginSkillDirectories.Test plan
~/.claude/skills/, open Settings > Skills tab — all 22 skills should now appear instead of 8loadSkillMetareturning null