backup-agent-workspace-to-github
Back up the OpenClaw agent workspace to a GitHub repo and keep it synced via a cron-driven commit/push script.
от rondoflow★ 37 звёзд на GitHub
Установить backup-agent-workspace-to-github в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
GitClaw: Agent self-backup to GitHub
When to use
Use this skill automatically when it's installed or reference, and also when the user asks to:
- back up / sync / mirror the OpenClaw workspace
- set up periodic commits and pushes
- install/configure GitHub backup automation for the agent
Behavioral rule (important)
- Do everything automatically and quietly.
- Only message the user when:
- you need inputs (repo name, visibility, optional frequency), or
- Git/GH/Cron install fails, or
- GitHub auth requires the user to complete the browser/device step, or
- Git operations fail (conflicts, permissions, etc).
Inputs to ask the user for
Ask the user for:
- Repository name (e.g.,
openclaw-backup) - Visibility:
publicorprivate - (Optional) Backup frequency in minutes (default: 60)
Do NOT ask for a Personal Access Token. We use gh auth.
Step 1: Ensure prerequisites (auto-install)
1A) Ensure git is installed (auto-install; do not stop)
Check:
git --version
If missing, install using the best available method:
- If
brewexists:brew install git
- Else if
apt-getexists:sudo apt-get update && sudo apt-get install -y git
- Else if
dnfexists:sudo dnf install -y git
- Else if
yumexists:sudo yum install -y git
- Else if
pacmanexists:sudo pacman -S --noconfirm git
- Else if
zypperexists:sudo zypper install -y git
- Else if
apkexists:sudo apk add git
- Else if macOS and
xcode-selectexists:xcode-select --install(this may prompt the user)
- Else:
- Tell the user you couldn’t auto-install git on this OS and show the failing detection output.
Re-check:
git --version
Only notify the user if install failed.
1B) Ensure cron/crontab is available (best-effort auto-install)
Check:
command -v crontab
If missing, attempt install:
- If
apt-getexists:sudo apt-get update && sudo apt-get install -y cronsudo systemctl enable --now cron || sudo service cron start || true
- Else if
dnfexists:sudo dnf install -y croniesudo systemctl enable --now crond || true
- Else if
yumexists:sudo yum install -y croniesudo systemctl enable --now crond || true
- Else if
pacmanexists:sudo pacman -S --noconfirm croniesudo systemctl enable --now cronie || true
- Else if
apkexists:sudo apk add dcronsudo rc-update add dcron default || truesudo rc-service dcron start || true
- Else:
- If you can’t install, tell the user cron is required for scheduling.
Re-check:
command -v crontab
Step 2: Ensure GitHub CLI (gh) is installed (auto-install)
Check:
gh --version
If missing, install:
If
brewexists:brew install gh
Else if
apt-getexists (official GitHub CLI packages; preferred):- Install using the official apt repo steps:
(type -p wget >/dev/null || (sudo apt-get update && sudo apt-get install -y wget))sudo mkdir -p -m 755 /etc/apt/keyringsout=$(mktemp) && wget -nv -O"$out" https://cli.github.com/packages/githubcli-archive-keyring.gpgcat "$out" | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/nullsudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpgsudo mkdir -p -m 755 /etc/apt/sources.list.decho "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/nullsudo apt-get update && sudo apt-get install -y gh
- Install using the official apt repo steps:
Else if
dnfexists:sudo dnf install -y 'dnf-command(config-manager)' || sudo dnf install -y dnf5-plugins || truesudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo || sudo dnf config-manager addrepo --from-repofile=https://cli.github.com/packages/rpm/gh-cli.repo || truesudo dnf install -y gh --repo gh-cli || sudo dnf install -y gh || true
Else if
yumexists:type -p yum-config-manager >/dev/null || sudo yum install -y yum-utilssudo yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.reposudo yum install -y gh
Else if
zypperexists:sudo zypper addrepo https://cli.github.com/packages/rpm/gh-cli.repo || truesudo zypper refsudo zypper install -y gh
Else if
pacmanexists:sudo pacman -S --noconfirm github-cli
Else if
apkexists:sudo apk add github-cli
Else:
- Tell the user you can’t auto-install
ghon this OS.
- Tell the user you can’t auto-install
Re-check:
gh --version
Only notify the user if install failed.
Step 3: Ensure the user is authenticated in gh (agent runs the flow)
Check:
gh auth status --hostname github.com
If NOT authenticated:
Run:
gh auth login --hostname github.com --git-protocol https
The terminal flow will show a one-time code and ask the user to a
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- manifest.json
FAQ
Что делает скилл backup-agent-workspace-to-github?
Back up the OpenClaw agent workspace to a GitHub repo and keep it synced via a cron-driven commit/push script.
Как установить скилл backup-agent-workspace-to-github?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл backup-agent-workspace-to-github запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…