# obsidian-folder-sync

Adopt this skill: https://proskills.md/skills/other/soroyue-openclaw-skills-skills-obsidian-folder-sync

Page: https://proskills.md/skills/other/soroyue-openclaw-skills-skills-obsidian-folder-sync
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/obsidian-folder-sync/SKILL.md
size: 1038
upstream: https://github.com/soroyue/openclaw-skills/blob/main/skills/obsidian-folder-sync/SKILL.md

````text
---
name: obsidian-folder-sync
description: |
  Sync any folder's .md files to an Obsidian Vault.

  **Trigger scenarios**:
  - User says「同步到Obsidian」「备份到Obsidian」「Obsidian同步」「folder sync」
  - User asks to backup a workspace, project docs, or notes folder to Obsidian

  **What it does**:
  - Uses rsync --files-from for efficient single-pass sync
  - Excludes node_modules, .git, __pycache__, .venv, .clawhub, .learnings
  - Default target subfolder = source folder name

  **Requirements**: rsync installed, Obsidian Vault must exist
---

# Obsidian Folder Sync

## Usage

```bash
bash scripts/sync.sh <source_folder> <vault_path> [destination_subfolder]
```

## Examples

```bash
# Sync AI agent workspace to Obsidian
bash sync.sh ~/.openclaw/workspace/skills ~/Obsidian/MyVault

# Custom destination subfolder
bash sync.sh ~/projects/docs ~/Obsidian/MyVault MyProjects
```

## Log

Logs at: `~/.openclaw/workspace/logs/obsidian-folder-sync.log`

## See Also

Full documentation: [README.md](README.md)
````

## File: README.md
upstream: https://github.com/soroyue/openclaw-skills/blob/main/README.md

````text
# Obsidian Folder Sync

Sync any folder's `.md` files to an Obsidian Vault — works with any AI agent workspace, project folder, or manual note collection.

**Author**: soroyue | **Platform**: macOS · Linux | **License**: MIT

---

## Overview

```bash
bash scripts/sync.sh <source_folder> <vault_path> [destination_subfolder]
```

| Parameter | Required | Description |
|-----------|----------|-------------|
| `source_folder` | ✅ | Absolute path to the folder to sync |
| `vault_path` | ✅ | Absolute path to the Obsidian Vault |
| `destination_subfolder` | ❌ | Subfolder inside Vault (default: source folder name) |

**Examples:**

```bash
# Sync AI agent skills to Obsidian
bash sync.sh ~/.openclaw/workspace/skills ~/Obsidian/MyVault

# Sync to a custom subfolder
bash sync.sh ~/projects/docs ~/Obsidian/MyVault ProjectNotes

# Sync memory/notes folder
bash sync.sh ~/my-agent/memory ~/Obsidian/MyVault Memory
```

---

## What Gets Synced

| Included | Excluded |
|----------|----------|
| ✅ All `*.md` files | ❌ `node_modules/` |
| ✅ Subdirectory structure preserved | ❌ `.git/` |
| | ❌ `__pycache__/` |
| | ❌ `.venv/` |
| | ❌ `.clawhub/` |
| | ❌ `.learnings/` |

---

## Installation

### Option 1 — One-command install

```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/soroyue/openclaw-skills/main/install.sh)" -- obsidian-folder-sync
```

### Option 2 — Clone and install manually

```bash
git clone https://github.com/soroyue/openclaw-skills.git
cd openclaw-skills
bash install.sh obsidian-folder-sync
```

The skill installs to `~/.openclaw/workspace/skills/obsidian-folder-sync/`.

---

## Configuration

### Requirements

- `rsync` — Install via `brew install rsync` (macOS) or your package manager
- Obsidian Vault must exist at the target path

### Log File

Logs are written to:
```
~/.openclaw/workspace/logs/obsidian-folder-sync.log
```

---

## Technical Details

- **Method**: `rsync --files-from` — single-pass, incremental sync
- **Speed**: ~200 files in < 1 second (macOS)
- **Key fix**: `--include='*' --exclude='*'` pattern (order matters) lets matched files through before excluding the rest
- **Safety**: Only adds/updates files — never deletes target files

---

## Troubleshooting

| Problem | Solution |
|---------|----------|
| "Vault not found" | Check the vault path is correct and the folder exists |
| Files not syncing | Make sure source folder has `.md` files |
| rsync not found | Run `brew install rsync` (macOS) |

---

## Changelog

| Version | Date | Change |
|---------|------|--------|
| 1.0.0 | 2026-03-25 | Initial release |

---

## Related

- [OpenClaw](https://github.com/openclaw/openclaw)
- [ClawHub](https://clawhub.com)
````
