Skip to content

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

Open
samson-mak wants to merge 1 commit into
github:mainfrom
samson-mak:fix/hermes-profile-skills-dir
Open

fix(hermes): respect $HERMES_HOME env var for profile-mode skills dir#3334
samson-mak wants to merge 1 commit into
github:mainfrom
samson-mak:fix/hermes-profile-skills-dir

Conversation

@samson-mak

Copy link
Copy Markdown

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

The Hermes integration hardcoded ''~/.hermes/skills/'', which breaks when
Hermes runs under a non-default profile (where skills live under
''$HERMES_HOME/skills''). Check the HERMES_HOME environment variable first,
falling back to ''~/.hermes/skills'' for the default (non-profile) install.
@samson-mak samson-mak requested a review from mnriem as a code owner July 4, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant