From c6d6db699c13718fcc09c993d50a21b282457a6e Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sun, 5 Jul 2026 17:42:06 -0500 Subject: [PATCH] =?UTF-8?q?ascii-video,=20minecraft-modpack-server,=20obsi?= =?UTF-8?q?dian,=20pokemon-player,=20powerpoint,=20songwriting-and-ai-musi?= =?UTF-8?q?c:=20add=20version=201.0.0=20=E2=80=94=20gitea:=20sync=20v1.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gitea/SKILL.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/gitea/SKILL.md b/gitea/SKILL.md index a88ddab..14b7678 100644 --- a/gitea/SKILL.md +++ b/gitea/SKILL.md @@ -1,7 +1,7 @@ --- name: gitea description: "Push Hermes skill updates to the local Gitea instance at 10.0.0.61:3000. Clone, copy, commit, push workflow." -version: 1.1.0 +version: 1.2.0 author: Hermes Agent license: MIT platforms: [linux] @@ -87,3 +87,50 @@ git push origin main - **Skill directory names in the repo are flat** — e.g. `ask-claude/SKILL.md`, not `autonomous-ai-agents/ask-claude/SKILL.md`. The category hierarchy exists in `~/.hermes/profiles/general/skills/` but the Gitea repo uses flat skill names. - **Clone is disposable.** `/tmp/hermes-skills` is a working copy. Don't store anything there you need to keep. Re-clone if the directory is missing or stale. - **No credential helper needed.** The token-in-URL pattern works for one-shot pushes. Don't store the token in git config or credential files. +- **Cross-profile pushes require `cross_profile=True`.** When pushing skills from the research profile (or any non-general profile), the write_file guard will block. Pass `cross_profile=True` to bypass. The Gitea repo is the canonical store for ALL profiles' skills, not just general. +- **New skills need a `version:` field.** If a skill is missing `version:` in its YAML frontmatter, add `version: 1.0.0` before pushing. The Gitea repo requires it. + +## Sync Audit (Check All Skills Are Versioned and in Gitea) + +Use this Python script to cross-reference all local skills against Gitea: + +```python +import os, re + +skills_dir = "/home/n8n/.hermes/profiles/general/skills" +skills = [] +for root, dirs, files in os.walk(skills_dir): + if "SKILL.md" in files: + path = os.path.join(root, "SKILL.md") + content = open(path).read() + name = re.search(r'^name:\s*(.+)$', content, re.MULTILINE) + version = re.search(r'^version:\s*(.+)$', content, re.MULTILINE) + name = name.group(1).strip() if name else os.path.basename(root) + version = version.group(1).strip() if version else "unknown" + skills.append((name, version, path)) + +gitea_dir = "/tmp/hermes-skills" +gitea_skills = set() +gitea_versions = {} +for entry in os.listdir(gitea_dir): + skill_path = os.path.join(gitea_dir, entry, "SKILL.md") + if os.path.isfile(skill_path): + content = open(skill_path).read() + gname = re.search(r'^name:\s*(.+)$', content, re.MULTILINE) + gversion = re.search(r'^version:\s*(.+)$', content, re.MULTILINE) + gname = gname.group(1).strip() if gname else entry + gversion = gversion.group(1).strip() if gversion else "unknown" + gitea_skills.add(gname) + gitea_versions[gname] = gversion + +for name, version, path in sorted(skills): + in_gitea = "✓" if name in gitea_skills else "✗ MISSING" + gitea_ver = gitea_versions.get(name, "—") + ver_match = "✓" if version == gitea_ver else f"✗ (local:{version} vs gitea:{gitea_ver})" + print(f" {name:40s} v{version:10s} gitea:{in_gitea:12s} version:{ver_match}") +``` + +Run this after any batch of skill changes. Fix issues: +- **Missing `version:`** → add `version: 1.0.0` to the skill's YAML frontmatter +- **Missing from Gitea** → `mkdir` the directory and copy the SKILL.md +- **Version mismatch** → copy the updated local SKILL.md to Gitea