npx skills add ...
npx skills add ar9av/obsidian-wiki --skill wiki-stage-commit
Review and promote staged wiki pages to their final locations. Use when WIKI_STAGED_WRITES=true and the user says "/wiki-stage-commit", "review staged pages", "commit staged writes", "promote staged pages", "approve staged changes", or "what's waiting in staging". Shows each staged file, lets the user accept or reject it, and moves accepted files to their final wiki locations. Rejected files are moved back to _raw/ for manual editing.
npx skills add ar9av/obsidian-wiki --skill wiki-stage-commit
You are reviewing LLM-written pages that are waiting in _staging/ for human approval before they land in the live wiki. This skill is only useful when WIKI_STAGED_WRITES=true in the vault config.
llm-wiki/SKILL.md. This gives OBSIDIAN_VAULT_PATH and WIKI_STAGED_WRITES.WIKI_STAGED_WRITES is not set or is false, tell the user: "Staged writes mode is not enabled. Set WIKI_STAGED_WRITES=true in your .env to use this feature." Then stop._staging/ directory inventory.The CLI owns the inventory — don't glob _staging/ yourself:
Each entry carries:
| Field | Meaning |
|---|---|
staged_path | vault-relative path of the staged file |
live_path | where it will land (a .patch.md targets the page it is named after) |
kind | new, update, or patch |
staged_revision | content hash of the staged file, as you are seeing it now |
live_revision | content hash of the live page, or null if there is none yet |
staged_mtime | when it was staged |
Keep staged_revision and live_revision for every file you show the user. They are what makes Step 3 refuse to overwrite an agent's concurrent write instead of silently clobbering it.
Report the inventory:
If the list is empty, report: "Nothing staged. All writes have been committed or no staged writes have been produced yet."
For each staged file (new pages first, then updates):
Display a summary:
Display a structured diff:
If --all flag is set, skip prompting and accept every file.
If --reject-all flag is set, skip prompting and reject every file.
If --list flag is set, stop after printing the inventory (Step 1).
The moves are mechanical and the CLI does them atomically. Pass the revisions from Step 1 so a decision made on stale information fails loudly.
--expect-new refuses if a live page has appeared since you listed — someone else got there first.
It lands in _raw/rejected-<category>-<page>.md for manual editing. An earlier rejection of the same page is never overwritten — the second becomes -2.
promote refuses .patch.md files, because merging a human-readable diff into a page whose surrounding text may have moved is judgment, not a rename. Do it yourself:
+ additions and - deletions as a merge — never overwrite the page wholesale.updated frontmatter.obsidian-wiki staging discard <patch staged_path> to clear the patch from the queue.Exit code 9 with conflict: ... on stderr means the staged or live file changed after you listed it. Nothing was moved. Do not retry with fresh revisions blindly — re-run staging list, show the user what changed, and ask again. The whole point of the check is that the content they approved is no longer the content that would land.
index.md is updated by the ingest that staged the page, so promotion does not touch it. log.md gets one STAGE_COMMIT line per invocation, written by the CLI.
The CLI appends the STAGE_COMMIT line to log.md itself. After processing all staged files, update hot.md — Recent Activity: "Committed N staged pages; rejected M."
+ are additions, lines starting with - are deletions. staging promote refuses them — merge them yourself (Step 3)index.md and log.md are always updated immediately on ingest (they are low-risk tracking files) — only category pages go through stagingobsidian_wiki/staging.py; this skill supplies the judgment, not the file handling_staging/ directory is not tracked by Obsidian's graph view — pages only appear in the wiki after promotionStaged files: 4 new pages, 2 updates
New pages:
_staging/concepts/attention-mechanism.md (staged 2026-09-08)
_staging/entities/andrej-karpathy.md (staged 2026-09-08)
Updates:
_staging/concepts/transformer-architecture.md (target: concepts/transformer-architecture.md)
Patches:
_staging/skills/prompt-engineering.patch.md (target: skills/prompt-engineering.md)--- New page: concepts/attention-mechanism.md ---
Title: Attention Mechanism
Tags: #ml #architecture
Summary: Core building block of transformers — computes weighted sum of values based on query-key similarity.
Tier: supporting
Confidence: 0.72
Sources: papers/attention.pdf
[Preview first 20 lines of body]
...
Accept [a], Reject [r], Skip [s], Preview full [p]?--- Update: concepts/transformer-architecture.md ---
Source: _staging/concepts/transformer-architecture.patch.md
Proposed additions (+):
+ Transformers outperform RNNs on tasks requiring long-range dependencies. ^[inferred]
+ New source: papers/survey-2026.pdf
Proposed deletions (-):
- The attention mechanism was first described in [Bahdanau 2015]. (to be replaced by updated claim)
⚠️ Conflict check: live_revision no longer matches what was staged against. Review carefully.
Accept [a], Reject [r], Skip [s], Preview full diff [p]?obsidian-wiki staging promote <staged_path> \
--expect-staged <staged_revision> --expect-newobsidian-wiki staging promote <staged_path> \
--expect-staged <staged_revision> --expect-live <live_revision>obsidian-wiki staging discard <staged_path>Stage commit complete.
✅ Accepted (N):
concepts/attention-mechanism.md → now live
entities/andrej-karpathy.md → now live
concepts/transformer-architecture.md → updated (patch applied)
❌ Rejected (M):
skills/fine-tuning-llms.md → moved to _raw/rejected-skills-fine-tuning-llms.md
⏭️ Skipped (K):
references/attention-is-all-you-need.md → still in _staging/
Staging queue: K files remaining