Hermes Memory Github Sync logo

Hermes Memory Github Sync

Community
itgoyo
hermes-memory-github-sync

Set up automatic GitHub sync for Hermes Agent memory, skills, and config using git + macOS launchd. Runs every 30 minutes in the background. Covers repo init, .gitignore pitfalls, token extraction, and launchd plist setup.

Overview

Publisheritgoyo
Repositoryhermes-skills
Skill namehermes-memory-github-sync
Stars
77
Forks
11
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by itgoyo on GitHub. Read the source before you install it.

Installation

Install the Hermes Memory Github Sync AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/itgoyo/hermes-skills/tree/main/devops/hermes-memory-github-sync
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/itgoyo/hermes-skills.git /tmp/hermes-skills
mkdir -p .claude/skills
cp -r /tmp/hermes-skills/devops/hermes-memory-github-sync .claude/skills/hermes-memory-github-sync
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hermes Memory Github Sync in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Hermes Memory Github Sync on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Hermes Memory Github Sync is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Hermes Memory GitHub Sync (macOS)

Automatically backs up ~/.hermes/memories/, ~/.hermes/skills/, and ~/.hermes/config.yaml to a private GitHub repo every 30 minutes via launchd.

Key Pitfalls (Learned from Experience)

  • NEVER use git add -A inside ~/.hermes — it will stage 10,000+ files from .venv/ and hermes-agent/
  • Always use explicit paths: git add memories/ skills/ config.yaml SOUL.md .gitignore
  • The hermes-agent/ subdirectory is a nested git repo — must be in .gitignore
  • The .venv/ virtual environment is huge — must be in .gitignore
  • GitHub token is already stored in ~/.git-credentials — no need to create a new one

Step 1: Extract GitHub Token

bash
TOKEN=$(grep github ~/.git-credentials | sed 's/.*:\(ghp_[^@]*\)@.*/\1/')
echo "Token: ${TOKEN:0:10}..."

Step 2: Create Private GitHub Repo via API

bash
curl -s -X POST \
  -H "Authorization: token $TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/user/repos \
  -d '{"name":"hermes-memory","private":true,"description":"Hermes Agent memory sync"}' \
  | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('clone_url','ERROR:'+str(d.get('message',d))))"

Step 3: Init Git Repo in ~/.hermes

bash
cd ~/.hermes
git init
git config user.name "yourname"
git config user.email "your@email.com"
git remote add origin "https://USERNAME:${TOKEN}@github.com/USERNAME/hermes-memory.git"

Step 4: Create .gitignore

Write to ~/.hermes/.gitignore:

gitignore
# Large directories — DO NOT sync
.venv/
hermes-agent/
sessions/
logs/
cron/
plugins/
__pycache__/

# Temp / sensitive files
*.lock
*.log
*.db
*.db-shm
*.db-wal
.env
auth.json
.DS_Store
.update_check
.hermes_history
.skills_prompt_snapshot.json

Step 5: First Commit & Push

bash
cd ~/.hermes
# IMPORTANT: use explicit paths, not git add -A
git add .gitignore memories/ skills/ config.yaml SOUL.md
git status --short | wc -l   # should be ~400-500 files, not 10000+
git commit -m "init: sync memories, skills and config"
git branch -M main
git push -u origin main

Step 6: Create Sync Script

Write to ~/.hermes/hermes-sync.sh:

bash
#!/bin/bash
set -euo pipefail

HERMES_DIR="$HOME/.hermes"
LOG_FILE="$HERMES_DIR/logs/hermes-sync.log"
DATE=$(date '+%Y-%m-%d %H:%M:%S')

mkdir -p "$HERMES_DIR/logs"
cd "$HERMES_DIR"

if [ ! -d ".git" ]; then
    echo "[$DATE] ERROR: not a git repo" >> "$LOG_FILE"
    exit 1
fi

# Stage only the important files
git add memories/ skills/ config.yaml SOUL.md .gitignore 2>/dev/null || true

# Skip if nothing changed
if git diff --cached --quiet; then
    echo "[$DATE] 没有变化,跳过提交" >> "$LOG_FILE"
    exit 0
fi

git commit -m "sync: auto backup at $DATE" >> "$LOG_FILE" 2>&1

if git push origin main >> "$LOG_FILE" 2>&1; then
    echo "[$DATE] 推送成功" >> "$LOG_FILE"
else
    echo "[$DATE] 推送失败(网络问题?),下次再试" >> "$LOG_FILE"
    exit 0
fi

# Keep log file small
tail -500 "$LOG_FILE" > "$LOG_FILE.tmp" && mv "$LOG_FILE.tmp" "$LOG_FILE"
bash
chmod +x ~/.hermes/hermes-sync.sh

Step 7: Create launchd Plist

Write to ~/Library/LaunchAgents/com.USERNAME.hermes-sync.plist:

xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.USERNAME.hermes-sync</string>

    <key>ProgramArguments</key>
    <array>
        <string>/bin/bash</string>
        <string>/Users/USERNAME/.hermes/hermes-sync.sh</string>
    </array>

    <!-- Every 30 minutes -->
    <key>StartInterval</key>
    <integer>1800</integer>

    <!-- Run once immediately on load -->
    <key>RunAtLoad</key>
    <true/>

    <!-- PATH is required or git won't be found -->
    <key>EnvironmentVariables</key>
    <dict>
        <key>PATH</key>
        <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin</string>
        <key>HOME</key>
        <string>/Users/USERNAME</string>
    </dict>

    <key>StandardOutPath</key>
    <string>/Users/USERNAME/.hermes/logs/hermes-sync-launchd.log</string>
    <key>StandardErrorPath</key>
    <string>/Users/USERNAME/.hermes/logs/hermes-sync-launchd.log</string>

    <key>ThrottleInterval</key>
    <integer>60</integer>
</dict>
</plist>

Step 8: Load & Verify

bash
launchctl load ~/Library/LaunchAgents/com.USERNAME.hermes-sync.plist

# Check it's running (should show com.USERNAME.hermes-sync)
launchctl list | grep hermes

# Wait a few seconds, check the log
sleep 5 && cat ~/.hermes/logs/hermes-sync.log

Expected output: [2026-04-10 17:21:05] 没有变化,跳过提交 (or a push success message)


Management Commands

bash
# View sync log
cat ~/.hermes/logs/hermes-sync.log

# Manually trigger sync now
~/.hermes/hermes-sync.sh

# Stop the service
launchctl unload ~/Library/LaunchAgents/com.USERNAME.hermes-sync.plist

# Reload after editing plist
launchctl unload ~/Library/LaunchAgents/com.USERNAME.hermes-sync.plist
launchctl load ~/Library/LaunchAgents/com.USERNAME.hermes-sync.plist

# Check what's tracked in git
cd ~/.hermes && git status --short

Notes

  • The launchd service survives reboots automatically (it's in LaunchAgents/, not LaunchDaemons/)
  • If git push fails (no network), the script exits cleanly and retries next cycle
  • Token is embedded in the remote URL — if token rotates, update with:
    bash
    cd ~/.hermes && git remote set-url origin "https://USERNAME:NEW_TOKEN@github.com/USERNAME/hermes-memory.git"
  • To sync a second Mac: git clone https://USERNAME:TOKEN@github.com/USERNAME/hermes-memory.git ~/.hermes then set up the same launchd service

Frequently asked questions

What does the Hermes Memory Github Sync AI skill do?

Set up automatic GitHub sync for Hermes Agent memory, skills, and config using git + macOS launchd. Runs every 30 minutes in the background. Covers repo init, .gitignore pitfalls, token extraction, and launchd plist setup.

Why use Hermes Memory Github Sync on TypingMind?

Because you install it once and use it with any model. Hermes Memory Github Sync is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Hermes Memory Github Sync in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/itgoyo/hermes-skills/tree/main/devops/hermes-memory-github-sync. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Hermes Memory Github Sync?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Hermes Memory Github Sync?

As many as you like. As long as a model supports skills, you can use Hermes Memory Github Sync with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Hermes Memory Github Sync AI skill free?

It is published on GitHub by itgoyo. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇