From 43e7c984a8ec60f0d8871dd856d8aef85e598c78 Mon Sep 17 00:00:00 2001 From: Leone Parise Date: Wed, 29 Apr 2026 21:51:14 +0000 Subject: [PATCH 1/2] fix(skills): exclude .archive from skill index walk Archived skills (moved to ~/.hermes/skills/.archive/ by the curator) were still surfaced in the system prompt under a fake '.archive' category, causing the agent to load and try to use deprecated skills. The os.walk in iter_skill_index_files() only excluded .git/.github/.hub. Add '.archive' to EXCLUDED_SKILL_DIRS, and to the two other places that hardcode the same exclusion tuple (gateway/run.py and agent/skill_commands.py). --- agent/skill_commands.py | 2 +- agent/skill_utils.py | 4 ++-- gateway/run.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/agent/skill_commands.py b/agent/skill_commands.py index fff29eff66835..e878326afeeed 100644 --- a/agent/skill_commands.py +++ b/agent/skill_commands.py @@ -234,7 +234,7 @@ def scan_skill_commands() -> Dict[str, Dict[str, Any]]: for scan_dir in dirs_to_scan: for skill_md in iter_skill_index_files(scan_dir, "SKILL.md"): - if any(part in ('.git', '.github', '.hub') for part in skill_md.parts): + if any(part in ('.git', '.github', '.hub', '.archive') for part in skill_md.parts): continue try: content = skill_md.read_text(encoding='utf-8') diff --git a/agent/skill_utils.py b/agent/skill_utils.py index b26bf82981320..cecbb1fc6c291 100644 --- a/agent/skill_utils.py +++ b/agent/skill_utils.py @@ -24,7 +24,7 @@ "windows": "win32", } -EXCLUDED_SKILL_DIRS = frozenset((".git", ".github", ".hub")) +EXCLUDED_SKILL_DIRS = frozenset((".git", ".github", ".hub", ".archive")) # ── Lazy YAML loader ───────────────────────────────────────────────────── @@ -440,7 +440,7 @@ def extract_skill_description(frontmatter: Dict[str, Any]) -> str: def iter_skill_index_files(skills_dir: Path, filename: str): """Walk skills_dir yielding sorted paths matching *filename*. - Excludes ``.git``, ``.github``, ``.hub`` directories. + Excludes ``.git``, ``.github``, ``.hub``, ``.archive`` directories. """ matches = [] for root, dirs, files in os.walk(skills_dir, followlinks=True): diff --git a/gateway/run.py b/gateway/run.py index 04061ba42c971..9107f6c485e8f 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -638,7 +638,7 @@ def _check_unavailable_skill(command_name: str) -> str | None: if not skills_dir.exists(): continue for skill_md in skills_dir.rglob("SKILL.md"): - if any(part in ('.git', '.github', '.hub') for part in skill_md.parts): + if any(part in ('.git', '.github', '.hub', '.archive') for part in skill_md.parts): continue name = skill_md.parent.name.lower().replace("_", "-") if name == normalized and name in disabled: From 5f54d3d260716e9c10eca9c5fc84bb1a96732c5d Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 30 Apr 2026 04:58:45 -0700 Subject: [PATCH 2/2] fix(skills): also exclude .archive in skills_tool + add author map entry Widen #17639 to the fourth sibling site (tools/skills_tool.py _EXCLUDED_SKILL_DIRS) and register leoneparise in scripts/release.py AUTHOR_MAP so CI release script resolves the contributor. --- scripts/release.py | 1 + tools/skills_tool.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/release.py b/scripts/release.py index 869516a69083e..ade4591bc6faa 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -42,6 +42,7 @@ # teknium (multiple emails) "teknium1@gmail.com": "teknium1", "qiyin.zuo@pcitc.com": "qiyin-code", + "leone.parise@gmail.com": "leoneparise", "teknium@nousresearch.com": "teknium1", "127238744+teknium1@users.noreply.github.com": "teknium1", "2093036+exiao@users.noreply.github.com": "exiao", diff --git a/tools/skills_tool.py b/tools/skills_tool.py index 4ce338c59f4ea..ed7a3e6a8d553 100644 --- a/tools/skills_tool.py +++ b/tools/skills_tool.py @@ -100,7 +100,7 @@ "windows": "win32", } _ENV_VAR_NAME_RE = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$") -_EXCLUDED_SKILL_DIRS = frozenset((".git", ".github", ".hub")) +_EXCLUDED_SKILL_DIRS = frozenset((".git", ".github", ".hub", ".archive")) _REMOTE_ENV_BACKENDS = frozenset( {"docker", "singularity", "modal", "ssh", "daytona", "vercel_sandbox"} )