Skip to content

fix(skills): follow symlinked category dirs consistently#14740

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-811c6665
Apr 23, 2026
Merged

fix(skills): follow symlinked category dirs consistently#14740
teknium1 merged 1 commit into
mainfrom
hermes/hermes-811c6665

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvage of #14668 by @helix4u onto current main.

Summary

Symlinked category dirs under ~/.hermes/skills/ are now fully discovered — skills_list(), skill_view(name=...), and slash-command scanning all see them.

Root cause

iter_skill_index_files() was fixed to use os.walk(followlinks=True) back in commit 02aba4a, but three residual Path.rglob("SKILL.md") scan sites were never migrated. Path.rglob does not follow directory symlinks; os.walk(followlinks=True) does.

Changes

  • tools/skills_tool.py: _find_all_skills() and name-search in skill_view() switched to iter_skill_index_files()
  • agent/skill_commands.py: scan_skill_commands() switched to the same iterator
  • New shared _sort_skills() helper so skills_list() order matches the skill_view() not-found hint
  • Regression tests for all three scan paths + hint ordering

Validation

scripts/run_tests.sh tests/tools/test_skills_tool.py tests/agent/test_skill_commands.py tests/agent/test_external_skills.py — 124/124 pass.

Closes #14668 (salvage with original authorship preserved via rebase-merge).

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

Labels

comp/agent Core agent loop, run_agent.py, prompt builder 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