Version control for OpenClaw configuration files — commit with diff, compare history, rollback to any previous version.
Every config change without a git record is a potential data loss event. This skill turns OpenClaw config management from "hope nothing breaks" into "I can always go back."
What it tracks:
~/.openclaw/openclaw.json — main configuration~/.openclaw/credentials/*.json — credentials profiles~/.openclaw/agents/ — agent definitions~/.openclaw/flows/ — flow definitions~/.openclaw/skills/ — custom skill configurationsWhat it does NOT track: memory/, logs/, media/, tmp/, trash/,
canvas/, npm/, completions/, service-env/, tasks/, .DS_Store.
On first use, the skill initializes a git repo in ~/.openclaw/ if one does not
exist, configured with a proper .gitignore that excludes runtime data.
/openclaw-git-manager commit#Stage and commit the current config state with a human-readable message.
Use it when:
doctor or config run that changed stateExecution steps:
config:Do not:
/openclaw-git-manager log#Show the commit history with one-line summaries and diff overviews.
Use it when:
Execution steps:
git log --oneline -20 to show recent commitsgit show <hash> --stat (files) + git show <hash> (patch)Do not:
/openclaw-git-manager diff#Show exactly what changed between commits or between the working tree and HEAD.
Use it when:
Execution steps:
--from <commit> --to <commit>: show diff between two commitsDo not:
/openclaw-git-manager restore#Roll back to a previous commit or restore specific files.
Use it when:
log and wants to restore itExecution steps:
log): restore full tree to that commitconfig: restore to <hash> (<description>)Restore modes:
git checkout <commit> -- . (all tracked files)git checkout <commit> -- path/to/filegit reset --hard <commit> — only if user explicitly says "hard reset"Do not:
/openclaw-git-manager status#Show the current state of the working tree.
Use it when:
Execution steps:
git status --short for a concise viewDo not:
diff for that)The entry point is always scripts/git_manager.py, invoked from ~/.openclaw/.
bash
# From ~/.openclaw/ directory
python3 ~/.openclaw/workspace/skills/openclaw-git-manager/scripts/git_manager.py <command> [args]
# Commands: commit, log, diff, restore, status
The script resolves its location relative to the installed skill directory, not the active working directory.
FilePathNotesMain config~/.openclaw/openclaw.jsonPrimary tracked fileCredentials~/.openclaw/credentials/*.jsonContains real keys — never expose rawAgents~/.openclaw/agents/Agent definitionsFlows~/.openclaw/flows/Flow definitionsCustom skills~/.openclaw/workspace/skills/Custom skill configs
The following are excluded from tracking:
text
# Runtime data (excluded)
memory/
logs/
media/
tmp/
trash/
canvas/
npm/
completions/
service-env/
tasks/
.DS_Store
# Node.js / npm
node_modules/
package-lock.json
# Editor
*.swp
*.swo
.vscode/
.idea/
# OpenClaw internals (not user config)
cron/
devices/
exec-approvals.json
update-check.json
skills-trigger-index.json
subagents/
delivery-queue/
git push — this is a local-only record, not a shared repo.git/ directory directly — always go through git commandsmemory/ or logs/ — these are runtime data, not configurationA good commit message should let a future reader answer:
Example commit messages:
config: enable minimax TTS in production profileconfig: add claude-sonnet model to local provider listconfig: rollback agent definitions to pre-migration stateconfig: updateconfig changesstuffGoodBadconfig: enable minimax TTS in production profile``config update``config: add claude-sonnet to model list``model change``config: restore openclaw.json to pre-wizard state``restore``config: migrate agent definitions to new format``migration``config: disable noisy plugin auto-update``changed settings
text
commit a1b2c3d 2 hours ago config: enable minimax TTS
commit b2c3d4e yesterday config: add claude-sonnet to providers
commit c3d4e5f 3 days ago config: initial checkpoint
Every restore use must end with:
Files restored — list of files changedNew HEAD — the commit hash the tree now points toPrevious state — what was the previous commit (for undo purposes)Next action — what the user should do next (e.g., "restart gateway")This skill solves one specific problem: config changes without visibility or reversibility.
It does NOT replace backup solutions, cloud sync, or team collaboration workflows.