Obsidian OpenClaw Sync
Helper tool for syncing OpenClaw configuration between iCloud Drive and local Obsidian vaults.
Purpose
This skill solves the problem of syncing OpenClaw configuration across multiple devices via iCloud:
- - Automatically detects all iCloud vaults with OpenClaw configs
- Creates symlinks from local to iCloud for seamless sync
- Supports multi-agent workspace templates (workspace_, workspace-)
- Manages
openclaw.json sync with overwrite control
Dependencies
| Dependency | Required | Description |
|---|
| INLINECODE1 | Yes | Python 3.x (macOS comes with Python pre-installed) |
| INLINECODE2 |
Yes | This skill only works on macOS (iCloud Drive integration) |
|
obsidian-icloud-sync | Yes | Obsidian must be set up to sync vaults via iCloud Drive |
Check Dependencies
CODEBLOCK0
Usage
CODEBLOCK1
Commands
| Command | Description |
|---|
| INLINECODE4 | Show all iCloud vaults with agents and skills, indicates sync status |
| INLINECODE5 |
Interactive setup to sync a vault to local |
|
unset | List and remove local symlinks |
Options
| Option | Short | Description |
|---|
| INLINECODE7 | INLINECODE8 | Pre-select vault by index (default: interactive) |
| INLINECODE9 |
-w | Overwrite local
openclaw.json with symlink to iCloud version |
|
--no-confirm |
-y | Skip confirmation prompt (auto-confirm) |
Examples
CODEBLOCK2
Output Format
CODEBLOCK3
Synced Directories
| Source (iCloud) | Target (Local) |
|---|
| INLINECODE14 | INLINECODE15 |
| INLINECODE16 |
./projects/ |
|
team/ |
./team/ |
|
skills/ |
./skills/ |
|
workspace-*/ |
./workspace-*/ |
|
.openclaw/*.json |
./.openclaw/*.json |
|
openclaw.json |
./openclaw.json (with --overwrite) |
Multi-Device Sync Flow
- 1. Device 1: Run
setup to create symlinks to iCloud vault - Device 2: Run
setup --overwrite to replace local config with iCloud symlink - All devices: Changes sync via iCloud Drive automatically
References
Obsidian OpenClaw 同步
用于在 iCloud Drive 和本地 Obsidian 仓库之间同步 OpenClaw 配置的辅助工具。
目的
该技能解决了通过 iCloud 在多设备间同步 OpenClaw 配置的问题:
- - 自动检测所有包含 OpenClaw 配置的 iCloud 仓库
- 创建从本地到 iCloud 的符号链接以实现无缝同步
- 支持多智能体工作区模板(workspace_、workspace-)
- 管理 openclaw.json 的同步并支持覆盖控制
依赖项
| 依赖项 | 必需 | 描述 |
|---|
| python3 | 是 | Python 3.x(macOS 预装 Python) |
| macOS |
是 | 该技能仅适用于 macOS(iCloud Drive 集成) |
| obsidian-icloud-sync | 是 | Obsidian 必须设置为通过 iCloud Drive 同步仓库 |
检查依赖项
bash
检查 Python 可用性
python3 --version
检查 iCloud Obsidian 路径是否存在
ls -ld ~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents
使用方法
bash
/obsidian-openclaw-sync [命令] [选项]
命令
| 命令 | 描述 |
|---|
| status | 显示所有包含智能体和技能的 iCloud 仓库,并指示同步状态 |
| setup |
交互式设置,将仓库同步到本地 |
| unset | 列出并移除本地符号链接 |
选项
| 选项 | 缩写 | 描述 |
|---|
| --vault N | -v N | 按索引预选仓库(默认:交互式) |
| --overwrite |
-w | 用指向 iCloud 版本的符号链接覆盖本地 openclaw.json |
| --no-confirm | -y | 跳过确认提示(自动确认) |
示例
bash
检查同步状态(显示所有 iCloud 仓库)
/obsidian-openclaw-sync
交互式设置(选择仓库,创建符号链接)
/obsidian-openclaw-sync setup
带覆盖的设置(用 iCloud 符号链接替换本地 openclaw.json)
/obsidian-openclaw-sync setup --overwrite
无需确认提示的设置(自动确认)
/obsidian-openclaw-sync setup --no-confirm
设置特定仓库且无需提示
/obsidian-openclaw-sync setup --vault 1 --no-confirm
列出并移除本地符号链接
/obsidian-openclaw-sync unset
输出格式
✓ iCloud Obsidian: /Users/.../iCloud~md~obsidian/Documents
✓ 有效仓库 (N):
✓ <仓库名称>
智能体 (N): <智能体1>, <智能体2>, ...
技能 (N): <技能1>, <技能2>, ...
○ <仓库名称> [未找到 openclaw.json(推荐)]
✗ 无效仓库 (N):
✗ <仓库名称>(缺少:.obsidian/)
本地配置:.openclaw
智能体 (N): <智能体1>, <智能体2>, ...
技能 (N): <技能1>, <技能2>, ...
同步目录
| 源(iCloud) | 目标(本地) |
|---|
| media/ | ./media/ |
| projects/ |
./projects/ |
| team/ | ./team/ |
| skills/ | ./skills/ |
| workspace-
/ | ./workspace-/ |
| .openclaw/
.json | ./.openclaw/.json |
| openclaw.json | ./openclaw.json(使用 --overwrite 时) |
多设备同步流程
- 1. 设备 1:运行 setup 创建指向 iCloud 仓库的符号链接
- 设备 2:运行 setup --overwrite 用 iCloud 符号链接替换本地配置
- 所有设备:更改通过 iCloud Drive 自动同步
参考
- - 同步辅助脚本 - 用于仓库检测的核心 Python 脚本