spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

fix(hermes): respect $HERMES_HOME env var for profile-mode skills dir

Open samson-mak opened this issue 4 months ago • 0 comments

Problem

The Hermes integration hardcodes ~/.hermes/skills/ in _hermes_home_skills_dir():

return Path.home() / ".hermes" / "skills"

This breaks when Hermes runs under a non-default profile, where $HERMES_HOME points to ~/.hermes/profiles/<name>/ and skills live under $HERMES_HOME/skills/.

Fix

Check HERMES_HOME env var first, fall back to ~/.hermes/skills:

hermes_home = os.environ.get("HERMES_HOME")
if hermes_home:
    return Path(hermes_home) / "skills"
return Path.home() / ".hermes" / "skills"

Matches Hermes internal get_skills_dir() → get_hermes_home() / "skills".

Testing

  • HERMES_HOME set → skills install to profile dir, visible via hermes skills list
  • HERMES_HOME unset → falls back to ~/.hermes/skills, existing behaviour preserved

samson-mak avatar Jul 04 '26 13:07 samson-mak