Github Memory Sync
Skill by davinwang
Why use this skill?
Easily back up and version control your OpenClaw agent's memory files by syncing them directly to a private GitHub repository for secure and consistent access.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/davinwang/github-memory-syncWhat This Skill Does
The GitHub Memory Sync skill is a powerful utility designed for OpenClaw agents to ensure long-term persistence and version control of their operational memory. By bridging your local agent environment with GitHub, this skill effectively turns your workspace into a synchronized repository. It specifically targets the primary MEMORY.md root file and the memory/ subdirectory, allowing the agent to maintain a coherent history of its tasks, learnings, and insights across different sessions or even different machines.
Installation
To integrate this skill into your environment, use the OpenClaw package manager. Open your terminal and run:
clawhub install openclaw/skills/skills/davinwang/github-memory-sync
Once installed, you must configure the environment by defining your GITHUBTOKEN and GITHUB_REPO via either environment variables or the ~/.openclaw/openclaw.json configuration file. We strongly recommend using the JSON configuration method for production setups to ensure persistence across reboots.
Use Cases
- Multi-Device Synchronization: Keep your AI agent's memory consistent whether you are working on your desktop or your laptop.
- Disaster Recovery: Protect your agent's knowledge base against hardware failure or accidental file corruption by maintaining an off-site remote backup.
- Version Control: Track how your agent's understanding or instructions evolve over time through GitHub's commit history, allowing you to audit or revert changes to memory files if necessary.
- Collaboration: Share memory states between different instances of OpenClaw.
Example Prompts
- "Initialize the GitHub memory sync for this workspace and link it to my private repository."
- "Sync my current memory files to GitHub so I don't lose the progress I made today."
- "Check the status of my memory repository to see if there are any remote updates I need to pull."
Tips & Limitations
- Security First: Always use a Private GitHub repository. Since your memory files contain personal interactions and task data, exposing them publicly is a significant security risk. Always use fine-grained Personal Access Tokens with the minimum necessary 'repo' scope.
- Conflict Management: While the tool supports pushing and pulling, always run a status check or a pull command before pushing to avoid merge conflicts in your markdown files.
- Token Rotation: Treat your GitHub Token as a sensitive password. If you suspect it has been exposed, revoke it immediately via GitHub settings and generate a new one.
- Performance: For extremely large memory files, periodic syncing is preferred over real-time automation to ensure the agent's response time remains snappy.
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-davinwang-github-memory-sync": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, external-api