Obsidian CLI Sync and Publish
Use this skill for Obsidian Sync operations and capability-gated Obsidian Publish operations through official desktop obsidian CLI commands.
Routing contract
Use this skill when:
- the user asks for Sync state, Sync history, or Sync restore operations
- the user asks for Publish status, publish add/remove, or publish site checks and those commands are detected as available
- the task is a release/checkpoint flow that depends on Sync or Publish surfaces
Do not use this skill when:
- the request is regular note CRUD, task/property updates, or graph cleanup
- the request is Obsidian Headless automation without desktop app
- the request is explicitly a named one-command workflow ID (route to
obsidian-cli-workflows)
- the request is community tooling or non-official publish/sync surfaces
Preconditions
Assume these must be true before relying on this skill:
obsidian command is installed and registered
- Obsidian desktop app is available locally
- Sync is configured in the target vault
- Publish commands may be unavailable in some CLI builds and must be probed before use
- in Codex Desktop on macOS, direct launches can crash; prefer sanitized wrapper
Codex-safe launcher
In Codex Desktop on macOS, prefer this wrapper:
script -q /dev/null /usr/local/bin/zsh -ilc 'unset __CFBundleIdentifier LaunchInstanceID XPC_SERVICE_NAME CODEX_CI CODEX_SANDBOX CODEX_SHELL; export TERM=xterm-256color; obsidian ...'
Escalate the wrapped command only when required by sandbox boundaries.
Core operating policy
- Use only official desktop Sync and Publish CLI commands.
- Probe publish command availability before using any
publish:* command. Use a read-only check like obsidian help publish:status.
- If publish probe reports
No commands matching, treat Publish as unsupported in this environment and refuse publish actions plainly.
- For mixed read/write flows, run status checks first (
sync:status; and publish:status only when publish support is confirmed).
- Treat mutating commands as high-impact operations.
- Do not run mutating commands on implicit active-file targets unless the user explicitly requested active-file behavior.
- For restore operations (
sync:restore), require explicit version=<n> plus explicit file= or path= unless the user clearly specifies active-file restore.
- For publish operations (when supported), clearly state whether action targets one file, path, or all changed files.
- Summarize remote side effects before executing mutating operations.
- If Sync is not configured, report that blocker and stop.
- If publish is requested but unavailable in this CLI build, report that blocker and stop.
- If the request is actually headless/server Sync, say this skill does not cover Headless Sync and stop.
Risk levels
- low:
sync:status, sync:history, sync:read, sync:deleted; and publish:site, publish:list, publish:status only when supported
- medium:
sync, sync:open; and publish:open only when supported
- high:
sync:restore; and publish:add, publish:remove only when supported
Response contract
Always return:
- command capability used
- risk level (
low, medium, high)
- execution mode (
direct or escalated)
- exact command(s) run or proposed
- affected file/path scope
- remote side effects summary (if any)
- blocking reason, if any
Command families
Sync:
sync
sync:status
sync:history
sync:read
sync:restore
sync:open
sync:deleted
Publish:
publish:site (only when supported)
publish:list (only when supported)
publish:status (only when supported)
publish:add (only when supported)
publish:remove (only when supported)
publish:open (only when supported)
References
references/obsidian-cli-sync-publish-playbook.md
references/limitations-and-boundaries.md
references/validation.md
references/source-links.md
Source: hashgraph-online/awesome-codex-plugins → plugins/greg-asher/codex-obsidian/skills/obsidian-cli-sync-and-publish/SKILL.md
1---2name: obsidian-cli-sync-and-publish3description: Use this skill when the user needs official desktop Obsidian CLI Sync workflows and, when detected as available, Publish workflows. This skill is for remote-side-effect operations and must use explicit intent, capability probing, and conservative safety checks.4---5
6
7# Obsidian CLI Sync and Publish
8
9Use this skill for Obsidian Sync operations and capability-gated Obsidian Publish operations through official desktop `obsidian` CLI commands.
10
11## Routing contract
12
13Use this skill when:
14- the user asks for Sync state, Sync history, or Sync restore operations
15- the user asks for Publish status, publish add/remove, or publish site checks and those commands are detected as available
16- the task is a release/checkpoint flow that depends on Sync or Publish surfaces
17
18Do not use this skill when:
19- the request is regular note CRUD, task/property updates, or graph cleanup
20- the request is Obsidian Headless automation without desktop app
21- the request is explicitly a named one-command workflow ID (route to `obsidian-cli-workflows`)
22- the request is community tooling or non-official publish/sync surfaces
23
24## Preconditions
25
26Assume these must be true before relying on this skill:
27- `obsidian` command is installed and registered
28- Obsidian desktop app is available locally
29- Sync is configured in the target vault
30- Publish commands may be unavailable in some CLI builds and must be probed before use
31- in Codex Desktop on macOS, direct launches can crash; prefer sanitized wrapper
32
33## Codex-safe launcher
34
35In Codex Desktop on macOS, prefer this wrapper:
36
37```bash
38script -q /dev/null /usr/local/bin/zsh -ilc 'unset __CFBundleIdentifier LaunchInstanceID XPC_SERVICE_NAME CODEX_CI CODEX_SANDBOX CODEX_SHELL; export TERM=xterm-256color; obsidian ...'
39```
40
41Escalate the wrapped command only when required by sandbox boundaries.
42
43## Core operating policy
44
451. Use only official desktop Sync and Publish CLI commands.
462. Probe publish command availability before using any `publish:*` command. Use a read-only check like `obsidian help publish:status`.
473. If publish probe reports `No commands matching`, treat Publish as unsupported in this environment and refuse publish actions plainly.
484. For mixed read/write flows, run status checks first (`sync:status`; and `publish:status` only when publish support is confirmed).
495. Treat mutating commands as high-impact operations.
506. Do not run mutating commands on implicit active-file targets unless the user explicitly requested active-file behavior.
517. For restore operations (`sync:restore`), require explicit `version=<n>` plus explicit `file=` or `path=` unless the user clearly specifies active-file restore.
528. For publish operations (when supported), clearly state whether action targets one file, path, or all changed files.
539. Summarize remote side effects before executing mutating operations.
5410. If Sync is not configured, report that blocker and stop.
5511. If publish is requested but unavailable in this CLI build, report that blocker and stop.
5612. If the request is actually headless/server Sync, say this skill does not cover Headless Sync and stop.
57
58## Risk levels
59
60- low: `sync:status`, `sync:history`, `sync:read`, `sync:deleted`; and `publish:site`, `publish:list`, `publish:status` only when supported
61- medium: `sync`, `sync:open`; and `publish:open` only when supported
62- high: `sync:restore`; and `publish:add`, `publish:remove` only when supported
63
64## Response contract
65
66Always return:
67- command capability used
68- risk level (`low`, `medium`, `high`)
69- execution mode (`direct` or `escalated`)
70- exact command(s) run or proposed
71- affected file/path scope
72- remote side effects summary (if any)
73- blocking reason, if any
74
75## Command families
76
77Sync:
78- `sync`
79- `sync:status`
80- `sync:history`
81- `sync:read`
82- `sync:restore`
83- `sync:open`
84- `sync:deleted`
85
86Publish:
87- `publish:site` (only when supported)
88- `publish:list` (only when supported)
89- `publish:status` (only when supported)
90- `publish:add` (only when supported)
91- `publish:remove` (only when supported)
92- `publish:open` (only when supported)
93
94## References
95
96- `references/obsidian-cli-sync-publish-playbook.md`
97- `references/limitations-and-boundaries.md`
98- `references/validation.md`
99- `references/source-links.md`
100
101---
102
103**Source:** [`hashgraph-online/awesome-codex-plugins`](https://github.com/hashgraph-online/awesome-codex-plugins) → `plugins/greg-asher/codex-obsidian/skills/obsidian-cli-sync-and-publish/SKILL.md`