Obsidian Skill
Routes file operations to MCPVault, app actions to Obsidian CLI, and sync tasks to Git.
npx skills add bitbonsai/mcpvaultSearch notes
Full-text search matches filenames and content, then ranks results with BM25.
Manage tags and frontmatter
Add or remove tags, and update frontmatter fields without rewriting note content.
Edit notes through MCPVault
Read, write, and patch tools validate paths against the configured vault root.
Run Git sync
Optional Git commands commit, pull, and push a vault after checking repository setup.
Routing Matrix
Each operation maps to exactly one backend. The skill picks the right one automatically.
| Operation | MCP | Obsidian CLI | Git | Notes |
|---|---|---|---|---|
| Read note | ✓ | — | — | Vault-scoped read via MCP |
| Write / patch note | ✓ | — | — | Validated writes through MCPVault |
| Search vault | ✓ | — | — | BM25-ranked full-text search |
| Resolve [[wiki links]] | ✓ | — | — | wiki_link picks the shallowest match first, then locale-sorts equal-depth paths; other matches are returned as alternatives |
| Manage tags / frontmatter | ✓ | — | — | Frontmatter merge through MCP |
| Move / rename notes | ✓ | — | — | MCP move followed by explicit backlink search, repair, and verification |
| Open note in Obsidian | — | ✓ | — | Requires the desktop app running |
| Trigger plugin commands | — | ✓ | — | Workspace actions, plugin APIs |
| Export to PDF | — | ✓ | — | App-level rendering pipeline |
| Sync vault across devices | — | — | ✓ | Git commit, pull, and push |
| Automated backup | — | — | ✓ | Cron / launchd, no UI needed |
Flow Cheat Sheet
The requested operation determines whether the skill uses MCPVault, Obsidian CLI, or Git.
Intent Routing
Git Sync Flow
Expanded Flow Playbook
Open for routing rules, preflight logic, and an end-to-end example
Expanded Flow Playbook
Open for routing rules, preflight logic, and an end-to-end example
Routing defaults
- -MCP first for read/write/search/frontmatter/tags and all note moves.
- -Obsidian context for app/editor/plugin-specific behavior and read-only backlink discovery.
- -Git CLI for sync, backup, and versioning actions.
Safe note rename flow
- Search for the old wikilink target by vault-relative path and filename stem.
- Move the note with MCP
move_note, even when Obsidian is running. - Patch exact wikilink targets while preserving aliases, embeds, and heading or block fragments.
- Search again and report stale references. Do not claim exhaustive repair if the 20-result cap is reached or the basename is ambiguous.
The skill does not invoke obsidian move automatically. Delayed stale-offset rewrites can corrupt notes edited while the command is still running (#176).
Preflight checks before sync
git --version git rev-parse --is-inside-work-tree git config user.name git config user.email git remote -v
If any check fails, ask one targeted setup question with a recommended default.
Example conversation
What It Is
MCP Server
Handles note reads, writes, searches, patches, and moves. It validates inputs and rejects paths outside the configured vault.
Obsidian CLI
Uses Obsidian's official CLI for operations that need the running desktop app: active file, opening notes in the editor, daily notes with template expansion, read-only backlink discovery, and plugin commands. A preflight checks the installed CLI at runtime instead of assuming a fixed version.
Git Sync
Git commits, pulls, and pushes vault files. Cron, launchd, or CI can run the commands without Obsidian.
Git-Based Vault Sync
Repository setup, automation, and conflict notes
Git-Based Vault Sync
Repository setup, automation, and conflict notes
How it works
An Obsidian vault is a folder of markdown files. Run git init inside it, add a remote, then commit, pull, and push like any repository.
Headless automation
# cron job or launchd plist cd /path/to/vault git add -A git commit -m "backup $(date +%Y-%m-%d)" git push
No Obsidian CLI required. Works on servers, NAS, or any headless machine.
Optional: Obsidian Git plugin
The Obsidian Git community plugin (8k+ stars) adds GUI-driven auto-sync from within the app: auto-commit on interval, pull on startup, push on close, and a source control sidebar.
Caveats
- -Commit intervals: Git sync runs when changes are committed.
- -Merge conflicts: Editing the same note on two devices before syncing requires manual resolution.
- -Large binaries: Images and PDFs may need
.gitignoreor Git LFS. - -Workspace files: Add
.obsidian/workspace.jsonto.gitignore.
Recommended .gitignore
.obsidian/workspace.json .obsidian/workspace-mobile.json .obsidian/plugins/obsidian-git/data.json .trash/
When To Use
Trigger phrases
Not a fit for
Workflow Patterns
Three patterns for combining MCP and Obsidian in a single session.
Search, then open
Search for a note through MCP, read it, then open it in Obsidian for visual editing.
Choose a backend
File operations use MCPVault. Actions that need the running app use Obsidian CLI, with obsidian:// URIs as fallback.
Review and patch
Write a draft via MCP, review in Obsidian, then patch corrections back through MCP.
Safety Defaults
Prefer MCP Writes
File mutations go through MCPVault path validation. Destructive tools require explicit confirmation parameters.
Confirm Destructive Actions
Deletes and moves require explicit path confirmation parameters, preventing accidental data loss.
Structured command arguments
Commands pass argument arrays instead of building shell command strings from note content.
Sandbox by Default
MCP tools are scoped to the vault root. Path traversal is blocked at the server level.
Quick Start
Install the skill to teach your AI assistant the Obsidian workflow.
.claude/
skills/
obsidian/
SKILL.md # Gotchas, error recovery, index
resources/
tool-patterns.md # Per-tool response shapes and recipes
obsidian-conventions.md # Vault structure, wikilinks, tags
git-sync.md # Git backup/sync workflows--- name: obsidian description: > Activate when the user mentions their Obsidian vault, notes, tags, frontmatter, daily notes, backup, or sync. Route operations across MCP, Obsidian CLI/app actions, and git sync with safe defaults. metadata: version: "2.2" author: bitbonsai ---