Skip to content

hermes

hermes

HermesResolver — resolves skills from NousResearch/hermes-agent.

Layout: skills///SKILL.md skills//DESCRIPTION.md (skipped)

Classes

HermesResolver

HermesResolver(cache_root: Path | None = None)

Bases: SourceResolver

Resolves skills from the Hermes Agent repository.

Source code in src/openjarvis/skills/sources/hermes.py
def __init__(self, cache_root: Path | None = None) -> None:
    if cache_root is None:
        cache_root = Path("~/.openjarvis/skill-cache/hermes/").expanduser()
    self._cache_root = Path(cache_root)
Functions
sync
sync() -> None

Clone or pull the Hermes repo into the cache directory.

Source code in src/openjarvis/skills/sources/hermes.py
def sync(self) -> None:
    """Clone or pull the Hermes repo into the cache directory."""
    if self._cache_root.exists() and (self._cache_root / ".git").exists():
        subprocess.run(
            ["git", "-C", str(self._cache_root), "pull", "--ff-only"],
            check=True,
        )
    else:
        self._cache_root.parent.mkdir(parents=True, exist_ok=True)
        subprocess.run(
            ["git", "clone", HERMES_REPO_URL, str(self._cache_root)],
            check=True,
        )
list_skills
list_skills() -> List[ResolvedSkill]

Walk skills///SKILL.md.

Source code in src/openjarvis/skills/sources/hermes.py
def list_skills(self) -> List[ResolvedSkill]:
    """Walk skills/<category>/<skill>/SKILL.md."""
    skills_root = self._cache_root / "skills"
    if not skills_root.exists():
        return []

    results: List[ResolvedSkill] = []
    commit = self._read_commit()

    for category_dir in sorted(skills_root.iterdir()):
        if not category_dir.is_dir():
            continue
        category = category_dir.name
        for skill_dir in sorted(category_dir.iterdir()):
            if not skill_dir.is_dir():
                continue  # skip DESCRIPTION.md and other files
            skill_md = skill_dir / "SKILL.md"
            if not skill_md.exists():
                continue

            # Read minimal frontmatter for the preview
            name, description = self._read_preview(
                skill_md, default_name=skill_dir.name
            )
            results.append(
                ResolvedSkill(
                    name=name,
                    source=self.name,
                    path=skill_dir,
                    category=category,
                    description=description,
                    commit=commit,
                )
            )

    return results