$npx -y skills add AgriciDaniel/claude-obsidian --skill saveSave the current conversation, answer, or insight into the Obsidian wiki vault as a structured note. Analyzes the chat, determines the right note type, creates frontmatter, files it in the correct wiki folder, and updates index, log, and hot cache. Triggers on: "save this", "save
| 1 | # save: File Conversations Into the Wiki |
| 2 | |
| 3 | Good answers and insights shouldn't disappear into chat history. This skill takes what was just discussed and files it as a permanent wiki page. |
| 4 | |
| 5 | The wiki compounds. Save often. |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## Transport (v1.7+) |
| 10 | |
| 11 | The session-note write itself follows the standard transport policy. Read `.vault-meta/transport.json` (auto-created by `bash scripts/detect-transport.sh`): |
| 12 | |
| 13 | - **cli** — `obsidian-cli write "$VAULT" "$NOTE" < session.md`; see [`skills/wiki-cli/SKILL.md`](../wiki-cli/SKILL.md) |
| 14 | - **mcp-obsidian** / **mcpvault** — `mcp__obsidian-vault__write_note` |
| 15 | - **filesystem** — Claude's `Write` tool with absolute path |
| 16 | |
| 17 | Full decision tree: [`wiki/references/transport-fallback.md`](../../wiki/references/transport-fallback.md). Index/log/hot updates use the same transport. |
| 18 | |
| 19 | --- |
| 20 | |
| 21 | ## Mode awareness (v1.8+) |
| 22 | |
| 23 | Before creating the session note, consult the vault's methodology mode via `python3 scripts/wiki-mode.py route session "<topic-summary>"`. The router returns the vault-relative path: |
| 24 | |
| 25 | - **generic**: `wiki/sessions/<date>-<topic>.md` (v1.7 default) |
| 26 | - **LYT**: `wiki/notes/<date>-<topic>.md` + update the relevant session/journal MOC |
| 27 | - **PARA**: `wiki/projects/inbox/<date>-<topic>.md` (user reroutes to specific projects) |
| 28 | - **Zettelkasten**: `wiki/<ID>-session-<topic>.md` (timestamped ID becomes the filename prefix) |
| 29 | |
| 30 | If `.vault-meta/mode.json` is absent, the router returns mode=generic paths. **Important global rule**: per global CLAUDE.md `/save` convention, sessions for cross-project work should still file to `~/Documents/Obsidian Vault/sessions/` rather than the project's wiki. The mode router applies when filing to the project's own wiki/, not when filing to the global personal vault. |
| 31 | |
| 32 | ## Concurrency (v1.7+) |
| 33 | |
| 34 | Session-note writes MUST be preceded by `wiki-lock acquire`: |
| 35 | |
| 36 | ```bash |
| 37 | NOTE_PATH="wiki/questions/<slug>.md" # or wiki/concepts/, wiki/meta/, etc. |
| 38 | bash scripts/wiki-lock.sh acquire "$NOTE_PATH" || { |
| 39 | echo "skipped: $NOTE_PATH currently locked by another writer"; exit 0 |
| 40 | } |
| 41 | # … write the note via §Transport-selected method … |
| 42 | bash scripts/wiki-lock.sh release "$NOTE_PATH" |
| 43 | ``` |
| 44 | |
| 45 | For multi-file saves (e.g., session note + index update + log append), acquire each lock in sorted-path order to avoid deadlocks. Index/log/hot updates lock just like content pages. |
| 46 | |
| 47 | See `skills/wiki-ingest/SKILL.md` §Concurrency for the full lock semantics. |
| 48 | |
| 49 | --- |
| 50 | |
| 51 | ## Note Type Decision |
| 52 | |
| 53 | Determine the best type from the conversation content: |
| 54 | |
| 55 | | Type | Folder | Use when | |
| 56 | |------|--------|---------| |
| 57 | | synthesis | wiki/questions/ | Multi-step analysis, comparison, or answer to a specific question | |
| 58 | | concept | wiki/concepts/ | Explaining or defining an idea, pattern, or framework | |
| 59 | | source | wiki/sources/ | Summary of external material discussed in the session | |
| 60 | | decision | wiki/meta/ | Architectural, project, or strategic decision that was made | |
| 61 | | session | wiki/meta/ | Full session summary: captures everything discussed | |
| 62 | |
| 63 | If the user specifies a type, use that. If not, pick the best fit based on the content. When in doubt, use `synthesis`. |
| 64 | |
| 65 | --- |
| 66 | |
| 67 | ## Save Workflow |
| 68 | |
| 69 | **Step 0: Decide the destination root.** Check in order: |
| 70 | |
| 71 | 1. **User explicit override.** If the user said "save to this project's wiki" / "save to the personal vault" / a specific path, respect it. |
| 72 | 2. **Project CLAUDE.md or global `~/.claude/CLAUDE.md` `/save` rule.** If either declares a personal-vault destination (e.g., `~/Documents/Obsidian Vault/`), that is the destination ROOT. The Note Type table below describes paths relative to whichever root is active. Append the new note to `<root>/log/ingest-log.md` at the top, in the format that file already uses. |
| 73 | 3. **Default.** The project's own `wiki/` folder. |
| 74 | |
| 75 | The mode router (`python3 scripts/wiki-mode.py route session "<topic>"`) applies when filing into the project's own `wiki/`. When filing into a personal-vault root, use the canonical folders documented in that vault's CLAUDE.md (commonly `sessions/`, `concepts/`, `sources/`) — the mode router is NOT consulted for personal-vault writes by default. Filename sanitization (slug + safe_name) still applies regardless of root: strip path separators, NUL bytes, control chars, leading dots/hyphens. |
| 76 | |
| 77 | **Then continue the workflow:** |
| 78 | |
| 79 | 1. **Scan** the current conversation. Identify the most valuable content to preserve. |
| 80 | 2. **Ask** (if not already named): "What should I call this note?" Keep the name short and descriptive. |
| 81 | 3. **Determine |