openclaw-git-backup
Create, update, validate, or troubleshoot automated git backup workflows for OpenClaw repositories. Use when a user wants a scheduled commit-and-push backup job, wants commit messages to summarize added or modified or deleted files, needs git credential setup for HTTPS pushes, or needs to debug why an OpenClaw cron backup is not running or not pushing.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/blacktor-tor/openclaw-git-backupWhat This Skill Does
The openclaw-git-backup skill provides a robust, automated infrastructure for ensuring your OpenClaw repository remains protected against data loss. By orchestrating a nightly commit-and-push workflow, this skill bridges the gap between active file development and durable remote storage. It performs intelligent staging, calculates changes by diffing added, modified, and deleted files, and crafts descriptive, automated commit messages. The skill is designed to handle common repository scenarios, including excluding noisy temporary files or scheduler logs that could clutter your history. It ensures that even when no changes are detected, the system attempts a push to flush any previously stuck commits, maintaining a reliable sync state between your local instance and your remote repository.
Installation
Installation is straightforward. First, install the skill into your OpenClaw environment using the specified command. Next, identify the repository root directory and your preferred runtime execution path. Copy the bundled script (scripts/nightly_git_backup.sh) to your target destination with proper execute permissions using install -D -m 755. Validate the script syntax with bash -n <runtime-script>. Finally, integrate the script into your system crontab, ensuring that the script environment (such as BACKUP_REMOTE or BACKUP_EXCLUDES) is configured according to your repository structure. We recommend a force-run once post-installation to ensure authentication and path permissions are correctly set.
Use Cases
- Automated Disaster Recovery: Setting up nightly backups for critical OpenClaw configuration and data files.
- Repository Cleanup: Automatically excluding
.cachefolders or temporary cron logs from commit history. - Credential Management: Configuring secure HTTPS push authentication without exposing sensitive tokens in plain text.
- Troubleshooting: Resolving issues where automated push workflows fail silently due to branch mismatches or git configuration errors.
Example Prompts
- "Set up a nightly backup for the repository at /home/user/openclaw-data, excluding the logs/ directory and using the remote 'origin'."
- "My automated git backups are failing; can you check if the current branch is set up correctly and verify my push credentials?"
- "Help me configure the git backup script to summarize my changes in the commit body and push to my repository using an HTTPS token."
Tips & Limitations
Always verify that your remote URL is properly configured for your preferred authentication method (SSH vs. HTTPS). When using HTTPS, avoid hardcoding tokens directly into the script; use the recommended git credential storage instead. If you find the backup script running too frequently, ensure your cron job interval is set to a non-peak hour. The exclusion pattern system is powerful but requires correct pathspec syntax; if your excludes are not working, check the paths against your repository root.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-blacktor-tor-openclaw-git-backup": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution