jpskill.com
🛠️ 開発・MCP コミュニティ

wiki-rebuild

Archive existing wiki knowledge and rebuild from scratch, or restore from a previous archive. Use this skill when the user wants to start fresh, rebuild the wiki from all sources, archive current knowledge before a major change, or restore an older version. Triggers on "rebuild the wiki", "start over", "archive and rebuild", "restore from archive", "nuke and repave", "clean rebuild". Also use when the wiki has drifted too far from sources and incremental fixes won't cut it.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o wiki-rebuild.zip https://jpskill.com/download/22847.zip && unzip -o wiki-rebuild.zip && rm wiki-rebuild.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22847.zip -OutFile "$d\wiki-rebuild.zip"; Expand-Archive "$d\wiki-rebuild.zip" -DestinationPath $d -Force; ri "$d\wiki-rebuild.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して wiki-rebuild.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → wiki-rebuild フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Wiki Rebuild — アーカイブ、再構築、復元

あなたはWikiに対して破壊的な操作を実行しようとしています。常に最初にアーカイブを作成し、続行する前に必ずユーザーに確認してください。

開始する前に

  1. 設定の解決llm-wiki/SKILL.md に記載されている設定解決プロトコルに従ってください(CWDを遡って.env~/.obsidian-wiki/config → プロンプト設定)。これによりOBSIDIAN_VAULT_PATHが得られます。
  2. .manifest.jsonを読み込み、現在の状態を理解します。
  3. ユーザーの意図を確認します。 このスキルは3つのモードをサポートしています。
    • アーカイブのみ — 現在のWikiのスナップショットを作成し、再構築は行いません。
    • アーカイブ + 再構築 — スナップショットを作成し、その後すべてのソースを最初から再処理します。
    • 復元 — 以前のアーカイブを復元します。

アーカイブシステム

アーカイブは$OBSIDIAN_VAULT_PATH/_archives/に保存されます。各アーカイブはタイムスタンプ付きのディレクトリで、その時点でのWikiの状態の完全なコピーを含んでいます。

$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/          ← ライブWiki
├── entities/
└── ...

archive-meta.json

{
  "archived_at": "2026-04-06T10:30:00Z",
  "reason": "rebuild",
  "total_pages": 87,
  "total_sources": 42,
  "total_projects": 6,
  "vault_path": "/Users/name/Knowledge",
  "manifest_snapshot": ".manifest.json"
}

モード1: アーカイブのみ

ユーザーが再構築せずに現在の状態のスナップショットを作成したい場合。

手順:

  1. アーカイブディレクトリを作成します: _archives/YYYY-MM-DDTHH-MM-SSZ/
  2. すべてのカテゴリディレクトリ、index.mdlog.md.manifest.json、およびprojects/をアーカイブにコピーします。
  3. 理由を"snapshot"としてarchive-meta.jsonを書き込みます。
  4. log.mdに追記します:
    - [TIMESTAMP] ARCHIVE reason="snapshot" pages=87 destination="_archives/2026-04-06T10-30-00Z"
  5. 報告します: 「87ページをアーカイブしました。現在のWikiは変更されていません。」

モード2: アーカイブ + 再構築

ユーザーが最初からやり直したい場合。これは完全なシーケンスです。

ステップ1: 現在の状態をアーカイブする

上記のモード1と同じですが、理由は"rebuild"です。

ステップ2: ライブWikiをクリアする

カテゴリディレクトリ(concepts/entities/skills/など)およびprojects/ディレクトリからすべてのコンテンツを削除します。以下は保持します。

  • _archives/(当然)
  • .obsidian/(Obsidian設定)
  • .env(Vault内に存在する場合)

index.mdを空のテンプレートにリセットします。log.mdを再構築エントリのみでリセットします。.manifest.jsonを削除します(取り込み中に再作成されます)。

ステップ3: 再構築

Vaultがクリアされ、完全な再取り込みの準備ができたことをユーザーに伝えます。ユーザーはこれで以下を実行できます。

  1. wiki-status — すべてのソースを「新規」として表示するため
  2. claude-history-ingest — Claudeの履歴を再処理するため
  3. codex-history-ingest — Codexセッション履歴を再処理するため
  4. wiki-ingest — ドキュメントを再処理するため
  5. data-ingest — その他のデータを再処理するため

これらはそれぞれ、進行中にマニフェストを再構築します。

重要: 取り込みを自動的に自分で実行しないでください。ユーザーが何を、どの順序で再取り込みするかを選択する必要があります。一部のソースはもはや関連性がない場合があります。

ステップ4: 再構築をログに記録する

log.mdに追記します:

- [TIMESTAMP] REBUILD archived_to="_archives/2026-04-06T10-30-00Z" previous_pages=87

モード3: アーカイブからの復元

ユーザーが以前の状態に戻したい場合。

ステップ1: 利用可能なアーカイブをリストする

_archives/ディレクトリを読み込みます。各アーカイブについてarchive-meta.jsonを読み込み、以下を表示します。

## 利用可能なアーカイブ

| 日付 | 理由 | ページ数 | ソース数 |
|---|---|---|---|
| 2026-04-06 10:30 | rebuild | 87 | 42 |
| 2026-03-15 08:00 | snapshot | 65 | 31 |

ステップ2: 復元するアーカイブを確認する

ユーザーにどのアーカイブを復元したいか尋ねます。復元すると現在のライブWikiが上書きされることを警告します。

ステップ3: 最初に現在の状態をアーカイブする

復元する前に、現在の状態をアーカイブします(理由: "pre-restore")。これにより何も失われません。

ステップ4: 復元

  1. ライブWikiをクリアします(モード2、ステップ2と同じ)
  2. 選択したアーカイブからすべてのコンテンツをライブWikiディレクトリにコピーし直します。
  3. index.mdlog.md、および.manifest.jsonをアーカイブから復元します。
  4. log.mdに追記します:
    - [TIMESTAMP] RESTORE from="_archives/2026-03-15T08-00-00Z" pages_restored=65

ステップ5: 報告

ユーザーに何が復元されたかを伝え、復元された状態に問題がないかwiki-lintを実行して確認することを提案します。

安全規則

  1. 破壊的な操作を行う前には常にアーカイブを作成してください。 例外はありません。
  2. ライブWikiをクリアする前に、常にユーザーに確認してください。
  3. ユーザーが明示的に要求しない限り、アーカイブを削除しないでください。 アーカイブは安価な保険です。
  4. .obsidian/ディレクトリは神聖です。 アーカイブ/再構築/復元中に決して触れないでください — ユーザーのObsidian設定、プラグイン、テーマが含まれています。
  5. 再構築中に何か問題が発生した場合でも、アーカイブがあります。ユーザーに復元できることを伝えてください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

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 (walk up CWD for .env~/.obsidian-wiki/config → prompt setup). This gives OBSIDIAN_VAULT_PATH
  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

{
  "archived_at": "2026-04-06T10:30:00Z",
  "reason": "rebuild",
  "total_pages": 87,
  "total_sources": 42,
  "total_projects": 6,
  "vault_path": "/Users/name/Knowledge",
  "manifest_snapshot": ".manifest.json"
}

Mode 1: Archive Only

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

Steps:

  1. Create archive directory: _archives/YYYY-MM-DDTHH-MM-SSZ/
  2. Copy all category directories, index.md, log.md, .manifest.json, and projects/ into the archive
  3. Write archive-meta.json with reason "snapshot"
  4. Append to log.md:
    - [TIMESTAMP] ARCHIVE reason="snapshot" pages=87 destination="_archives/2026-04-06T10-30-00Z"
  5. Report: "Archived 87 pages. Current wiki is untouched."

Mode 2: Archive + Rebuild

When the user wants to start fresh. This is the full sequence:

Step 1: Archive current state

Same as Mode 1 above, but with reason "rebuild".

Step 2: Clear live wiki

Remove all content from the category directories (concepts/, entities/, skills/, etc.) and the projects/ directory. Keep:

  • _archives/ (obviously)
  • .obsidian/ (Obsidian config)
  • .env (if present in vault)

Reset index.md to the empty template. Reset log.md with just the rebuild entry. Delete .manifest.json (it'll be recreated during ingest).

Step 3: Rebuild

Tell the user the vault is cleared and ready for a full re-ingest. They can now run:

  1. wiki-status — to see all sources as "new"
  2. claude-history-ingest — to reprocess Claude history
  3. codex-history-ingest — to reprocess Codex session history
  4. wiki-ingest — to reprocess documents
  5. data-ingest — to reprocess any other data

Each of these will rebuild the manifest as they go.

Important: Don't run the ingest yourself automatically. The user should choose what to re-ingest and in what order. Some sources may no longer be relevant.

Step 4: Log the rebuild

Append to log.md:

- [TIMESTAMP] REBUILD archived_to="_archives/2026-04-06T10-30-00Z" previous_pages=87

Mode 3: Restore from Archive

When the user wants to go back to a previous state.

Step 1: List available archives

Read _archives/ directory. For each archive, read archive-meta.json and present:

## Available Archives

| Date | Reason | Pages | Sources |
|---|---|---|---|
| 2026-04-06 10:30 | rebuild | 87 | 42 |
| 2026-03-15 08:00 | snapshot | 65 | 31 |

Step 2: Confirm which archive to restore

Ask the user which archive they want. Warn them that restoring will overwrite the current live wiki.

Step 3: Archive current state first

Before restoring, archive the current state (reason: "pre-restore") so nothing is lost.

Step 4: Restore

  1. Clear the live wiki (same as Mode 2, Step 2)
  2. Copy all content from the chosen archive back into the live wiki directories
  3. Restore index.md, log.md, and .manifest.json from the archive
  4. Append to log.md:
    - [TIMESTAMP] RESTORE from="_archives/2026-03-15T08-00-00Z" pages_restored=65

Step 5: Report

Tell the user what was restored and suggest running wiki-lint to check for any issues with the restored state.

Safety Rules

  1. Always archive before destructive operations. No exceptions.
  2. Always confirm with the user before clearing the live wiki.
  3. Never delete archives unless the user explicitly asks. Archives are cheap insurance.
  4. The .obsidian/ directory is sacred. Never touch it during archive/rebuild/restore — it contains the user's Obsidian settings, plugins, and themes.
  5. If something goes wrong mid-rebuild, the archive is there. Tell the user they can restore.