From realm
Vault-write step in the realm pipeline. Reads pendingDrafts from realm-state.json, lists available staged drafts (from realm-plan finalize or realm-convey), lets user select which to commit. Spawns realm-agent-write (haiku) per selected draft — validates YAML frontmatter, applies caveman compression, writes nodes to vault, updates backlinks, archives draft, removes from pendingDrafts. The ONLY realm skill that writes to the vault.
How this skill is triggered — by the user, by Claude, or both
Slash command
/realm:realm-manifestThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Commit staged draft(s) to Obsidian. Final step in realm pipeline.
Commit staged draft(s) to Obsidian. Final step in realm pipeline.
/realm-manifest # list pending drafts, prompt selection
/realm-manifest plans/auth-refactor # commit specific canvas draft by slug
/realm-manifest all # commit all pending drafts
| Trigger | Example |
|---|---|
| After realm-plan finalize | "commit this", /realm-manifest |
| After realm-convey | "manifest", "write to vault" |
| Multiple pending, commit selectively | /realm-manifest plans/auth-refactor |
| Commit everything staged | /realm-manifest all |
.realm/realm-state.json missing → /realm-forge firstpendingDrafts empty → nothing staged yet; run /realm-plan finalize or /realm-convey<draft-path> manually first, then re-invokeRead .realm/realm-state.json. If missing: No realm state. Run /realm-forge first. STOP.
Load pendingDrafts array. If empty (or field missing):
No pending drafts.
Run /realm-plan finalize or /realm-convey to stage nodes.
STOP.
No arg: Print pending list and wait for selection:
realm-manifest: pending drafts
[1] plans/auth-refactor plan "auth JWT refactor" 2026-06-14
[2] convey convey conversation capture 2026-06-13
Select: (number | slug | all | cancel):
Wait for reply. cancel or empty → STOP.
/realm-manifest <slug>:
Match slug against pendingDrafts[].slug. If no match:
Draft not found: <slug>. Run /realm-manifest to see pending list. STOP.
/realm-manifest all:
Select all entries from pendingDrafts.
For each selected entry, verify path file exists (absolute: <projectRoot>/<entry.path> for plan drafts; <projectRoot>/<entry.path> for convey).
If missing: Draft file not found: <path>. Stage again with /realm-plan finalize or /realm-convey. Skip that entry.
For each selected entry, run:
python3 "${HOME}/.claude/plugins/marketplaces/realm/scripts/manifest_write.py" \
--project-root "<projectRoot>" \
--check-conflicts \
--draft-path "<entry.path>"
Parse stdout for lines starting with CONFLICT: and the final conflicts: N count.
If any conflicts found, print:
realm-manifest: existing vault files detected
<slug>:
CONFLICT: decisions/ADR-007-foo.md
CONFLICT: sessions/2026-06-15-bar.md
Overwrite existing files? (y/n):
Wait for user reply.
n or empty → Cancelled. Vault unchanged. STOP.y → set overwrite = true for this draft, continue.If no conflicts → overwrite = false, continue.
For each selected entry, spawn realm-agent-write with:
projectRoot: <absolute path to project root>
draftPath: <absolute path to draft file>
slug: <entry.slug | null>
overwrite: <true | false>
Validate, compress, and write the staged manifest draft to the vault.
Follow the full procedure in your instructions.
Wait for each agent to complete before starting the next. Surface agent summary per draft.
After each successful agent run:
python3 "${HOME}/.claude/plugins/marketplaces/realm/scripts/manifest_write.py" \
--project-root "<projectRoot>" \
--remove-draft \
--draft-path "<entry.path>"
If exit code non-zero: warn but continue (vault write already succeeded).
realm-manifest complete
committed: <N> draft(s)
<slug | convey> → decisions: X functions: Y classes: Z discoveries: W
pending remaining: <M>
[run /realm-manifest to commit remaining] ← only if M > 0
next: /realm-status · /realm-recall <topic>
npx claudepluginhub blackmo18/realm --plugin realmCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.