Save to Obsidian
by @chunhualiao
Saves markdown content to remote Obsidian vault via SSH
clawhub install save-to-obsidianπ About This Skill
name: save-to-obsidian description: Saves markdown content to remote Obsidian vault via SSH version: 1.0.0
Save to Obsidian
Saves markdown content to remote Obsidian vault via SSH.
Prerequisite
This skill is for machines WITHOUT iCloud sync (e.g., Linux/Ubuntu servers). If your machine already has iCloud Desktop sync enabled and direct access to the Obsidian vault, you don't need this skill β just copy files directly to the vault path.
When to Use
User says: "save to obsidian", "send to obsidian", "copy to obsidian"
Process
1. Write content to a temp .md file (enforce formatting rules below)
2. Copy to remote vault: scp
3. Confirm success to user
Example:
# Write content to temp file
cat > /tmp/my-note.md << 'EOF'
My Note
Content here
EOFCopy to remote Obsidian vault
scp /tmp/my-note.md myuser@vault.example.com:~/Obsidian/MyVault/Clean up
rm /tmp/my-note.md
Configuration: The agent should use the SSH host and vault path configured in workspace TOOLS.md
Formatting Rules
All content saved to Obsidian MUST follow these rules:
Diagrams: Use Mermaid (mandatory)
`mermaid )Tables: Use Markdown tables
Links: Use wiki-links or relative links
[[note-name]]textGeneral
Agent Owner
This skill is executed by the main OpenClaw agent session. Thesave-to-obsidian.sh script
runs as a shell command via the exec tool. No sub-agents are spawned. iCloud sync is handled
automatically after file transfer β no agent action needed.Success Criteria
Save succeeds when: 1. scp exits with code 0 2. File appears in vault directory with correct filename 3. iCloud sync propagates the file (typically 1-2 minutes; not verified by skill)Failure conditions: SSH unreachable, vault path does not exist, disk full, filename contains characters invalid for iCloud sync (handled by sanitization in script).
Edge Cases
Notes
Configuration
This skill reads SSH and vault configuration from your workspace TOOLS.md:
| Variable | Description | Where to set |
|----------|-------------|--------------|
| SSH host | Hostname/IP of the remote machine hosting the Obsidian vault | TOOLS.md (e.g., myserver.local) |
| SSH user | Username on the remote machine | TOOLS.md (e.g., your-username) |
| SSH key path | Path to SSH private key (default: ~/.ssh/id_rsa) | TOOLS.md |
| Vault path | Absolute path to Obsidian vault on remote machine | TOOLS.md (e.g., ~/Obsidian/MyVault/) |
Example TOOLS.md entry:
## Obsidian Remote Vault
SSH host: myserver.local
SSH user: your-username
Vault path: ~/Obsidian/MyVault/
No API keys or tokens required β uses SSH key authentication only.
β‘ When to Use
User says: "save to obsidian", "send to obsidian", "copy to obsidian"
βοΈ Configuration
This skill reads SSH and vault configuration from your workspace TOOLS.md:
| Variable | Description | Where to set |
|----------|-------------|--------------|
| SSH host | Hostname/IP of the remote machine hosting the Obsidian vault | TOOLS.md (e.g., myserver.local) |
| SSH user | Username on the remote machine | TOOLS.md (e.g., your-username) |
| SSH key path | Path to SSH private key (default: ~/.ssh/id_rsa) | TOOLS.md |
| Vault path | Absolute path to Obsidian vault on remote machine | TOOLS.md (e.g., ~/Obsidian/MyVault/) |
Example TOOLS.md entry: ```