Skip to content

fix(skills): follow symlinks in iter_skill_index_files#11847

Closed
xandersbell wants to merge 4 commits into
NousResearch:mainfrom
xandersbell:fix/skill-symlink-support
Closed

fix(skills): follow symlinks in iter_skill_index_files#11847
xandersbell wants to merge 4 commits into
NousResearch:mainfrom
xandersbell:fix/skill-symlink-support

Conversation

@xandersbell

Copy link
Copy Markdown
Contributor

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()` in agent/skill_utils.py uses `os.walk(skills_dir)` without `followlinks=True`.

This affects users who want to:

  • Share skills across profiles via symlinks
  • Keep skills in a separate directory outside `~/.hermes/skills/`
  • Use the common pattern of symlinking skills from a codebase repository

Fix

Add `followlinks=True` to the `os.walk()` call in `iter_skill_index_files()`.

# Before
for root, dirs, files in os.walk(skills_dir):

# After
for root, dirs, files in os.walk(skills_dir, followlinks=True):

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.

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.
@xandersbell

Copy link
Copy Markdown
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!

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #12624 — same one-line fix (followlinks=True in os.walk) in the same file. Also related to #7634 (adds cycle guard), #8769, #9253. Issue #8293 tracks the underlying bug.

@alt-glitch alt-glitch added the duplicate This issue or pull request already exists label Apr 22, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks @xandersbell! Your substantive commit was cherry-picked and merged via #14230 with your authorship preserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants