Skip to content
All Skills

Export Vault Note

Exports a single Obsidian vault note and all its linked images into a portable zip or tar.gz archive, preserving vault-root-relative paths so the archive unpacks correctly anywhere. Use only when the user explicitly invokes /export-vault-note.

Personal Productivity|v1|Updated 7/2/2026|GitHub source
MCP get_skill({ skillId: "export-vault-note-aaba374e" })

Use this skill with your agent

Create a free account and connect via MCP

Get Started Free
# Export Vault Note

This skill runs inside an **Obsidian vault**. It bundles a single Markdown note and every image it links into a portable archive placed at a location of the user's choosing (defaulting to one directory above the vault root).

Handles two image link styles:
- Wiki-style: `![[image.png]]` or `![[subfolder/image.png]]`
- Inline Markdown: `![alt text](path/to/image.png)`

**Example:**
```
/export-vault-note projects/blog/my-post.md zip ~/Desktop
```

---

## Step 1 — Parse Arguments

Read `$ARGUMENTS`. Extract:
- `note_path` — vault-relative path to the Markdown file (e.g. `ai/notes/my-note.md`)
- `format` — `zip` or `tar`
- `output_dir` — absolute or relative path where the archive should be saved

If `note_path` is missing, ask: *"Which note do you want to export? Provide the vault-relative path, e.g. `ai/notes/my-note.md`."*

If `format` is not provided, ask: *"Do you want a `zip` or `tar` archive?"*

If `output_dir` is not provided, tell the user: *"The archive will be saved to one directory above the vault root by default. Is that OK, or do you want a different location?"* Wait for confirmation or a new path before continuing.

---

## Step 2 — Locate the Vault Root

Walk up the directory tree from the current working directory looking for a `.obsidian` folder. If the note path given is absolute, also try walking up from its parent directory.

```bash
python3 -c "
import sys
from pathlib import Path
for start in sys.argv[1:]:
    p = Path(start).resolve()
    for candidate in [p] + list(p.parents):
        if (candidate / '.obsidian').is_dir():
            print(candidate)
            raise SystemExit(0)
print('')
" "." "<absolute-note-parent-if-known>"
```

If the output is empty (no `.obsidian` found), ask: *"I couldn't detect the vault root automatically. What is the absolute path to your vault root?"*

Continue reading

Sign up for a free account to view the full skill content

Login / Register
#broad-capability#skill-authoring#code-review#documentation#obsidian#vault#managementpythonbash
Export Vault Note - AgentArmory Skill — AgentArmory