简介
Openclaw Github Sync
原始描述
Keep an OpenClaw agent's non-sensitive context (selected memory, MD files, notes, and custom skills) under version control in a separate Git repository for r...
通过你的 Agent 添加
安装目录:openclaw-github-sync/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: openclaw-github-sync
description: Keep an OpenClaw agent's non-sensitive context (selected memory, MD files, notes, and custom skills) under version control in a separate Git repository for remote review/tweaks. Use when setting up or operating a Git-based workflow to export workspace context, commit changes (possibly split into multiple commits), and push on a schedule (e.g., nightly) without leaking secrets.
OpenClaw Git Sync
Maintain a separate Git repo that contains a curated, non-sensitive subset of the OpenClaw workspace (memories/skills/config notes) so a human can review and tweak remotely.
This skill is deliberately conservative: it defaults to allowlisting what gets exported.
Key rules
- Never sync secrets by default. Only sync what the export manifest allowlists.
- Prefer sanitized memory under
memory/public/ (opt-in) over raw memory/*.md.
- Keep the sync repo separate from the main workspace repo.
Files and layout
- Working workspace:
$HOME/.openclaw/workspace
- Sync repo (export destination): choose a directory, e.g.
$HOME/.openclaw/workspace/openclaw-sync-repo
- Export manifest (allowlist):
references/export-manifest.txt
Setup
- Copy the example env file:
cp references/.env.example references/.env
- Edit
references/.env for your environment.
- At minimum, set
SYNC_REMOTE to your private repo SSH URL.
SYNC_REMOTE="git@github.com:YOUR_ORG/YOUR_REPO.git"
Workflow
1) Create / connect the private sync repo (GitHub)
memory/public/ (opt-in) over raw memory/*.md.- Working workspace:
$HOME/.openclaw/workspace - Sync repo (export destination): choose a directory, e.g.
$HOME/.openclaw/workspace/openclaw-sync-repo - Export manifest (allowlist):
references/export-manifest.txt
Setup
- Copy the example env file:
cp references/.env.example references/.env
- Edit
references/.env for your environment.
- At minimum, set
SYNC_REMOTE to your private repo SSH URL.
SYNC_REMOTE="git@github.com:YOUR_ORG/YOUR_REPO.git"
Workflow
1) Create / connect the private sync repo (GitHub)
cp references/.env.example references/.envreferences/.env for your environment.SYNC_REMOTE to your private repo SSH URL.SYNC_REMOTE="git@github.com:YOUR_ORG/YOUR_REPO.git"
1) Create / connect the private sync repo (GitHub)
Use scripts/create_private_repo.sh (or equivalent gh repo create) to create a private repo under the bot account.
2) Run a one-shot sync
Run scripts/sync.sh with:
SYNC_REMOTE(SSH remote, e.g.git@github.com:YOUR_ORG/YOUR_REPO.git)SYNC_REPO_DIR(local path to sync repo)
The script will:
- Pull latest from remote (if exists)
- Export allowlisted files into the sync repo
- Create separate commits by group when multiple groups changed
- Push to the remote
3) Nightly automation
Schedule a nightly OpenClaw cron agentTurn that runs the sync script and reports success/failure.
Resources
scripts/sync.sh: export + commit (grouped) + push
scripts/create_private_repo.sh: create GitHub private repo via gh
references/export-manifest.txt: allowlist of paths to export
references/groups.json: commit grouping rules
scripts/sync.sh: export + commit (grouped) + pushscripts/create_private_repo.sh: create GitHub private repo via ghreferences/export-manifest.txt: allowlist of paths to exportreferences/groups.json: commit grouping rules正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。