{
  "title": "Wiki Reindex",
  "story": [
    {
      "type": "markdown",
      "id": "9f1ca896e4ea4b14",
      "text": "# Wiki Reindex\n\n**Category** wikis · **Version** 5.5\n\nRebuild the sitemap and search index for a local federated-wiki domain after writing page JSON to disk directly (the server caches status/ indexes and won't notice file writes). Activates after creating/editing/bulk-importing pages, or when the page list or search looks stale. Merges the reindex-fedwiki-skill variant. Kept by the Librarian 🗃️."
    },
    {
      "type": "markdown",
      "id": "4874fff2c757ce57",
      "text": "The `fedwiki-reindex` skill rebuilds the sitemap and search index for a local federated wiki domain. It is needed because the wiki server caches these indexes in each domain's `status/` folder and does not detect when Claude Code writes page JSON files directly to disk.\n\n## Why It's Needed\n\nWhen a page is created or edited through the wiki browser UI, the server updates its index automatically. When Claude writes a page file directly to `~/Music/Guides/Private/{domain}/pages/`, the server doesn't know — two cached files in the `status/` folder go stale:\n\n- `sitemap.json` — the page list used for navigation and federation neighbourhood\n- `site-index.json` — the full-text search index\n\n## How It Works\n\nDelete the stale index files from `status/`, then `curl` the sitemap endpoint to trigger the server to rebuild them immediately.\n\n```bash\nFARM=\"$HOME/Music/Guides/Private\"\nDOMAIN=\"localhost\"\n\nrm -f \"$FARM/$DOMAIN/status/sitemap.json\"\nrm -f \"$FARM/$DOMAIN/status/site-index.json\"\ncurl -s \"http://$DOMAIN/system/sitemap.json\" > /dev/null\necho \"Reindexed $DOMAIN\"\n```\n\n## When to Use\n\n- After Claude creates or edits page JSON files directly on disk\n- After bulk import of pages\n- When the wiki's page list or search results appear incomplete or stale\n\n## Public Wikis — nextcloud-reindex\n\nFor public wikis in `~/Nextcloud/fedwiki/`, the remote server needs its index rebuilt separately using `nextcloud-reindex`. This deletes the index files via WebDAV and triggers a rebuild on the remote server:\n\n```bash\nnextcloud-reindex skill.fedwiki.club\n```\n\nThis is needed after bulk page changes — e.g. after running the merge skill's move/trash steps.\n\n## Related Skills\n\n- `agentprivacy-wiki-page` — always reindex after writing pages to a private wiki\n- `agentprivacy-wiki-new-domain` — create a new wiki domain\n- `agentprivacy-wiki-nextcloud-push` — push public wiki pages when sync is stuck\n- `agentprivacy-wiki-merge` — uses nextcloud-reindex after bulk page moves"
    },
    {
      "type": "markdown",
      "id": "b6c633188eb682e0",
      "text": "**Verify:** [agentprivacy.ai](https://agentprivacy.ai) · kept by the Librarian 🗃️ in the Tower's Wikis (the git-less onboarding layer)\n**Upstream:** [skill.fedwiki.club/fedwiki-reindex-skill](https://skill.fedwiki.club/fedwiki-reindex-skill) (+ reindex-fedwiki-skill, merged) — vendored + re-framed; not original agentprivacy authorship"
    },
    {
      "type": "markdown",
      "id": "14f5fcd296831113",
      "text": "## Provenance\nForkable skill page migrated from the agentprivacy skills repo (`persona/agentprivacy-wiki-reindex`, v5.5).\nSource of truth: `agentprivacy-skills-v5`. Fork this page to materialize a local `SKILL.md` via `fedwiki-to-skill`.\n\n*origin: 0xagentprivacy · author: Mitchell Travers*"
    },
    {
      "type": "markdown",
      "id": "9ed167a2dc81a003",
      "text": "# Assets"
    },
    {
      "type": "assets",
      "id": "d5f68dcd24879fb2",
      "text": "wiki-reindex"
    },
    {
      "type": "markdown",
      "id": "56d9a8551c4eb68a",
      "text": "## Navigation\n\n← [[Welcome Visitors]] · [[The Wikis]]"
    }
  ],
  "journal": [
    {
      "type": "create",
      "item": {
        "title": "Wiki Reindex",
        "story": [
          {
            "type": "markdown",
            "id": "9f1ca896e4ea4b14",
            "text": "# Wiki Reindex\n\n**Category** wikis · **Version** 5.5\n\nRebuild the sitemap and search index for a local federated-wiki domain after writing page JSON to disk directly (the server caches status/ indexes and won't notice file writes). Activates after creating/editing/bulk-importing pages, or when the page list or search looks stale. Merges the reindex-fedwiki-skill variant. Kept by the Librarian 🗃️."
          },
          {
            "type": "markdown",
            "id": "4874fff2c757ce57",
            "text": "The `fedwiki-reindex` skill rebuilds the sitemap and search index for a local federated wiki domain. It is needed because the wiki server caches these indexes in each domain's `status/` folder and does not detect when Claude Code writes page JSON files directly to disk.\n\n## Why It's Needed\n\nWhen a page is created or edited through the wiki browser UI, the server updates its index automatically. When Claude writes a page file directly to `~/Music/Guides/Private/{domain}/pages/`, the server doesn't know — two cached files in the `status/` folder go stale:\n\n- `sitemap.json` — the page list used for navigation and federation neighbourhood\n- `site-index.json` — the full-text search index\n\n## How It Works\n\nDelete the stale index files from `status/`, then `curl` the sitemap endpoint to trigger the server to rebuild them immediately.\n\n```bash\nFARM=\"$HOME/Music/Guides/Private\"\nDOMAIN=\"localhost\"\n\nrm -f \"$FARM/$DOMAIN/status/sitemap.json\"\nrm -f \"$FARM/$DOMAIN/status/site-index.json\"\ncurl -s \"http://$DOMAIN/system/sitemap.json\" > /dev/null\necho \"Reindexed $DOMAIN\"\n```\n\n## When to Use\n\n- After Claude creates or edits page JSON files directly on disk\n- After bulk import of pages\n- When the wiki's page list or search results appear incomplete or stale\n\n## Public Wikis — nextcloud-reindex\n\nFor public wikis in `~/Nextcloud/fedwiki/`, the remote server needs its index rebuilt separately using `nextcloud-reindex`. This deletes the index files via WebDAV and triggers a rebuild on the remote server:\n\n```bash\nnextcloud-reindex skill.fedwiki.club\n```\n\nThis is needed after bulk page changes — e.g. after running the merge skill's move/trash steps.\n\n## Related Skills\n\n- `agentprivacy-wiki-page` — always reindex after writing pages to a private wiki\n- `agentprivacy-wiki-new-domain` — create a new wiki domain\n- `agentprivacy-wiki-nextcloud-push` — push public wiki pages when sync is stuck\n- `agentprivacy-wiki-merge` — uses nextcloud-reindex after bulk page moves"
          },
          {
            "type": "markdown",
            "id": "b6c633188eb682e0",
            "text": "**Verify:** [agentprivacy.ai](https://agentprivacy.ai) · kept by the Librarian 🗃️ in the Tower's Wikis (the git-less onboarding layer)\n**Upstream:** [skill.fedwiki.club/fedwiki-reindex-skill](https://skill.fedwiki.club/fedwiki-reindex-skill) (+ reindex-fedwiki-skill, merged) — vendored + re-framed; not original agentprivacy authorship"
          },
          {
            "type": "markdown",
            "id": "14f5fcd296831113",
            "text": "## Provenance\nForkable skill page migrated from the agentprivacy skills repo (`persona/agentprivacy-wiki-reindex`, v5.5).\nSource of truth: `agentprivacy-skills-v5`. Fork this page to materialize a local `SKILL.md` via `fedwiki-to-skill`.\n\n*origin: 0xagentprivacy · author: Mitchell Travers*"
          },
          {
            "type": "markdown",
            "id": "9ed167a2dc81a003",
            "text": "# Assets"
          },
          {
            "type": "assets",
            "id": "d5f68dcd24879fb2",
            "text": "wiki-reindex"
          },
          {
            "type": "markdown",
            "id": "56d9a8551c4eb68a",
            "text": "## Navigation\n\n← [[Welcome Visitors]] · [[The Wikis]]"
          }
        ]
      },
      "date": 1785847257940
    }
  ]
}