首页龙虾技能列表 › Multi-Device Sync via GitHub — 技能工具

Multi-Device Sync via GitHub — 技能工具

v1.0.2

[自动翻译] Multi-device OpenClaw data synchronization using GitHub. Manages workspace data sync across multiple machines (Ubuntu, Mac, etc.) with automatic push ...

1· 338·0 当前·0 累计
by @regulusz (Leon)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/11
安全扫描
VirusTotal
可疑
查看报告
OpenClaw
安全
medium confidence
The skill appears to do what it says (sync OpenClaw workspace via a private GitHub repo); it contains installer and daemon scripts that modify your home workspace and run background processes, so review before running and avoid piping unknown remote scripts directly to a shell.
评估建议
What to consider before installing: - Review code locally instead of running the curl | bash one-liner. Clone the repo (git clone https://github.com/RegulusZ/multi-device-sync-github.git) and inspect install.sh and the scripts before executing. - Back up your workspace first. The installer will create symlinks and may remove original files (it does back them up by default in many cases, but verify backups exist before proceeding). - Be deliberate about which paths you sync. Avoid syncing 'skill...
详细分析 ▾
用途与能力
Name/description match the implementation: scripts perform git clone/push/pull, create symlinks from ~/.openclaw/workspace into ~/openclaw-sync, run a push watcher and periodic pull daemon. Requested permissions/variables are minimal and consistent (no unexpected cloud credentials or unrelated services).
指令范围
Runtime instructions and installer perform high-impact local operations appropriate for a sync tool: creating/removing files and directories, creating symlinks, copying workspace data into the sync repo, starting background daemons, and running git operations (commit/push/pull/rebase). These operations are in-scope for a synchronization tool but are destructive if misconfigured (rm -rf, replacing workspace files after backup). The SKILL.md / installer suggests syncing 'skills/' and memory files — this can cause private data or other skill files to be placed under git version control; user should carefully choose which paths to sync. Also note some installer calls have a likely typo (calls like sync-init.sh.sh), which is a bug but not evidence of malice.
安装机制
No formal install spec in registry; SKILL.md offers a convenience one-liner that pipes raw.githubusercontent.com content into bash (curl | bash). raw.githubusercontent.com is a common host for installers, but piping remote scripts to shell is intrinsically risky—recommended to git clone and inspect the repository before running. The shipped bundle already includes the installer and scripts so a local install (clone + review + run) is safer.
凭证需求
The skill declares no required environment variables or credentials, which matches the code: it uses local git/SSH configuration for authentication (the user’s existing SSH keys or credential helpers). There are no hidden external endpoints; sync-notify.sh mentions Feishu but falls back to writing local notification files and printing. No disproportionate credential requests were found.
持久化与权限
The scripts create persistent artifacts in the user home (~/.config/openclaw, ~/.openclaw, ~/openclaw-sync), start background processes (daemon + push watcher) and write log/PID files. This is expected for a long-running sync service, but it does give the skill ongoing presence on the machine and will run periodically until stopped—review/stop the daemon if you uninstall. always:false and no elevated persistent privileges were requested.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.22026/3/2

- Improved scripts/sync-daemon.sh. - No user-facing documentation or feature changes. - No impact on SKILL.md content or usage instructions.

● 可疑

安装命令 点击复制

官方npx clawhub@latest install multi-device-sync-github
镜像加速npx clawhub@latest install multi-device-sync-github --registry https://cn.clawhub-mirror.com

技能文档

Synchronize OpenClaw workspace data across multiple machines using a private GitHub repository.

Features

  • Automatic push: File changes trigger immediate git commit + push (via inotifywait/fswatch)
  • Periodic pull: Configurable interval (default: 5 minutes) to pull remote changes
  • Conflict detection: Manual resolution required on conflicts
  • Multi-device support: Each device uses distinct file prefixes for memory files
  • Cross-platform: Works on Linux (inotifywait) and macOS (fswatch)
  • Selective sync: Choose which files to synchronize
  • Interactive setup: Guided installation with customization options

Architecture

Device A (Ubuntu) ◄────► GitHub Repo ◄────► Device B (Mac)
       │                      │                    │
   auto-push              central              auto-push
  periodic pull             hub               periodic pull

Prerequisites

Linux (Ubuntu/Debian)

sudo apt-get install -y git inotify-tools

macOS

brew install git fswatch

Quick Start

Interactive Installation (Recommended)

curl -fsSL https://raw.githubusercontent.com/RegulusZ/multi-device-sync-github/main/install.sh | bash

The installer will guide you through:

  • Choose: First device (upload) or Add to existing sync (download)
  • Enter your GitHub sync repo URL
  • Name your device
  • Select files to sync
  • Configure sync interval

Manual Installation

# 1. Clone skill
git clone https://github.com/RegulusZ/multi-device-sync-github.git ~/openclaw-skills/multi-device-sync-github

# 2. Clone/create sync repo git clone git@github.com:YOURNAME/openclaw_sync.git ~/openclaw-sync

# 3. Initialize cd ~/openclaw-sync ~/openclaw-skills/multi-device-sync-github/scripts/sync-init.sh \ --device-name mydevice \ --repo-url "git@github.com:YOURNAME/openclaw_sync.git"

# 4. Start daemon ~/openclaw-skills/multi-device-sync-github/scripts/sync-daemon.sh start

How It Works

Symlink Architecture

The skill creates symlinks from your workspace to the sync repo:

~/.openclaw/workspace/
├── USER.md      → ~/openclaw-sync/USER.md (symlink)
├── MEMORY.md    → ~/openclaw-sync/MEMORY.md (symlink)
├── SOUL.md      → ~/openclaw-sync/SOUL.md (symlink)
├── skills/      → ~/openclaw-sync/skills/ (symlink)
└── memory/      → ~/openclaw-sync/memory/ (symlink)

When you edit a file in workspace, you're actually editing the sync repo file.

Auto-Push Flow

File changed in workspace
    ↓ (symlink)
File changed in sync repo
    ↓ (inotifywait/fswatch)
Wait 2 seconds (debounce)
    ↓
git add -A && git commit && git push

Periodic Pull

Every N minutes (configurable), the daemon pulls remote changes.

Configuration

Edit ~/.config/openclaw/sync-config.yaml:

repo_url: "git@github.com:YOURNAME/openclaw_sync.git"
sync_interval_minutes: 5
device_name: "ubuntu"
conflict_strategy: "notify"
auto_pull_on_start: true
auto_push_enabled: true

paths: sync: - "USER.md" - "MEMORY.md" - "SOUL.md" - "skills/" - "memory/" ignore: - "logs/" - "temp/" - "*.log"

Syncable Files

FileDescriptionRecommended
USER.mdUser profile (name, timezone, background)✅ Yes
MEMORY.mdLong-term memory and important context✅ Yes
SOUL.mdAI behavior rules and guidelines✅ Yes
skills/Installed skills and capabilities✅ Yes
memory/Daily logs and session records✅ Yes
TOOLS.mdLocal tool notes and configurationsOptional
IDENTITY.mdAI identity (name, vibe, emoji)Optional (different per device)

File Naming Convention

Memory files use device prefix to avoid conflicts:

memory/
├── ubuntu-2026-03-01.md      # Ubuntu device
├── macmini-2026-03-01.md     # Mac Mini device
└── laptop-2026-03-01.md      # Laptop device

Shared files (no prefix):

  • USER.md
  • MEMORY.md
  • SOUL.md

Commands

CommandDescription
sync-initInitialize git repo and config
sync-statusCheck sync status
sync-nowImmediate pull + push
sync-pullManual pull
sync-pushManual push
sync-resolveInteractive conflict resolution
sync-daemon.sh start/stop/restart/statusManage background sync

Conflict Resolution

When conflicts detected:

  • Sync paused automatically
  • Run sync-resolve to:
- View conflicting files - Choose: keep-local / keep-remote / merge-manual / view-diff
  • Resume sync after resolution

Adding New Device

Option A: Interactive

curl -fsSL https://raw.githubusercontent.com/RegulusZ/multi-device-sync-github/main/install.sh | bash
# Select "Add to existing sync"

Option B: Manual

git clone git@github.com:YOURNAME/openclaw_sync.git ~/openclaw-sync
cd ~/openclaw-sync
~/openclaw-skills/multi-device-sync-github/scripts/sync-init.sh \
  --device-name NEWNAME \
  --repo-url "git@github.com:YOURNAME/openclaw_sync.git"
~/openclaw-skills/multi-device-sync-github/scripts/sync-daemon.sh start

Troubleshooting

See references/troubleshooting.md for common issues.

Security Note

Use a private GitHub repository to protect your personal data.

The following files may contain sensitive information:

  • MEMORY.md - May include IP addresses, service URLs
  • memory/ - Daily logs with potentially sensitive details

Files in This Skill

multi-device-sync-github/
├── SKILL.md                  # This file
├── README.md                 # GitHub README
├── LICENSE                   # MIT License
├── install.sh                # Interactive installer
├── _meta.json                # ClawHub metadata
├── scripts/
│   ├── sync-init.sh             # Initialize sync repo
│   ├── sync-daemon.sh           # Background sync (pull + push watcher)
│   ├── sync-push.sh             # Push changes to remote
│   ├── sync-pull.sh             # Pull changes from remote
│   ├── sync-status.sh           # Show sync status
│   ├── sync-now.sh              # Immediate sync
│   ├── sync-resolve.sh          # Conflict resolution
│   └── sync-notify           # Notification helper
└── references/
    └── troubleshooting.md    # Common issues

License

MIT License - See LICENSE for details.

Security & Safety

Default Settings (Safe by Default)

  • Auto-push disabled: auto_push_enabled: false by default
  • Confirmation prompts: Destructive operations require user confirmation
  • Selective git operations: Only configured files are committed

Installation Safety

Recommended (Safest):

git clone https://github.com/RegulusZ/multi-device-sync-github.git
cd multi-device-sync-github
./install.sh

Convenience (Review First):

# Download and review before executing
curl -fsSL https://raw.githubusercontent.com/RegulusZ/multi-device-sync-github/main/install.sh -o install.sh
cat install.sh  # Review the code
./install.sh

Data Protection

  • Automatic backups: Files are backed up before replacement
  • No external endpoints: Notifications are local-only
  • User control: All operations can be reviewed before execution

Permissions

The skill requires:

  • Read/write access to ~/.openclaw/workspace/
  • Git push access to your sync repository
  • No network access beyond GitHub

Enabling Auto-Push

After reviewing the behavior, enable auto-push:

# Edit config
nano ~/.config/openclaw/sync-config.yaml

# Change: auto_push_enabled: true

Security & Safety

Default Settings (Safe by Default)

  • Auto-push disabled: auto_push_enabled: false by default
  • Confirmation prompts: Destructive operations require user confirmation
  • Selective git operations: Only configured files are committed

Installation Safety

Recommended (Safest):

git clone https://github.com/RegulusZ/multi-device-sync-github.git
cd multi-device-sync-github
./install.sh

Convenience (Review First):

curl -fsSL https://raw.githubusercontent.com/RegulusZ/multi-device-sync-github/main/install.sh -o install.sh
cat install.sh  # Review before executing
./install.sh

Data Protection

  • Automatic backups: Files backed up before replacement
  • No external endpoints: Notifications are local-only
  • User control: All operations can be reviewed before execution

Enabling Auto-Push

After reviewing behavior, enable in config:

auto_push_enabled: true

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务