You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This covers setups that share skills across harnesses, e.g. ~/.hermes/skills/workflow/resume-session -> ~/.claude/skills/resume-session, where the slash command was visible but invocation returned no loaded skill message because skill_view rejected the absolute resolved path.
This PR takes a narrower approach: fixes path normalization/trust-check in _load_skill_payload specifically for slash-command loading, which the broader PRs may not fully address.
FWIW: on current main the agent/skill_commands.py portion of this PR looks already covered by an equivalent trusted-roots normalization in _load_skill_payload, so that hunk now duplicates/conflicts. The tools/skills_tool.py change (lexical-then-resolved trusted-dir check) is still needed and applies cleanly — might be worth rebasing this PR down to just that part plus the tests. Thanks for it: it resolved silent "outside the trusted skills directory" warnings for symlinked profile skill dirs in my setup.
Thanks for the focused symlinked-skill fix. I checked this against current main.
Problems
The agent/skill_commands.py part is now already covered on main: _load_skill_payload prefers a lexical path under trusted roots before resolving symlinks at agent/skill_commands.py:72, added in ff078738ea0108548fc9c147140942fbeab7c833. This is why the full PR currently conflicts there.
The tools-side bug still appears real: tools/skills_tool.py:1117 checks only skill_md.resolve().relative_to(_td) before warning, so a skill reached through a symlink under SKILLS_DIR can still resolve outside SKILLS_DIR.resolve() and get the false “outside the trusted skills directory” warning.
Suggested changes
Salvage just the tools/skills_tool.py lexical-then-resolved trusted-dir check plus the tests/tools/test_skills_tool.py warning regression test.
Drop the now-duplicated agent/skill_commands.py hunk; current main already has equivalent slash-command loading coverage.
Automated hermes-sweeper review; humans make the final merge call.
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
comp/agentCore agent loop, run_agent.py, prompt builderP2Medium — degraded but workaround existstool/skillsSkills system (list, view, manage)type/bugSomething isn't working
4 participants
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.
Summary
~/.hermes/skillsis a symlink to a shared skills sourceTest Plan
/Users/alanxue/.hermes/hermes-agent/venv/bin/python -m pytest tests/agent/test_skill_commands.py -q/Users/alanxue/.hermes/hermes-agent/venv/bin/python -m pytest tests/tools/test_skills_tool.py -qNotes
This covers setups that share skills across harnesses, e.g.
~/.hermes/skills/workflow/resume-session -> ~/.claude/skills/resume-session, where the slash command was visible but invocation returned no loaded skill message becauseskill_viewrejected the absolute resolved path.