fix(skill-tools): follow symlinks in skill discovery via rglob_follow - #23484
Closed
redpiggy-cyber wants to merge 4 commits into
Closed
fix(skill-tools): follow symlinks in skill discovery via rglob_follow#23484redpiggy-cyber wants to merge 4 commits into
redpiggy-cyber wants to merge 4 commits into
Conversation
PATCH-002 (WhatsApp debounce): fix event.type → event.message_type typo that silently broke all WhatsApp DM receiving since 2026-05-09. PATCH-003 (Weixin debounce): re-apply text batching. PATCH-004 (pre_gateway_text_send hook): re-apply plugin outbound hook. PATCH-005 (MoA Requesty router): re-apply with updated models.
Python's Path.rglob() does not descend into symlinked directories (https://bugs.python.org/issue40358). When users symlink their skills directory (e.g. ~/.hermes/skills/redpiggy -> workspace/skills), skill_manage, skill_view, and skill_usage fail to discover any skills inside the symlinked tree. Add rglob_follow() helper to agent/skill_utils.py that uses os.walk(followlinks=True) and replace the critical rglob calls in: - tools/skill_manager_tool.py (_find_skill) - tools/skill_usage.py (list_agent_created_skill_names, _find_skill_dir) Fixes NousResearch#8293
Collaborator
|
Duplicate of #12624 (same symlink traversal fix for skill discovery). Note: this PR also includes unrelated changes to gateway/platforms, hermes_cli/plugins.py, sessions.db, and tools/mixture_of_agents_tool.py that are not part of the skill symlink fix. |
Contributor
Author
This was referenced Jul 31, 2026
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 skill discovery when the skills directory contains symlinked subdirectories. Python's
Path.rglob()intentionally does not descend into symlinked directories (CPython issue #40358), so when users symlink their skills directory (e.g.~/.hermes/skills/redpiggy -> workspace/skills),skill_manage,skill_view, and skill listing all fail to discover any skills inside the symlinked tree.Adds
rglob_follow()— a lightweight helper inagent/skill_utils.pythat usesos.walk(followlinks=True)— and replaces the criticalrglobcalls in the skill discovery paths.Related Issue
Fixes #8293
Type of Change
Changes Made
agent/skill_utils.py— Addedrglob_follow(root, pattern)generator that usesos.walk(followlinks=True)withEXCLUDED_SKILL_DIRSpruning. Same semantics asPath.rglob()but follows symlinks.tools/skill_manager_tool.py:290—_find_skill()now usesrglob_follow(skills_dir, "SKILL.md")instead ofskills_dir.rglob("SKILL.md").tools/skill_usage.py:235,577—list_agent_created_skill_names()and_find_skill_dir()userglob_followfor the same reason.tests/agent/test_skill_utils.py— Added 5 tests covering: symlink traversal, nested symlink traversal, excluded-dir pruning, directory name matching, and regular (non-symlink) behavior.How to Test
Checklist
Code
pytest tests/agent/test_skill_utils.py -vand all 9 tests passDocumentation & Housekeeping