Search

PythonReactSEOPDF
OpenClaw

github-memory-sync

将 OpenClaw 的完整工作空间配置(SOUL.md, IDENTITY.md, USER.md, MEMORY.md, TOOLS.md, memory/*等)同步到 GitHub 进行备份和版本控制,支持跨服务器迁移。Use when user mentions GitHub backup, sync memory, migrate server, 备份配置,同步到 GitHub, or wants to backup/restore OpenClaw workspace.

davinwang0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install davinwang/github-memory-sync

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

GitHub Memory Sync 技能

📝 将 OpenClaw 的 完整工作空间配置 同步到 GitHub 仓库进行备份和版本控制,支持跨服务器迁移。

同步范围

核心记忆文件(必须同步)
文件 路径 说明 敏感度
SOUL.md / AI 人格定义 🔒 高
IDENTITY.md / AI 身份定义(名字、emoji 等) 🔒 高
USER.md / 用户信息 🔒 高
MEMORY.md / 长期记忆 🔒 高
TOOLS.md / 工具配置(SSH、摄像头等) 🔒 高
HEARTBEAT.md / 心跳任务配置 🟡 中
memory/*.md memory/ 日常记忆文件 🔒 高
可选配置文件
文件 路径 说明 建议
AGENTS.md / 工作空间指南 ✅ 推荐
BOOTSTRAP.md / 初始化脚本(如有) ⚪ 可选
skills/ skills/ 自定义技能 ✅ 推荐
avatars/ avatars/ 头像图片 ⚪ 可选
排除文件(不同步)
  • .git/ - Git 元数据
  • node_modules/ - 依赖包
  • *.log - 日志文件
  • *.tmp, *.bak - 临时文件
  • sessions/ - 会话数据(可能很大)

功能特性

  1. 📤 完整备份 - 将所有记忆和配置文件推送到 GitHub
  2. 📥 一键恢复 - 从 GitHub 拉取配置到新服务器
  3. 📊 查看状态 - 检查本地和远程的差异
  4. 📋 列出文件 - 显示所有同步的文件
  5. 🔧 初始化仓库 - 首次设置 GitHub 仓库连接
  6. 🔄 增量同步 - 只同步变化的文件
  7. 📦 迁移模式 - 支持完整工作空间迁移到新服务器

配置要求

必需配置

GitHub Token:

  • 需要一个 Personal Access Token
  • 权限要求:repo(仓库读写权限)
  • 生成地址:https://github.com/settings/tokens/new

GitHub 仓库:

  • 格式:username/repository-name
  • 示例:myusername/openclaw-memory-backup
  • 建议设为 Private(私有仓库),因为 memory 可能包含敏感信息
配置方式
方案 A:使用环境变量(推荐用于测试)
export GITHUBTOKEN="ghp_xxxxxxxxxxxxxxxxx"
export GITHUB_REPO="yourusername/your-repo"
方案 B:配置文件(推荐用于生产)

在 ~/.openclaw/openclaw.json 中添加:

{
  "skills": {
    "entries": {
      "github-m...

Source information

Source
github
Repository
openclaw/skills
Path
skills/davinwang/github-memory-sync
Version
—
Commit
614e7566dda2cb0c347ad696e6061aa401095392
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

README

📦 GitHub Memory Sync

将 OpenClaw 完整工作空间配置同步到 GitHub 进行备份和版本控制。

✅ 功能特性

  • ✅ 完整备份 - 同步所有配置文件(SOUL.md, IDENTITY.md, USER.md, MEMORY.md, TOOLS.md 等)
  • ✅ 记忆文件 - 同步 memory/*.md 日常记忆
  • ✅ 技能备份 - 同步 skills/ 自定义技能
  • ✅ 一键恢复 - 从 GitHub 拉取配置到新服务器
  • ✅ 状态检查 - 查看本地和远程的差异
  • ✅ 定时备份 - 支持 cron 自动备份
  • ✅ 增量同步 - 只同步变化的文件

🚀 快速开始

1. 配置环境变量
export GITHUBTOKEN="github_pat_xxx"
export GITHUB_REPO="username/openclaw-memory"
export WORKSPACE_DIR="/root/.openclaw/workspace"
2. 同步到 GitHub
cd /root/.openclaw/workspace/skills/github-memory-sync
bash sync.sh push
3. 从 GitHub 恢复
bash sync.sh pull

📋 同步文件列表

核心文件
  • ✅ SOUL.md - AI 人格定义
  • ✅ IDENTITY.md - AI 身份定义
  • ✅ USER.md - 用户信息
  • ✅ MEMORY.md - 长期记忆
  • ✅ TOOLS.md - 工具配置
  • ✅ HEARTBEAT.md - 心跳任务
  • ✅ AGENTS.md - 工作指南
  • ✅ memory/*.md - 日常记忆文件
可选文件
  • ✅ skills/ - 自定义技能
  • ✅ avatars/ - 头像图片
  • ✅ BOOTSTRAP.md - 初始化脚本

⏰ 定时备份

添加自动备份任务
# 每天凌晨 2:30 自动备份
(crontab -l 2>/dev/null; echo "30 2 * * * /root/.openclaw/workspace/skills/github-memory-sync/cron-backup.sh") | crontab -
查看备份日志
tail -f /var/log/openclaw-memory-sync.log

📖 完整文档

🔒 安全提醒

  • ⚠️ 使用 Private 仓库
  • ⚠️ 保护 GitHub Token
  • ⚠️ 定期轮换 Token
  • ⚠️ 不要同步敏感凭证

版本: 1.1.0
作者: OpenClaw Workspace
许可: MIT
GitHub: https://github.com/davinwang/openclaw-memory

Extracted content

SKILL.md
# GitHub Memory Sync 技能

📝 将 OpenClaw 的 **完整工作空间配置** 同步到 GitHub 仓库进行备份和版本控制,支持跨服务器迁移。

## 同步范围

### 核心记忆文件(必须同步)

| 文件 | 路径 | 说明 | 敏感度 |
|------|------|------|--------|
| **SOUL.md** | `/` | AI 人格定义 | 🔒 高 |
| **IDENTITY.md** | `/` | AI 身份定义(名字、emoji 等) | 🔒 高 |
| **USER.md** | `/` | 用户信息 | 🔒 高 |
| **MEMORY.md** | `/` | 长期记忆 | 🔒 高 |
| **TOOLS.md** | `/` | 工具配置(SSH、摄像头等) | 🔒 高 |
| **HEARTBEAT.md** | `/` | 心跳任务配置 | 🟡 中 |
| **memory/*.md** | `memory/` | 日常记忆文件 | 🔒 高 |

### 可选配置文件

| 文件 | 路径 | 说明 | 建议 |
|------|------|------|------|
| **AGENTS.md** | `/` | 工作空间指南 | ✅ 推荐 |
| **BOOTSTRAP.md** | `/` | 初始化脚本(如有) | ⚪ 可选 |
| **skills/** | `skills/` | 自定义技能 | ✅ 推荐 |
| **avatars/** | `avatars/` | 头像图片 | ⚪ 可选 |

### 排除文件(不同步)

- `.git/` - Git 元数据
- `node_modules/` - 依赖包
- `*.log` - 日志文件
- `*.tmp`, `*.bak` - 临时文件
- `sessions/` - 会话数据(可能很大)

## 功能特性

1. **📤 完整备份** - 将所有记忆和配置文件推送到 GitHub
2. **📥 一键恢复** - 从 GitHub 拉取配置到新服务器
3. **📊 查看状态** - 检查本地和远程的差异
4. **📋 列出文件** - 显示所有同步的文件
5. **🔧 初始化仓库** - 首次设置 GitHub 仓库连接
6. **🔄 增量同步** - 只同步变化的文件
7. **📦 迁移模式** - 支持完整工作空间迁移到新服务器

## 配置要求

### 必需配置

**GitHub Token:**
- 需要一个 Personal Access Token
- 权限要求:`repo`(仓库读写权限)
- 生成地址:https://github.com/settings/tokens/new

**GitHub 仓库:**
- 格式:`username/repository-name`
- 示例:`myusername/openclaw-memory-backup`
- 建议设为 **Private**(私有仓库),因为 memory 可能包含敏感信息

### 配置方式

#### 方案 A:使用环境变量(推荐用于测试)

```bash
export GITHUBTOKEN="ghp_xxxxxxxxxxxxxxxxx"
export GITHUB_REPO="yourusername/your-repo"
```

#### 方案 B:配置文件(推荐用于生产)

在 `~/.openclaw/openclaw.json` 中添加:

```json
{
  "skills": {
    "entries": {
      "github-m...
README
# 📦 GitHub Memory Sync

将 OpenClaw 完整工作空间配置同步到 GitHub 进行备份和版本控制。

## ✅ 功能特性

- ✅ **完整备份** - 同步所有配置文件(SOUL.md, IDENTITY.md, USER.md, MEMORY.md, TOOLS.md 等)
- ✅ **记忆文件** - 同步 memory/*.md 日常记忆
- ✅ **技能备份** - 同步 skills/ 自定义技能
- ✅ **一键恢复** - 从 GitHub 拉取配置到新服务器
- ✅ **状态检查** - 查看本地和远程的差异
- ✅ **定时备份** - 支持 cron 自动备份
- ✅ **增量同步** - 只同步变化的文件

## 🚀 快速开始

### 1. 配置环境变量

```bash
export GITHUBTOKEN="github_pat_xxx"
export GITHUB_REPO="username/openclaw-memory"
export WORKSPACE_DIR="/root/.openclaw/workspace"
```

### 2. 同步到 GitHub

```bash
cd /root/.openclaw/workspace/skills/github-memory-sync
bash sync.sh push
```

### 3. 从 GitHub 恢复

```bash
bash sync.sh pull
```

## 📋 同步文件列表

### 核心文件
- ✅ SOUL.md - AI 人格定义
- ✅ IDENTITY.md - AI 身份定义
- ✅ USER.md - 用户信息
- ✅ MEMORY.md - 长期记忆
- ✅ TOOLS.md - 工具配置
- ✅ HEARTBEAT.md - 心跳任务
- ✅ AGENTS.md - 工作指南
- ✅ memory/*.md - 日常记忆文件

### 可选文件
- ✅ skills/ - 自定义技能
- ✅ avatars/ - 头像图片
- ✅ BOOTSTRAP.md - 初始化脚本

## ⏰ 定时备份

### 添加自动备份任务

```bash
# 每天凌晨 2:30 自动备份
(crontab -l 2>/dev/null; echo "30 2 * * * /root/.openclaw/workspace/skills/github-memory-sync/cron-backup.sh") | crontab -
```

### 查看备份日志

```bash
tail -f /var/log/openclaw-memory-sync.log
```

## 📖 完整文档

- [SKILL.md](./SKILL.md) - 技能详细说明
- [CRON.md](./CRON.md) - 定时任务配置指南

## 🔒 安全提醒

- ⚠️ 使用 Private 仓库
- ⚠️ 保护 GitHub Token
- ⚠️ 定期轮换 Token
- ⚠️ 不要同步敏感凭证

---

**版本**: 1.1.0  
**作者**: OpenClaw Workspace  
**许可**: MIT  
**GitHub**: https://github.com/davinwang/openclaw-memory

Related skills

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

parakeet-stt

carlulsoe

Local speech-to-text with NVIDIA Parakeet TDT 0.6B v3 (ONNX on CPU). 30x faster than Whisper, 25 languages, auto-detection, OpenAI-compatible API. Use when transcribing audio files, converting speech to text, o...

OpenClaw

feishu-process-feedback

carlzhao007

飞书消息自动处理与进度反馈技能。安装后后台运行,监听飞书任务消息并自动创建独立进程处理。 在处理前后发送实时进度反馈(任务确认、进度百分比、完成通知)。 支持任务类型识别、智能解析、错误重试、并发控制、状态持久化...