fix(skills): discover symlinked skill directories#8769
Closed
officialasishkumar wants to merge 1 commit into
Closed
fix(skills): discover symlinked skill directories#8769officialasishkumar wants to merge 1 commit into
officialasishkumar wants to merge 1 commit into
Conversation
This was referenced Apr 22, 2026
Contributor
|
Thanks for the thorough PR, @officialasishkumar! The core issue reported in #8293 — symlinked skill directories being invisible to discovery — has already been fixed on Evidence:
The extra cycle-protection tests proposed here would be nice to have, but the functional bug is resolved. Feel free to open a focused follow-up PR if you'd like to land the additional cycle-safety coverage. This review was performed by the automated hermes-sweeper. |
Collaborator
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.
What does this PR do?
Fixes recursive skill discovery for skill directories that are symlinked under
~/.hermes/skills/<category>/<name>or configured external skill roots.Direct path loading already worked for some top-level symlinks, but recursive discovery used
Path.rglob()/os.walk()without following directory links. That madeskills_list, bare-nameskill_view, and the skills system prompt disagree about whether the same skill existed. This change centralizes recursive skill-file discovery on a symlink-aware, cycle-safe iterator.Related Issue
Fixes #8293
Type of Change
Changes Made
agent/skill_utils.pysoiter_skill_index_files()follows symlinked directories while visiting each real directory only once.tools/skills_tool.pyrecursiveSKILL.mdscans to the shared iterator for_find_all_skills(),skills_categories(), and bare-nameskill_view()fallback.skills_list,skill_view, andbuild_skills_system_prompt().How to Test
python -m pytest tests/tools/test_skills_tool.py tests/agent/test_prompt_builder.py -q -o addopts=''skills_list().skill_view("<name>")can load a symlinked skill by bare directory name.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
N/A
Screenshots / Logs
Targeted test output: