obsidian-cli
Installation
SKILL.md
Obsidian CLI Skill
The user has the obsidian CLI installed, which communicates with a running Obsidian instance over a local REST API. Use it to search, read, create, modify, and analyze notes without touching files directly on disk.
When to Use CLI vs Direct File Access
| Use CLI | Use Direct Read/Edit | Use Both |
|---|---|---|
Search (search, search:context) |
Large content edits requiring precise line-level changes | Find notes with CLI, then Read/Edit their files |
| Graph analysis (backlinks, orphans, deadends, unresolved) | Multi-line insertions at specific positions | Get vault path with vault info=path, then Glob/Grep |
| Properties/tags (read, set, list, count) | Complex regex replacements | List tasks with CLI, edit file to restructure |
| Tasks (list, toggle, filter) | Reading very large files with offset/limit | |
| Daily notes (read, append, prepend) | ||
| Templates (list, read, insert) | ||
| Vault-wide counts and statistics | ||
| Opening files in Obsidian UI |
Key principle: Use CLI for discovery and metadata; use direct file access for surgical edits. Combine them for find-then-edit workflows.