← Back to Skills Marketplace
krishbhimani

OpenClaw Backup & Restore — Encrypted OpenClaw Snapshots

by KrishBhimani · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ✓ Security Clean
205
Downloads
1
Stars
0
Active Installs
7
Versions
Install in OpenClaw
/install snapshot
Description
Backup and restore the .openclaw agent folder — encrypted snapshots pushed to a private GitHub repo. Use this skill whenever the user mentions backup, restor...
Usage Guidance
This skill appears to do exactly what it claims: create GPG-encrypted backups of ~/.openclaw and push them to a private GitHub repository. Before installing or running it, consider the following: - Credentials: You must provide BACKUP_PASSWORD and a GITHUB_PAT. The PAT should be created with the minimum necessary scope (prefer a PAT limited to the specific repo if possible), stored securely, and rotated if compromised. The scripts use a temporary askpass helper to avoid exposing the PAT in process listings, but the PAT still grants repository access while used. - Protect your passphrase: BACKUP_PASSWORD decrypts all backups. Keep it secret and backed up separately; if lost, backups are unrecoverable. - Confirm what will be backed up: The code excludes .env files but will archive all other files under ~/.openclaw. Verify that no additional sensitive secrets or keys (beyond .env) live in that folder before backing up to GitHub, even in encrypted form. - Repository ownership & privacy: Backups are pushed to a GitHub repo you control. Ensure the repo is private and the account/organization usage matches your security policy. If you prefer not to use a PAT, consider adjusting the workflow to use a deploy key or machine account (requires code changes). - Binaries expectation: The metadata did not declare required binaries, but the scripts require git, gpg (and tar). Make sure those are available on target machines. - Review & test: Inspect the included scripts and run setup in an attended session on a non-production workspace first to confirm behavior. After setup, verify that backups are present in the expected repo and that restore works before relying on the system. If you want additional checks, provide the service/account you plan to use for the GitHub repo and I can suggest minimal PAT scopes or alternatives (deploy keys, GitHub Actions, etc.).
Capability Analysis
Type: OpenClaw Skill Name: snapshot Version: 1.2.0 The 'snapshot' skill is a legitimate utility for backing up and restoring the OpenClaw agent folder to a private GitHub repository. It implements several security best practices, such as GPG encryption (AES256), excluding sensitive .env files from backups (backup.py), and using GIT_ASKPASS with temporary scripts to prevent leaking the GitHub Personal Access Token in process listings (config.py). The scripts perform actions strictly aligned with the stated purpose, and the instructions in SKILL.md do not contain malicious prompt injections.
Capability Assessment
Purpose & Capability
Name/description (encrypted snapshots to a private GitHub repo) matches the code and runtime instructions. Declared environment variables (BACKUP_PASSWORD, GITHUB_PAT, GITHUB_USERNAME, REPO_NAME) are appropriate for this purpose. Minor inconsistency: registry metadata lists no required binaries, but scripts expect gpg, git, tar (and the SKILL.md instructs installing gpg); the skill should have declared these binaries.
Instruction Scope
SKILL.md and scripts limit actions to creating a tar of ~/.openclaw, GPG-encrypting it with the provided passphrase, chunking if needed, and pushing to a transport repo; restore reassembles, verifies, decrypts, and extracts. The instructions explicitly exclude .env files from backups and describe setup/use flows. No instructions read unrelated system paths or exfiltrate data to unexpected endpoints beyond the specified GitHub repo.
Install Mechanism
Instruction-only install (no external downloads). Code files are bundled with the skill and run locally via python3. No remote installers or opaque third-party downloads are used, which keeps installation risk low.
Credentials
Requested env vars are reasonable for the stated function. GITHUB_PAT with 'repo' scope is powerful (it can read/write the target repo and potentially more depending on token scopes) — this is necessary to push backups but should be scoped and protected. The skill uses a temporary GIT_ASKPASS script to avoid leaking the PAT in process lists; .env files are excluded from backups, which reduces risk of credential backup. Users should confirm no other sensitive secrets are stored inside ~/.openclaw (other than .env which is excluded).
Persistence & Privilege
always:false and the skill does not request system-wide configuration changes or modify other skills. It runs only when invoked and its setup is idempotent. Autonomous invocation (disable-model-invocation:false) is standard and not a sole concern here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install snapshot
  3. After installation, invoke the skill by name or use /snapshot
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.0
Version 1.2.0 Security hardening and runtime compatibility fixes. - Exclude all .env files from backups (.env, .env.*, at any depth) — secrets never end up in archives - Removed requires.bins (gpg, gpg-agent, git) from frontmatter — these are installed by setup.py at runtime, declaring them as required prevented the skill from loading on fresh workspaces where they aren't yet installed - Flexible credential resolution: os.environ first, skill .env fallback - Strip trailing commas from env values (OpenClaw injection edge case) - openclaw.json only needs { "snapshot": { "enabled": true } }
v1.1.4
Exclude all .env files from backups — no secrets in archives. - Added .env and .env.* to backup exclusion list, catching all env files at any depth - Covers ~/.openclaw/.env, skill .env files, .env.local, .env.production, etc. - Removed redundant skill-specific .env exclusion logic (now covered by blanket rule) - Flexible credential resolution from v1.4.0: os.environ first, skill .env fallback - Strip trailing commas from env values (OpenClaw injection edge case) - openclaw.json only needs { "snapshot": { "enabled": true } }
v1.1.3
Flexible credential resolution and env parsing fix. - Config now checks os.environ first (populated by OpenClaw from ~/.openclaw/.env), then falls back to the skill's local .env file - Users can provide credentials via ~/.openclaw/.env (recommended), skill .env, or shell env - Skill no longer crashes if the local .env file doesn't exist — works with OpenClaw's env injection alone - openclaw.json only needs { "snapshot": { "enabled": true } } — no env block with secrets required - Strip trailing commas from environment variable values (fixes OpenClaw env injection edge case) - SKILL.md prerequisites updated to document all three credential methods
v1.1.2
Fixed metadata format for ClawHub security scanner compatibility. - metadata.openclaw now uses correct `requires` block with `env` and `bins` fields - Added `primaryEnv: BACKUP_PASSWORD` declaration - Previous versions used wrong field names (binaries instead of bins) and missing requires wrapper, causing scanner to report undeclared env vars/binaries - Clarified .env exclusion comment in backup.py explaining safety when skill is installed outside ~/.openclaw
v1.1.1
Metadata declarations for ClawHub security scanner. - Added metadata.openclaw.env declaring BACKUP_PASSWORD, GITHUB_PAT, GITHUB_USERNAME, REPO_NAME - Added metadata.openclaw.binaries declaring gpg, gpg-agent, git - Scanner was flagging mismatch between undeclared env vars in frontmatter and actual script usage - No code changes — this is a metadata-only update on top of v1.1.0 security fixes
v1.1.0
Security & reliability fixes based on community review. Security: - PAT no longer embedded in git remote URL or .git/config - Auth now uses GIT_ASKPASS with temporary scripts (cleaned up after each operation) - Token never appears in process listings or on disk Reliability: - GPG and gpg-agent preflight checks before backup/restore - Transport repo existence check before backup (clear error instead of crash) - Failed backups now clean up orphaned version folders and reset git staging - tar/gpg stderr captured and displayed on failure instead of being swallowed - SKILL.md workflows updated to always run setup.py first (idempotent sync) Compatibility: - Renamed .env.example to env-example.txt for ClawHub compatibility
v1.0.0
Initial release — encrypted backup and restore for .openclaw agent folder. - GPG AES-256 encryption - Automatic chunking for files over 95MB (GitHub file limit) - SHA-256 integrity verification on restore - Auto-cleanup of old versions (keeps last 10) - CLI args for non-interactive AI agent usage (--latest, --version, --list) - Backwards compatible with legacy single-file backups
Metadata
Slug snapshot
Version 1.2.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 7
Frequently Asked Questions

What is OpenClaw Backup & Restore — Encrypted OpenClaw Snapshots?

Backup and restore the .openclaw agent folder — encrypted snapshots pushed to a private GitHub repo. Use this skill whenever the user mentions backup, restor... It is an AI Agent Skill for Claude Code / OpenClaw, with 205 downloads so far.

How do I install OpenClaw Backup & Restore — Encrypted OpenClaw Snapshots?

Run "/install snapshot" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is OpenClaw Backup & Restore — Encrypted OpenClaw Snapshots free?

Yes, OpenClaw Backup & Restore — Encrypted OpenClaw Snapshots is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does OpenClaw Backup & Restore — Encrypted OpenClaw Snapshots support?

OpenClaw Backup & Restore — Encrypted OpenClaw Snapshots is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created OpenClaw Backup & Restore — Encrypted OpenClaw Snapshots?

It is built and maintained by KrishBhimani (@krishbhimani); the current version is v1.2.0.

💬 Comments