First-Use Vault Setup
Treat root configuration as background setup, not a JSON-file task for the user. If normal resolution has no root, run python "<runtime-script>" root discover --format json. Show returned existing absolute paths as numbered candidates and ask the user to select one or provide another absolute Vault path. Resolve the selected path and state vault_root, control_center, and wiki_root. Only after the user confirms it should become the default, run root configure --root <path> --activate --confirm.
Do not read note content or scan the whole disk during discovery. Continue the user's original request after setup succeeds.
Runtime Resolution
Before running any command, resolve this skill's SKILL.md directory, take its
parent as <skills-root>, and set:
<runtime-script> = <skills-root>/obsidian-wiki-runtime/scripts/llm_wiki.py
Verify that <runtime-script> exists, then invoke it by absolute path. If it is
missing, stop with missing-runtime, report the expected path, and recommend:
npx skills add huajiexiewenfeng/obsidian-llm-wiki --skill '*' --copy --yes
Do not fall back to a repository-relative scripts/llm_wiki.py path.
Obsidian Wiki Maintain
Inventory Maintenance
inventory initialize, configure, ignore, and unignore are Maintain
actions. Run them without --confirm, show candidate/affected counts and
sensitive summaries, then proceed only after approval with
--confirm --plan-checksum <sha256>. Never overwrite an invalid baseline,
target the control center with ignore/unignore, or include raw/ as a normal
candidate scope.
Repair confirmed Obsidian LLM Wiki structure, consistency, and safety issues.
Detection belongs to obsidian-wiki-doctor; maintain applies approved fixes.
When To Use
Use this skill when the user wants to:
- apply approved structural repairs from
obsidian-wiki-doctor - fix confirmed missing
index.mdentries - patch confirmed broken relative wiki links
- update
log.mdfor an approved maintenance action - apply a narrow, user-approved cleanup to specific wiki files
- plan a confirmed cleanup or registration decision for Doctor archive findings
Do not use this skill for read-only diagnosis, validation, scoring, or health
reports. Use obsidian-wiki-doctor first, then return here to apply approved
repairs. Do not use this skill to answer knowledge questions. Use
obsidian-wiki-query.
Wiki Root Resolution
Before reading or updating any wiki page, resolve and state the actual wiki root. Do not assume the current shell working directory is the Obsidian wiki.
Before reading or writing, resolve and state vault_root, control_center, and
wiki_root using the shared order:
- User-provided Vault, control-center, or wiki path.
- Nearest
.obsidian-llm-wiki.jsonfrom the current working directory upward. OBSIDIAN_LLM_WIKI_ROOT.- Exactly one active Vault in the user configuration.
- Otherwise stop with
missing-configor ask the user to choose when multiple roots exist.
Do not search the whole disk. Before writes, run or follow the equivalent of:
python "<runtime-script>" root resolve --cwd <working-directory> --format json
If a project workspace contains an index.md but is not the resolved Obsidian
wiki root, do not maintain that workspace as the wiki unless the user
explicitly says it is the target wiki.
Workflow
Follow references/repair-policy.md.
- Resolve and state the active Obsidian wiki root.
- Run
<skills-root>/obsidian-wiki-runtime/scripts/obsidian_wiki_doctor.pythroughobsidian-wiki-doctor, or consume doctor findings supplied by the user. - Restate the approved repair scope in concrete file paths.
- Ask before broad repairs or sensitive cleanup.
- Apply approved narrow fixes only.
- Update
log.mdwith the maintenance action. - Return changed files, skipped findings, and remaining risks.
Output
- optional
index.mdupdates - optional
log.mdupdates - optional
ingest/index.mdconsistency notes - optional narrow page-link repairs
Safety Rules
Follow references/safety-rules.md.
Do not rewrite large sets of pages without confirmation.
Never delete, move, register, or re-archive a raw/ file solely because Doctor
reported it. Present the exact candidate path and require confirmation.
Examples
Input:
Apply the doctor finding that wiki/projects/foo.md is missing from index.md.
Expected behavior:
Update index.md for the confirmed page and record the change in log.md.
Input:
Fix missing index links only.
Expected behavior:
Update index.md for confirmed missing pages and record the change in log.md.