1---2name: obsidian-cli3description: Interact with an Obsidian vault via the Obsidian CLI. Use when the user asks to read, search, create, update, or inspect notes, daily notes, links, tasks, tags, or other vault content from the terminal.4---56# Obsidian CLI78## When to apply910- The user asks to work with an Obsidian vault from the terminal.11- The task mentions notes, markdown, daily notes, backlinks, tags, tasks, or vault search.12- The task is about using the Obsidian CLI rather than editing files directly.13- The task is part of ongoing coding work and the vault may hold useful project context, decisions, progress notes, or handover state.1415## Core workflow16171. Confirm the target vault before running note commands. If it is unclear, run `obsidian vaults`.182. If `obsidian vaults` shows exactly one open vault, use that vault by default.193. If the command or syntax is uncertain, check help first with `obsidian help`, `obsidian help <command>`, or `obsidian <command> --help`.204. Prefer read-only discovery first: search or read, then expand with `links` and `backlinks` once you find a relevant note.215. Prefer updating an existing note with `append` or `prepend` over rewriting a whole note or creating a new one.226. Re-read afterwards when the write matters operationally.2324## Safe defaults2526- Target a specific vault explicitly whenever the CLI supports it.27- Return or summarise CLI output directly. Do not open the GUI unless the user asks for it.28- Ask before destructive operations such as `delete`, `move`, `rename`, `history:restore`, or sync/history restore operations.29- Preserve existing frontmatter, headings, wikilinks, and note structure unless the user asks for a rewrite.30- For daily-note work, resolve the note first with `daily:path` or inspect it with `daily:read` before writing.31- If help output does not show the operation you want, assume the CLI may not support it directly and use a different workflow instead of inventing syntax.3233## Coding use3435- Treat the vault as external working memory for active coding work.36- Prefer updating an existing project, daily, or working note before creating a fresh note.37- Read `references/coding-workflows.md` when the task is about note choice, coding context, or what kind of update to record.38- Read `references/voice.md` only when you need help drafting the note text itself.3940## Portability4142- This skill may be installed into another project. Do not assume any repo-local layout.43- Always ask for or discover the vault path or vault target from the runtime environment.44- On WSL, `obsidian` may not be available on `$PATH`. If so, invoke the Windows CLI entrypoint directly, for example `"/mnt/c/Program Files/Obsidian/Obsidian.com" vaults`.4546## Additional resources4748- Start with [references/REFERENCE.md](references/REFERENCE.md) to choose the right supporting file.