gitclaw-backup

gitclaw-backup is a skill for Claude Code, Codex from blessonism/openclaw-skills. It costs 62 tokens per session (647 once invoked), scanned C, original, MIT.

A Git-based backup process for an OpenClaw workspace, storing selected workspace files in a GitHub repository.

In plain words
What is it for?
Use it to manually or automatically back up the workspace, check backup status and logs, and push changes to GitHub.
Why use it?
It keeps a recoverable history of workspace changes and reports whether syncing succeeded, failed, or found nothing new.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/node/.openclaw/.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gitclaw-backup

README.md
[![agentmods](https://agentmods.dev/badge/skills/blessonism/openclaw-skills/gitclaw-backup.svg)](https://agentmods.dev/skills/blessonism/openclaw-skills/gitclaw-backup)
Your own site
<a href="https://agentmods.dev/skills/blessonism/openclaw-skills/gitclaw-backup"><img src="https://agentmods.dev/badge/skills/blessonism/openclaw-skills/gitclaw-backup.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 647 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.00647
Opus 5 $0.00031 $0.00324
Sonnet 5 $0.00012 $0.00129
Haiku 4.5 $0.00006 $0.00065

Measured 6d ago against content hash 6e07d6933132, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

gitclaw-backup scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

- **Auth failure** → credentials in `~/.git-credentials`; verify with `git credential fill <<< "host=github.com"`
gitclaw-backup/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.sh

Script 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 -1

Then 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 -5

Exclude 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 with git credential fill <<< "host=github.com"

Read the full file on GitHub · 73 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 73 lines · 62 tokens per session scan C 6e07d6933132

Subscribe to this mod's changes

gitclaw-backup is a skill published in the GitHub repository blessonism/openclaw-skills (55 stars, last pushed 5mo ago), licensed MIT. It adds 62 tokens to every session and 647 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.