fix(skills): follow symlinks in iter_skill_index_files#11847
Closed
xandersbell wants to merge 4 commits into
Closed
fix(skills): follow symlinks in iter_skill_index_files#11847xandersbell wants to merge 4 commits into
xandersbell wants to merge 4 commits into
Conversation
os.walk() by default does not follow symlinks, causing skills linked via symlinks to be invisible to the skill discovery system. Add followlinks=True so that symlinked skill directories are scanned.
Contributor
Author
|
Hi @teknium1, this is a small one-line fix (add to ) that enables symlinked skills to be discovered. The PR is ready to merge — no review comments yet. Could you take a look? Thanks! |
Collaborator
Contributor
|
Thanks @xandersbell! Your substantive commit was cherry-picked and merged via #14230 with your authorship preserved. |
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.
Problem
os.walk()does not follow symlinks by default. When a skill is installed via symlink (e.g., `ln -s /external/path skill`), the skill discovery system cannot find it because `iter_skill_index_files()` inagent/skill_utils.pyuses `os.walk(skills_dir)` without `followlinks=True`.This affects users who want to:
Fix
Add `followlinks=True` to the `os.walk()` call in `iter_skill_index_files()`.
This is a minimal one-line change. Symlinks to `.git`, `.github`, and `.hub` directories are already filtered out by the existing `EXCLUDED_SKILL_DIRS` logic, so there is no security concern with following symlinks.