gitclaw-backup
Skill55 starsChanged 9 months agoMITView on GitHub
GitHub backup for OpenClaw workspace. Use when user says "同步", "备份", "backup", "sync", "push to github", or asks about backup status/history/failures. Manages git-based full backup of ~/.openclaw to GitHub.
In this repository5 other files it gives its agents.
- content-extractSkill
- dependency-trackerSkill
- github-explorerSkill
- mineru-extractSkill
- search-layerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Run the backup script directly:
- Distinctive: line 35
After a successful sync, always include a clickable link to the latest commit in your reply:
- Distinctive: line 46
If no changes were detected, report "无变更,跳过" (no link needed).
- Distinctive: line 47
If the push failed, report the error and suggest troubleshooting steps.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitClaw Backup
Full backup of /home/node/.openclaw/ to GitHub via git.
Quick Reference
- Repo:
https://github.com/blessonism/openclaw-backup.git - Branch:
main - Script:
/home/node/.openclaw/gitclaw/auto_backup.sh - Cron:
daily-workspace-backup— 每天 UTC 16:00 (北京时间 0:00) - Exclude rules:
/home/node/.openclaw/.gitignore
Manual Sync
Run the backup script directly:
bash /home/node/.openclaw/gitclaw/auto_backup.shScript behavior:
- Lock-based (prevents concurrent runs)
- Stages all changes (
git add -A), respects.gitignore - Skips commit if no changes
- Pushes to
origin main - Logs to
/home/node/.openclaw/gitclaw/backup.log
Post-Sync Response
After a successful sync, always include a clickable link to the latest commit in your reply:
# Get the latest commit short hash
cd /home/node/.openclaw && git log --oneline -1Then format the response like:
✅ 同步完成 — 查看 commit
- If no changes were detected, report "无变更,跳过" (no link needed).
- If the push failed, report the error and suggest troubleshooting steps.
Check Status
# Last backup log
tail -5 /home/node/.openclaw/gitclaw/backup.log
# Git status (uncommitted changes)
cd /home/node/.openclaw && git status --short
# Recent commits
cd /home/node/.openclaw && git log --oneline -5Exclude Files from Backup
Edit /home/node/.openclaw/.gitignore — standard gitignore syntax.
Current notable exclusions: workspace/images/, workspace/node_modules/, workspace/.micromamba/, workspace/bin/, large binary files.
Troubleshooting
- "already running" in log → stale lock at
/home/node/.openclaw/gitclaw/lock/, remove it:rmdir /home/node/.openclaw/gitclaw/lock - Push rejected → likely force-push or diverged history on remote; check with
git log --oneline -5 origin/main - Auth failure → credentials in
~/.git-credentials; verify withgit credential fill <<< "host=github.com"
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

