Skip to content

fix: hermes install missing SKILL.md + python3 fallback on Windows - #1416

Open
OmniaZ1 wants to merge 1 commit into
Graphify-Labs:v8from
OmniaZ1:fix/hermes-install-python3-windows
Open

OmniaZ1 wants to merge 1 commit into
Graphify-Labs:v8from
OmniaZ1:fix/hermes-install-python3-windows

Conversation

@OmniaZ1

@OmniaZ1 OmniaZ1 commented Jun 21, 2026

Copy link
Copy Markdown

Two fixes for Hermes (and other per-platform shortcut) installations

Bug 1: graphify hermes install skips SKILL.md installation

graphify hermes install (and graphify codex install, graphify claw install, etc.) only calls _agents_install() which writes the AGENTS.md section, but never calls _copy_skill_file(). This leaves the user with no SKILL.md and no references/ sidecar — the skill is invisible to the host agent.

The generic graphify install --platform hermes works correctly because it goes through install() → _copy_skill_file(). The per-platform shortcuts bypass this.

Fix: Add _copy_skill_file(cmd) before _agents_install() and _remove_skill_file(cmd) before _agents_uninstall() in the per-platform CLI handler (__main__.py L2508-2514).

This affects all platforms in the group: aider, codex, opencode, claw, droid, trae, trae-cn, hermes.

Bug 2: python3 fallback fails on Windows

The skill-claw.md (used by Hermes, claw, aider, and others) falls back to python3 when uv/pipx/shebang detection fails. On Windows, python3 does not exist — the executable is python.

Fix: Replace bare python3 fallbacks with a two-probe chain:

if command -v python3 >/dev/null 2>&1; then PYTHON=python3
elif command -v python >/dev/null 2>&1; then PYTHON=python
fi

Applied in two locations in skill-claw.md:

  • L84: Main detection chain fallback
  • L599/L601: Re-detection chain when .graphify_python is missing

Backwards compatibility

Both fixes are fully backwards-compatible:

  • Unix users see no change (python3 probe succeeds first)
  • The skill install path now works identically to graphify install --platform

Tested on

  • Windows 11, Git Bash (MSYS), uv tool install, Python 3.11
  • Verified: graphify hermes install now installs SKILL.md + references/ + AGENTS.md
  • Verified: all 5 python3 references in installed SKILL.md are protected by command -v checks

Two fixes for the Hermes platform integration:

1. `graphify hermes install` (and other per-platform shortcuts like
   `graphify codex install`, `graphify claw install`, etc.) only wrote
   the AGENTS.md section but skipped `_copy_skill_file()`, leaving no
   SKILL.md or references/ sidecar installed. The generic
   `graphify install --platform hermes` worked correctly because it
   called `install()` which includes the skill copy. Fix: add
   `_copy_skill_file(cmd)` before `_agents_install()` and
   `_remove_skill_file(cmd)` before `_agents_uninstall()` in the
   per-platform CLI handler.

2. The skill-claw.md (used by Hermes, claw, and other platforms) falls
   back to `python3` when uv/pipx/shebang detection fails. On Windows,
   `python3` does not exist — the executable is `python`. Fix: replace
   bare `python3` fallbacks with a two-probe chain that tries
   `python3` first (Unix), then `python` (Windows), using
   `command -v` to check availability before assignment.

Both fixes are backwards-compatible: Unix users see no change (python3
probe succeeds first), and the skill install now works identically to
the generic `graphify install --platform` path.

@safishamsi safishamsi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this — the diagnosis is right: the AGENTS.md-family user-scope dispatch (hermes/claw/droid/trae/…) never called _copy_skill_file, so SKILL.md was never written (#1403). Two blockers before merge:

  1. Edits a generated file → fails CI. graphify/skill-claw.md is generated by tools/skillgen from fragments, and the skillgen-check CI job byte-diffs the render against the committed files + expected/, so a hand-edit fails. The python3 fallback needs to go in the fragment (tools/skillgen/fragments/shell/posix.md, which also feeds core/aider.md/core/devin.md), then python -m tools.skillgen to regenerate all skill files and --bless the expected/ snapshots. As-is the fallback only landed in 1 of the 13 generated skills.
  2. No test. This is exactly what tests/test_install*.py covers — please add a regression test asserting SKILL.md exists after a user-scope hermes install (ideally claw/droid/trae too, since they share the dispatch).

The __main__.py fix itself (adding _copy_skill_file/_remove_skill_file to the dispatch, matching the _amp_install pattern) is correct — it just needs to go through skillgen + a test.

@saman6384

Copy link
Copy Markdown

Still reproduces on the current release, ~3 months and many releases after this was first filed.

Version: graphifyy 0.9.64 (uv tool install), Linux, graphify/install.py at commit b9cd957.

$ cd /tmp && graphify hermes install
graphify section written to /tmp/AGENTS.md

Hermes will now check the knowledge graph before answering
codebase questions and rebuild it after code changes.

$ ls ~/.hermes/skills/graphify
ls: cannot access '/home/<user>/.hermes/skills/graphify': No such file or directory

Exit code is 0 and nothing indicates a problem, so Hermes ends up with the AGENTS.md text that says to run graphify query but without the skill that documents the query flags and ambiguity handling.

Root cause is unchanged at 0.9.64

The non-project branch (install.py:2343-2349) still calls _agents_install alone:

elif cmd in ("aider", "codex", "opencode", "claw", "droid", "trae", "trae-cn", "hermes"):
    subcmd = sys.argv[2] if len(sys.argv) > 2 else ""
    if subcmd == "install":
        if "--project" in sys.argv[3:]:
            _project_install(cmd, Path("."))
        else:
            _agents_install(Path("."), cmd)      # <-- _copy_skill_file never called

so on this path the following stay unreachable for hermes:

_project_install (install.py:1643-1645) does call _copy_skill_file(..., project=True) for the same platform tuple, which is why --project works and the bare command does not.

The uninstall side is symmetric — install.py:2350-2354 calls _agents_uninstall without _remove_skill_file — so graphify hermes uninstall also will not remove a skill the user installed by hand.

Workaround verified on 0.9.64

The copy machinery itself is fine; only the dispatch branch is broken. Calling it directly installs the intended bundle (SKILL.md from skill-claw.md + the 8-file claw references sidecar + the .graphify_version stamp):

~/.local/share/uv/tools/graphifyy/bin/python3 -c \
  "from graphify.install import _copy_skill_file; _copy_skill_file('hermes')"
#   references       ->  ~/.hermes/skills/graphify/references
#   skill installed  ->  ~/.hermes/skills/graphify/SKILL.md

Confirmed loadable by Hermes afterwards (~/.hermes/skills/graphify/SKILL.md + references/, correct name/description frontmatter).

Also confirmed on 0.9.64, agreeing with the note above: graphify install --platform hermes does write the skill to ~/.hermes/skills/graphify/ correctly and writes no stray AGENTS.md. It additionally preserves a locally-modified SKILL.md as SKILL.md.bak before overwriting. So that documented path is a dependable fallback until this is fixed.

Scope note: this comment is only about the missing skill. The cwd-AGENTS.md half of the behavior is tracked in #2164, with the trust-boundary angle in #1846 and the help-text wording in #1849.

This branch has not been deployed

No deployments
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.

3 participants