# Wiki Rebuild

Archive and rebuild wiki knowledge from source, or restore a prior archive.

- Repository: https://github.com/Ar9av/obsidian-wiki (3650 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Ar9av/obsidian-wiki --skill wiki-rebuild -g -a claude-code -y`
Codex: `npx skills add Ar9av/obsidian-wiki --skill wiki-rebuild -g -a codex -y`
Cursor: `npx skills add Ar9av/obsidian-wiki --skill wiki-rebuild -g -a cursor -y`
Gemini CLI: `npx skills add Ar9av/obsidian-wiki --skill wiki-rebuild -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Ar9av/obsidian-wiki`

## Description

Archive and rebuild wiki knowledge from source, or restore a prior archive. Use for full restart/recovery when incremental repair is inappropriate; this is broader and more destructive than ordinary update or lint.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Wiki Rebuild, Archive, Rebuild, Restore

You are performing a destructive operation on the wiki. Always archive first, always confirm with the user before proceeding.

## Before You Start

1. **Resolve config**, follow the Config Resolution Protocol in `llm-wiki/SKILL.md` (inline `@name` override → walk up CWD for `.env` → global config → prompt setup). This gives `OBSIDIAN_VAULT_PATH` and optional QMD settings such as `QMD_WIKI_COLLECTION`
2. Read `.manifest.json` to understand current state
3. **Confirm the user's intent.** This skill supports three modes:
   - **Archive only**, snapshot current wiki, no rebuild
   - **Archive + Rebuild**, snapshot, then reprocess all sources from scratch
   - **Restore**, bring back a previous archive

## The Archive System

Archives live at `$OBSIDIAN_VAULT_PATH/_archives/`. Each archive is a timestamped directory containing a full copy of the wiki state at that point.

```
$OBSIDIAN_VAULT_PATH/
├── _archives/
│   ├── 2026-04-01T10-30-00Z/
│   │   ├── archive-meta.json
│   │   ├── concepts/
│   │   ├── entities/
│   │   ├── skills/
│   │   ├── references/
│   │   ├── synthesis/
│   │   ├── journal/
│   │   ├── projects/
│   │   ├── index.md
│   │   ├── log.md
│   │   └── .manifest.json
│   └── 2026-03-15T08-00-00Z/
│       └── ...
├── concepts/          ← live wiki
├── entities/
└── ...
```

### archive-meta.json

```json
{
  "archived_at": "2026-04-06T10:30:00Z",
  "reason": "rebuild",
  "total_pages": 87,
  "total_sources": 42,
  "total_projects": 6,
  "vault_path": "$OBSIDIAN_VAULT_PATH",
  "manifest_snapshot": ".manifest.json"
}
```

## Mode 1: Archive Only

When the user wants to snapshot the current state without rebuilding.

### Steps:

The rest: https://github.com/Ar9av/obsidian-wiki/blob/HEAD/.skills/wiki-rebuild/SKILL.md
