Git Backup for OpenClaw for Openclaw

A reliable backup and synchronization utility to preserve OpenClaw agent workspaces using remote Git repositories.

solidexu
v1.0.0
Mar 7, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install git-backup-publish

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install git-backup-publish using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Git Backup for OpenClaw?

The Git Backup skill is a vital component for developers looking to ensure the durability and portability of their AI agents. By integrating with popular Git platforms like Gitee, GitHub, and GitLab, this skill automates the process of versioning and storing critical agent assets. Utilizing these Openclaw Skills allows you to safeguard your agent's identity, memory, and custom logic against local data loss while facilitating easy migration between different development environments.

This skill is designed with a focus on privacy and security, prioritizing private repository configurations and providing clear boundaries on what data is synchronized. It acts as a safety net for the agent's workspace, ensuring that every evolution of the agent's soul and memory is preserved in a structured, accessible format.

Git Backup for OpenClaw Use Cases

  • Initializing a remote backup repository for a newly created AI agent.
  • Manually capturing a snapshot of the workspace before performing experimental updates.
  • Implementing automated, background synchronization of memory and skills via file-watchers.
  • Migrating an existing agent's configuration and long-term memory to a new machine or environment.

How Git Backup for OpenClaw Works

  1. The skill requests a Personal Access Token (PAT) from the user's preferred Git provider to manage repository interactions.
  2. A specialized creation script uses the provider's API to initialize a private repository dedicated to the specific agent.
  3. The system identifies core workspace documents such as AGENTS.md, SOUL.md, and the memory directory for inclusion.
  4. Environment variables are configured to securely map the local workspace to the remote Git origin.
  5. Synchronization scripts execute Git commands to stage, commit, and push the workspace state to the remote server.
  6. For advanced setups, a monitoring script detects file changes to trigger incremental backups automatically.

Git Backup for OpenClaw Setup

To get started with these Openclaw Skills, ensure you have a Personal Access Token from your Git provider.

  1. Create your repository (example for Gitee):
curl -X POST "https://gitee.com/api/v5/user/repos" \
  -H "Content-Type: application/json" \
  -d '{
    "access_token": "YOUR_TOKEN",
    "name": "openclaw-agent-NAME",
    "private": true,
    "auto_init": true
  }'
  1. Set your environment variables:
export GITEE_TOKEN="your_token_here"
export GITEE_REPO="https://gitee.com/USER/repo.git"
export AGENT_NAME="your_agent_name"
  1. Run the initial backup:
./scripts/backup-to-gitee.sh "Initial backup"

Git Backup for OpenClaw Data Schema & Taxonomy

The skill organizes backups by focusing on core configuration and memory while excluding sensitive environment keys:

Data Category Files Included
Core Architecture AGENTS.md, SOUL.md, IDENTITY.md, USER.md, HEARTBEAT.md
Knowledge Base Contents of the memory/ directory
Custom Logic Contents of the skills/ directory
Excluded Data .env files, API keys, databases, temporary files

All files are organized within the Git repository to match the OpenClaw workspace structure, allowing for direct restoration via a simple git clone.

Git Backup for OpenClaw Advanced Features

  • Support for multiple Git backends including GitHub, Gitee, GitLab, and custom self-hosted Git servers.
  • Automated file change detection using the watch-and-backup.sh script for real-time data protection.
  • Seamless integration with the agent's heartbeat cycle by adding backup triggers to HEARTBEAT.md.
  • Support for custom workspace paths via the WORKSPACE_DIR variable to accommodate non-standard installations.
  • Secure token management practices to prevent accidental exposure of credentials in public repositories.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*