Obsidian cli
Required companion skill for safe Obsidian vault operations: resolving vault paths, searching notes, creating notes, updating YAML properties, appending logs, validating backlinks, and using Obsidian URI/CLI helpers when available. Use whenever an agent needs to operate on an Obsidian vault.From its SKILL.md
npx -y skills add lionellau/capture-concept --skill obsidian-cliAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 5 commands, including `command -v obsidian >/dev/null && echo "OBSIDIAN_COMMAND=true" || echo "OBSIDIAN_COMMAND=false"` and 4 more.
SKILL.md
2.3 KB, 469 tokens by cl100k_base, as published. Nobody here has run it
Obsidian CLI
Use this skill for safe operations on a local Obsidian vault. The vault is a
filesystem directory containing .obsidian/.
Operating Model
- Resolve the vault path from the user, environment, or calling skill config.
- Verify the path exists and contains
.obsidian/. - Prefer
rgfor search. - Use an available
obsidiancommand or Obsidian URI only when it exists and the command shape is known. - Fall back to direct file operations when CLI helpers are unavailable.
- Never edit outside the resolved vault.
Tool Detection
command -v obsidian >/dev/null && echo "OBSIDIAN_COMMAND=true" || echo "OBSIDIAN_COMMAND=false"
command -v rg >/dev/null && echo "RG=true" || echo "RG=false"
Search
Preferred:
rg -n --glob '*.md' "query|alias|topic" "$VAULT"
Fallback:
find "$VAULT" -name '*.md' -not -path '*/.trash/*'
If an obsidian command supports search in the environment, it may be used, but
do not assume a universal syntax without testing it first.
Create Notes
Create parent directories as needed and write Markdown files directly. Preserve existing files unless the user asked to update them.
mkdir -p "$VAULT/Concepts/software-engineering"
Prefer readable kebab-case filenames:
cache-key-mismatch.md
Update Properties
When a deterministic helper exists, use it. Otherwise edit YAML carefully:
- preserve unrelated fields
- preserve user content
- update
updated: - keep
related:as a flat list of existing note slugs
Backlinks
Before adding a backlink, validate the target file exists. When adding a forward link, also add a reverse link if the related note has a clear structure and can be edited safely.
If the reverse edit is risky, skip it and report the reason.
Logs
Append capture operations to capture-log.md or wiki-log.md in the vault root.
Use wikilinks for note references.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.