---
name: obsidian-vault
description: "Read, search, create, and edit notes in an Obsidian vault with plain file tools, while keeping wikilinks, tags, frontmatter, and embeds working. Use when the user asks to find or update notes, list backlinks, find notes by tag, fix broken [[wikilinks]], find orphan notes, write daily notes, or reorganize or rename notes in a vault. An Obsidian vault is just a folder of Markdown files, so no app, plugin, or API is required. Not for Obsidian Sync, Publish, or plugin configuration."
license: MIT
metadata:
  title: Obsidian Vault
  summary: Work on an Obsidian vault with plain file tools without breaking wikilinks, tags, or frontmatter. Includes backlink, orphan, and broken-link queries.
  category: productivity
  tags: [obsidian, notes, markdown, knowledge-management]
  version: "1.0.0"
  author: Austin Christensen
  publisher: Christensen Equity
  related: [meeting-to-actions, weekly-review, decision-memo]
---

# Obsidian Vault

An Obsidian vault is a plain folder of UTF-8 Markdown files. There is no database to query: you read and write the files directly. This skill is about respecting Obsidian's conventions so links, tags, and metadata keep working when the user opens the app.

## When to use

- The user wants to find, read, summarize, or update notes in a vault.
- The user asks what links to a note, which notes carry a tag, or which links are broken.
- The user wants notes created, renamed, moved, merged, or reorganized.

## Conventions to respect

- **A vault** is any folder containing a `.obsidian/` directory. Find candidates with `find ~ -type d -name .obsidian -not -path '*/node_modules/*' 2>/dev/null` and take each parent. Confirm with the user if there is more than one.
- **Note identity** is the filename without `.md`. Names often contain spaces and `&`, so quote every path.
- **Wikilinks** resolve by note name, not path: `[[Note]]`, `[[Note|alias]]`, `[[Note#Heading]]`, `[[Note#^blockid]]`, and embeds `![[Note]]` or `![[image.png]]`. Only add a folder prefix when two notes share a name.
- **Frontmatter** is an optional YAML block at the very top, fenced by `---`. Common keys: `tags`, `aliases`, `cssclasses`, plus anything the user defines.
- **Tags** are inline `#tag` or `#parent/child`, or listed under `tags:` in frontmatter. Both count.
- **Callouts** look like `> [!note]`, `> [!warning]`, `> [!todo]`.
- **Daily notes** are usually `YYYY-MM-DD.md` in a folder like `Daily/` or `Journal/`. Check the vault's actual layout before assuming.

## Workflow

1. **Locate the vault root** and treat it as the base for every relative path.
2. **Map before editing.** Use the queries below to understand structure, then read the specific note before changing it.
3. **Edit with normal file tools.** Preserve the frontmatter block and existing formatting. Append rather than overwrite unless asked.
4. **Update links yourself on rename or move.** Obsidian rewrites links only when the rename happens inside the app. Search for every `[[Old Name` and update each reference, or tell the user exactly which notes still point at the old name.
5. **Validate** after structural changes by re-running the broken-link query.

## Queries

Run these from the vault root (`cd "<vault>"`). They skip `.obsidian/` and `.trash/`.

```bash
# Full-text search
grep -rIn --include='*.md' --exclude-dir=.obsidian --exclude-dir=.trash -e "query" .

# Backlinks: notes linking to "Project Plan" (plain, aliased, heading, or embed)
grep -rIl --include='*.md' --exclude-dir=.obsidian -E '\[\[Project Plan([]|#]|\]\])' .

# Notes with a tag, inline or in frontmatter
grep -rIl --include='*.md' --exclude-dir=.obsidian \
  -E '(#project([[:space:]/]|$)|^tags:.*\bproject\b|^[[:space:]]*-[[:space:]]*project$)' .

# Every link target used in the vault
grep -rIoh --include='*.md' --exclude-dir=.obsidian -E '\[\[[^]|#]+' . | sed 's/^\[\[//' | sort -u > /tmp/links.txt

# Every note name in the vault
find . -name '*.md' -not -path './.obsidian/*' -not -path './.trash/*' \
  | while IFS= read -r f; do basename "$f" .md; done | sort -u > /tmp/notes.txt

# Broken links: targets with no matching note (compare on the last path segment)
sed 's#.*/##' /tmp/links.txt | sort -u | comm -23 - /tmp/notes.txt

# Orphans: notes nothing links to
comm -13 <(sed 's#.*/##' /tmp/links.txt | sort -u) /tmp/notes.txt
```

Attachments such as images show up in the broken-link list if they are not `.md` files. Filter out targets with a file extension before reporting.

## Output

- Created or edited notes inside the vault, with working links and intact frontmatter.
- For analysis requests, a short list of matches, backlinks, orphans, or broken links, each with its path relative to the vault root.

## Guardrails

- Do not edit anything inside `.obsidian/` (settings, workspace, plugin data) unless the user asks. Corrupting it can break their setup.
- Do not delete notes without explicit confirmation. Deletion can orphan many links and is hard to undo.
- Keep frontmatter valid YAML and never drop fields you did not mean to change.
- Renames and moves are only done when every inbound link is updated or the user has been told which ones remain.
- This only works on files present on disk. Notes that exist only in a sync service and have not downloaded are out of reach; say so rather than guessing.
