Skip to content

fix(skills): load symlinked skill slash commands - #27759

Merged
teknium1 merged 1 commit into
NousResearch:mainfrom
wysie:fix/symlinked-skill-slash-commands
May 18, 2026
Merged

fix(skills): load symlinked skill slash commands#27759
teknium1 merged 1 commit into
NousResearch:mainfrom
wysie:fix/symlinked-skill-slash-commands

Conversation

@wysie

@wysie wysie commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve lexical paths under trusted skill roots when loading skill slash commands
  • Fix /skill-name invocations for skills symlinked under ~/.hermes/skills
  • Add regression coverage for symlinked skill directories

Why

Skill slash commands cache the discovered skill directory. When that directory is a symlink, _load_skill_payload() resolved it before normalizing it for skill_view(). If the symlink target lives outside ~/.hermes/skills, the loader passed an absolute path through and skill_view() rejected it with Non-relative patterns are unsupported.

This keeps the trusted, visible path under the configured skills root intact before falling back to resolved-path handling.

Safety

  • Only changes path normalization for skill slash/preload loading
  • Does not make arbitrary external paths trusted
  • Existing skill_view() platform, disabled-skill, collision, and warning behavior remains in place

Test Plan

  • ./scripts/run_tests.sh tests/agent/test_skill_commands.py tests/tools/test_skills_tool.py -q
  • ./scripts/run_tests.sh tests/agent/test_skill_commands.py::TestScanSkillCommands::test_loads_skill_invocation_from_symlinked_skill_dir -q

@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint tool/skills Skills system (list, view, manage) P2 Medium — degraded but workaround exists labels May 18, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #27662 — same fix for symlinked skill slash-command loading in _load_skill_payload(). Both normalize the lexical path under trusted skill roots before resolving symlinks.

@teknium1
teknium1 merged commit ff07873 into NousResearch:main May 18, 2026
16 checks passed
dev-xyz-0-0 added a commit to dev-xyz-0-0/hermes-agent that referenced this pull request May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint 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