From onyx
How an agent safely operates a live Obsidian vault through the obsidian CLI — additive writes, least privilege, look-before-you-write, and when to escalate. Read this before running any obsidian command that changes the vault.
How this skill is triggered — by the user, by Claude, or both
Slash command
/onyx:vault-operationsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`vault-conventions` governs what a note looks like; this skill governs how you change a *live* vault. When Obsidian is running with its command-line interface enabled, the `obsidian` CLI drives the open vault directly — create notes, append to the daily note, set frontmatter, query tasks and Bases. That is real power over the user's data, so it comes with a contract. This skill is that contract...
vault-conventions governs what a note looks like; this skill governs how you change a live vault. When Obsidian is running with its command-line interface enabled, the obsidian CLI drives the open vault directly — create notes, append to the daily note, set frontmatter, query tasks and Bases. That is real power over the user's data, so it comes with a contract. This skill is that contract; the obsidian-cli skill documents the command syntax.
If obsidian is not on PATH, it may still be installed — a terminal opened before the CLI was enabled won't have it yet. Before concluding the CLI is unavailable, look for the binary at the platform's standard location and call it by full path: Windows %LOCALAPPDATA%\Programs\Obsidian\Obsidian.com, macOS /usr/local/bin/obsidian, Linux ~/.local/bin/obsidian. Only treat the CLI as genuinely unavailable if it is not there either.
obsidian vault info=name returns nothing, the app is not running or the CLI is not enabled — say so and stop. Do not silently fall back to editing files on disk; that bypasses Obsidian's own indexing and file history.obsidian <command> vault="<name>".This is the engine's §8 write contract, restated for commands that mutate a running vault:
create (a new file), append, daily:append, and property:set. Do not use create ... overwrite, move, rename, or delete on anything you did not create this run.onyx apply, not from an agent. Fill notes inside the structure that is already there; never invent folders or move the furniture..vault/lock.json update themselves — do not hand-edit them through the CLI. Never touch .vault/ at all.read, daily:read, file). If what you would add is already there, stop — running a workflow twice must not double-write it.Your agent definition lists the globs you may read and write. Those bind your CLI calls too: a create or append outside your write scope is a defect, not initiative (Onyx charter §7.1). When a task needs a file outside your scope, escalate instead of reaching for it.
Stop and hand it back to the user with what you found and what you propose.
Obsidian keeps file history: obsidian history lists versions and obsidian history:restore / obsidian sync:restore recover them. That is a backstop for genuine accidents, not a license to overwrite and "undo later." Operate as if there were no undo; the net is there for the case where you were careful and still wrong.
Some workflows need a community plugin — Tasks (obsidian-tasks-plugin) for the task queries, Templater (templater-obsidian) for the template macros. The vault enables both in .obsidian/community-plugins.json, but a fresh vault may not have the plugin code installed yet, and a brand-new vault opens in Restricted Mode with community plugins off.
The CLI can install them — but never silently. Check first with obsidian plugins:enabled filter=community; if a plugin your workflow needs is missing, stop and ask the user, naming the plugin and why you need it. Only on an explicit yes:
obsidian plugins:restrict off. This is a trust decision (it lets community plugins run); fold it into the same ask.obsidian plugin:install id=obsidian-tasks-plugin enable (and/or id=templater-obsidian).plugin:install does not configure — tell the user to set it in Templater's settings.If the user declines, continue without the plugin and say plainly what degrades: task queries render as plain code blocks, template macros stay literal.
obsidian create ... template= and obsidian template:read ... resolve insert a template verbatim — they do not run Templater, so any <% ... %> / <%* ... %> macros land literally (verified against the live CLI). When a template is Templater-driven, do not create from it through the CLI and expect a finished note: either let Obsidian and Templater create the note, or resolve the content yourself before writing it. Never write a note that still contains <% ... %>.
Safe to run on your own, within scope:
read, daily:read, file, files, search, search:context, tasks, properties, backlinks, base:query.create (new file only), append, daily:append, daily:prepend, property:set (a key you own).Escalate first — these change or remove what already exists:
delete, move, rename, create ... overwrite, property:remove, plugin:*, reload, restart, and anything under dev: / eval.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub odysseia06/onyx --plugin onyx