obsidian-export
The obsidian-export command generates a structured snapshot of an Obsidian vault in JSON or Markdown format, extracting metadata like titles, types, summaries, links, tags, and frontmatter from all notes. Use this command to create a machine-readable export that external tools, agents, or other AI systems can consume without needing to understand the vault's folder structure, and to maintain an operation log of export activities.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/eugeniughelbur/obsidian-second-brain/HEAD/commands/obsidian-export.md -o ~/.claude/commands/obsidian-export.mdobsidian-export.md
Use the obsidian-second-brain skill. Execute `/obsidian-export $ARGUMENTS`:
The optional argument is the format: `json` (default) or `markdown`.
1. Read `_CLAUDE.md` first if it exists in the vault root
2. Read `index.md` for the full vault catalog
3. Build a structured export by scanning the vault:
**For each note in wiki/**, extract:
- `path`: file path relative to vault root
- `title`: note title (first heading or filename)
- `type`: from frontmatter tags (entity, concept, project, daily, etc.)
- `date`: from frontmatter
- `status`: from frontmatter (if exists)
- `summary`: first paragraph or first 200 characters of body
- `links_to`: list of all outgoing `[[wikilinks]]`
- `linked_from`: list of all incoming links (backlinks)
- `tags`: all frontmatter tags
- `frontmatter`: full frontmatter as key-value pairs
4. Output format:
**JSON** (default):
```json
{
"vault": "Eugeniu's Vault",
"exported": "2026-04-07",
"total_notes": 238,
"notes": [
{
"path": "wiki/entities/Eric Siu.md",
"title": "Eric Siu",
"type": "entity",
"summary": "CEO of Single Grain...",
"links_to": ["Single Grain", "Centralized API Gateway"],
"tags": ["entity", "person"]
}
]
}
```
Save to `_export/vault-snapshot.json`
**Markdown**:
A flat markdown file with every note listed with its metadata and summary.
Save to `_export/vault-snapshot.md`
5. Append to the operation log: if `Logs/` exists write `**HH:MM** - export | Vault snapshot exported (format, N notes)` to `Logs/YYYY-MM-DD.md`; otherwise append `## [YYYY-MM-DD] export | Vault snapshot exported (format, N notes)` to `log.md`
This file is the bridge between your vault and any other AI tool, automation, or agent. They don't need to know your folder structure. They read the snapshot.
---
**AI-first rule:** Every note created or updated by this command MUST follow `references/ai-first-rules.md` - `## For future Claude` preamble, rich frontmatter (`type`, `date`, `tags`, `ai-first: true`, plus type-specific fields), recency markers per external claim, mandatory `[[wikilinks]]` for every person/project/concept referenced, sources preserved verbatim with URLs inline, and confidence levels where applicable. The vault is for future-Claude retrieval - not human reading.
**Anti-fabrication:** Search exhaustively before claiming any note, person, or file is absent - false absence is the most common failure mode - and never invent facts, entities, or dates (mark unknowns as `TBD`). See the anti-fabrication and search-completeness hard rules in `references/ai-first-rules.md`.>
Create a new obsidian-second-brain command via interview - zero markdown editing required
Surface 3-5 next-direction candidates by reading ungraduated ideas, open project questions, and orphan research notes - what is worth working on next
Vault-first source-grounded research via Gemini File Search. One command, no browser. The grounded parallel to /research-deep (which is open-web via Perplexity).
Generate a decision record when the vault structure changes - the vault knows why it knows what it does
Read Google Calendar and write an AI-first snapshot to the vault - today, week, next week, or a custom range
Scan a codebase and write a maintained set of architecture notes into the vault - overview, per-module notes, key decisions. Re-run to refresh without clobbering your edits
Show or update a kanban board - flags overdue items, updates from conversation