npx skills add ...
npx skills add ar9av/obsidian-wiki --skill wiki-capture
npx skills add ar9av/obsidian-wiki --skill wiki-capture
Save the current conversation as a permanent, structured wiki note. Use this skill when the user says "save this", "/wiki-capture", "capture this", "file this conversation", "preserve this", "add this to my wiki", or wants to turn what was just discussed into lasting knowledge. The skill classifies the content, rewrites it as declarative knowledge (not a chat transcript), and places it in the correct vault category. Also supports a fast QUICK MODE (`/wiki-capture --quick`, "quick capture", "capture this finding", "save this bug fix", "save this gotcha", "drop this to raw", "quick save to wiki") that drops findings to the `_raw/` staging area in under 60 seconds with no manifest or index writes — used by the session-end Stop hook to auto-preserve findings. Accepts inline named-vault routing like "@research save this" via the shared Config Resolution Protocol.
You are preserving knowledge from the current conversation as a permanent wiki note. The goal is to extract the substance — the knowledge itself — not a summary of what was said.
This skill has two modes:
--quick) — zero-friction staging: drop findings to _raw/ in under 60 seconds with no manifest/index/log/QMD writes. Used for mid-session capture and by the session-end Stop hook. See below, then stop — do not run the full-mode steps.--quick)Trigger when invoked as /wiki-capture --quick, by "quick capture" / "capture this finding" / "save this bug fix" / "save this gotcha" / "drop this to raw" / "quick save to wiki", or automatically by the session-end Stop hook.
Speed contract: Inline only. No subagents. No QMD. No manifest/index.md/log.md/hot.md writes. Target: <60 seconds. Promotion to full wiki pages happens later via /wiki-ingest.
Resolve config (Config Resolution Protocol in llm-wiki/SKILL.md): get OBSIDIAN_VAULT_PATH and OBSIDIAN_RAW_DIR (default: $OBSIDIAN_VAULT_PATH/_raw). Ensure $OBSIDIAN_RAW_DIR exists; create it if not.
Gate — KEEP or SKIP? Before extracting, judge whether this session has capture value. This keeps the skill safe to call automatically without spamming _raw/.
Scan for reusable findings — non-obvious bugs and root causes, framework/library gotchas, surprising API behavior, investigated workarounds, environment/toolchain quirks, patterns from debugging. Skip PM updates, config already in CLAUDE.md, inconclusive back-and-forth, anything obvious from the docs, and pleasantries. If nothing material emerged, say so and stop.
Cluster by topic — one _raw/ file per topic cluster, not per finding. Name each as a kebab-case slug (e.g. swift-actor-reentrancy, nextjs-hydration-mismatch).
Infer project context from repo names, file paths, framework mentions, error messages. Use the most specific name you can reliably infer; else null.
Write raw files — for each cluster, write $OBSIDIAN_RAW_DIR/<ISO-date>-<slug>.md. Read references/RAW-FORMAT.md for the full frontmatter spec, finding-block body structure, and provenance/confidence calibration. Per-cluster fields that vary: title, tags (2–4 from taxonomy), summary (≤200 chars), project (inferred or null), base_confidence (0.6 discussed → 0.75 fix applied → 0.9 test confirmed), provenance.extracted/provenance.inferred (sum to 1.0), lifecycle_changed (today), sources ("<project> session (<YYYY-MM-DD>)").
Confirm — list staged files and tell the user to run /wiki-ingest to promote them:
Quick mode deliberately does not write the manifest, index.md, log.md, hot.md, or refresh QMD — promotion via /wiki-ingest handles all of that. Stop here; do not run the full-mode steps below.
llm-wiki/SKILL.md (inline @name override → walk up CWD for .env → ~/.obsidian-wiki/config → prompt setup). This gives OBSIDIAN_VAULT_PATH and OBSIDIAN_LINK_FORMAT (default: wikilink).$OBSIDIAN_VAULT_PATH/index.md to understand existing wiki content (avoid duplicates)$OBSIDIAN_VAULT_PATH/hot.md if it exists — it gives context on recent activityWhen writing internal links in Step 5, apply the link format from llm-wiki/SKILL.md (Link Format section) using the OBSIDIAN_LINK_FORMAT value.
Scan the conversation. Ask: what knowledge emerged here that would be valuable in 3 months with no memory of this chat?
Worth preserving:
Skip:
If nothing material emerged, tell the user and stop.
Assign one of five types — this determines the target folder and tone:
| Type | Description | Target folder |
|---|---|---|
synthesis | Multi-step analysis or an answer to a specific question that required reasoning | synthesis/ |
concept | A definition, framework, or mental model (what a thing is) | concepts/ |
source | Summary of an external document, article, or resource discussed | references/ |
decision | A strategic, architectural, or design choice and its rationale | synthesis/ |
session | A complete discussion summary when the conversation spans multiple topics | journal/ |
If the content clearly belongs to a specific project (detected from context or user mention), place it under projects/<project-name>/<category>/ instead.
Do not write a summary of the conversation. Write the knowledge itself, in declarative present tense:
Apply provenance markers per llm-wiki:
^[inferred]^[ambiguous]Derive a clear, descriptive title from the content. Slugify it:
created)Create the file at the target path with required frontmatter:
Body structure by type:
synthesis / decision:
concept:
source:
session:
Every note must link to at least 2 existing wiki pages. Search index.md before writing. If fewer than 2 related pages exist, create minimal stubs for the most important concepts referenced.
index.md — Add the new page under its category section.
log.md — Append:
hot.md — Update Recent Activity with what was just captured. Update Key Takeaways if the note introduced something worth flagging. Update updated timestamp.
Report the saved path and title:
index.md, log.md, and hot.md updatedQMD is a search index, not the source of truth. If $QMD_WIKI_COLLECTION is empty or unset, skip this step. Run it only after this skill has written or rewritten vault markdown. If QMD refresh fails, do not roll back the vault changes; report the QMD status separately.
Use $QMD_CLI if set; otherwise use qmd.
If the output says vectors are needed or embeddings may be stale, run:
Verify the collection with either:
or, when a specific page path is known:
Record one of:
QMD refreshed: update + embed + verifiedQMD refreshed: update only + verifiedQMD skipped: QMD_WIKI_COLLECTION unsetQMD skipped: qmd CLI unavailableQMD failed: <short error summary>