wiki-rebuild

Archive, rebuild, or restore an Obsidian wiki vault with timestamped snapshots.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill wiki-rebuild-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wiki-rebuild
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/wiki-rebuild
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill wiki-rebuild-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a personal knowledge wiki drifts too far from its sources, incremental fixes stop working. This Skill provides a safe, structured way to snapshot the current wiki state, wipe it clean for a full rebuild, or roll back to a previous archive without losing data. ## Core Features & Use Cases - Archive Only: Snapshot the entire wiki (categories, index, log, manifest) into a timestamped _archives/ directory with metadata, leaving the live wiki untouched. - Archive + Rebuild: Archive the current state, clear all category directories, reset index.md and log.md, and prepare the vault for selective re-ingest via wiki-status, claude-history-ingest, codex-history-ingest, and wiki-ingest. - Restore from Archive: List available archives with page/source counts, archive the current state first as insurance, then restore a chosen snapshot and verify it. - QMD Index Sync: Refresh the QMD search index after destructive operations so search results match the live wiki, with graceful fallback when the QMD CLI is unavailable. - Use Case: Your Obsidian wiki has accumulated stale pages after months of ingestion. Run an archive-and-rebuild to snapshot 87 pages, clear the vault, then re-ingest only the sources that still matter. ## Quick Start Ask the assistant to archive the current wiki and rebuild it from scratch, confirming the operation before anything is deleted.

Frequently Asked Questions about wiki-rebuild

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rebuild an Obsidian wiki from scratch without losing data?

Use the archive-and-rebuild mode: it first copies all categories, index, log, and manifest into a timestamped _archives directory, then clears the live wiki. You can then re-ingest sources selectively with the ingest skills.

How do I restore a previous version of my wiki?

The restore mode lists all archives with their date, reason, and page counts. After you pick one, it archives the current state as insurance, clears the live wiki, and copies the chosen archive's content back into place.

Does rebuilding the wiki delete my Obsidian settings?

No. The .obsidian directory containing your settings, plugins, and themes is explicitly protected and never touched during archive, rebuild, or restore operations. The _archives directory and .env file are also preserved.

What happens to the QMD search index after a wiki rebuild?

After clearing or restoring the live wiki, the skill runs qmd update and, if needed, qmd embed so the search index matches the new state. If the QMD CLI is unavailable or QMD_WIKI_COLLECTION is unset, the refresh is skipped and reported.

When should I rebuild the wiki instead of fixing pages incrementally?

Rebuild when the wiki has drifted too far from its sources for incremental fixes to work, or before a major structural change. If only a few pages are stale, targeted re-ingest of specific sources is less disruptive.