# Wiki Hub

> GitHub wiki merger. Use when the user wants to merge, diff, or manage external wiki sources. Trigger on commands: /wiki-hub-merge, /wiki-hub-diff, /wiki-hub-backup, /wiki-hub-status, /wiki-hub-rollback, /wiki-hub-sources, /wiki-hub-source-check, /wiki-hub-source-update, /wiki-hub-source-remove, /wiki-hub-ontology-diff, /wiki-hub-ontology-merge.

- Skill: `godstale/wiki-hub` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds@latest add godstale/wiki-hub`
- Raw SKILL.md: https://api.skillmd.com/api/skills/godstale/wiki-hub/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: godstale (https://skillmd.com/u/godstale)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/godstale/wiki-hub

---


# Wiki-Hub

Merges an external GitHub repo's LLM-Wiki output into the current project wiki using LLM-based synthesis.

## Core Commands

### /wiki-hub-browse
Browse all available wikis from the global registry.
- Run `python scripts/hub_search.py browse`

### /wiki-hub-search `<keyword>`
Search the global registry for specific wikis.
- Run `python scripts/hub_search.py search <keyword>`

### /wiki-hub-merge `<owner/repo>`
Merges an external wiki.
- **Procedure**: Follow `references/merge-procedure.md`
- **Note**: Tracks file ownership in `wiki-hub.md` (does not modify `wiki/` frontmatter).

### /wiki-hub-export
Update version and timestamp in `wiki-hub.md` before sharing.
- Run `python scripts/hub_export.py`

### /wiki-hub-lint
Verify wiki health and merge integrity.
- Run `python scripts/hub_lint.py`

### /wiki-hub-diff `<owner/repo>`
... (rest of commands)
Compare external wiki with local.
1. Run `hub_download.py <owner/repo>`
2. Run `hub_diff.py <owner/repo>`
3. Output results using format in `references/diff-format.md`

### /wiki-hub-ontology-diff `<owner/repo>`
Compare external ontology with local.
1. Run `hub_download.py <owner/repo>`
2. Run `hub_ontology_diff.py <owner/repo>`
3. Output results using format in `references/ontology-diff-format.md`

### /wiki-hub-ontology-merge `<owner/repo>`
Standalone ontology merge.
- **Procedure**: Follow `references/ontology-merge-procedure.md`

### /wiki-hub-backup
Manual snapshot of current wiki.
- Run `hub_backup.py --label manual`

### /wiki-hub-status
Show merge history, snapshots, and cache.
- Run `hub_status.py`

### /wiki-hub-rollback
Restore a previous snapshot.
- **Procedure**: Follow `references/rollback-spec.md`

### /wiki-hub-sources
List all imported sources and their metadata.
- Run `hub_sources.py list`

### /wiki-hub-source-check `[<owner/repo>]`
Check for updates from one or all sources.
- Run `hub_sources.py check` (or with `<owner/repo>` or `--all`)

### /wiki-hub-source-update `<owner/repo>`
Refresh an existing source (full merge flow).
- **Procedure**: Same as `/wiki-hub-merge`

### /wiki-hub-source-remove `<owner/repo>`
Remove a source from registry and index.
1. Auto-backup: `hub_backup.py --label pre-remove --source-repo <owner/repo>`
2. Run `hub_sources.py remove <owner/repo>`
3. Clean up `wiki/index.md` and log to `wiki/log.md`.

---

## Technical Guardrails

### ⚠️ Gotchas (Critical)
- **UTF-8 Safety**: Never use shell `copy`, `cat`, or `echo` for wiki files/logs on Windows. Use **Read/Write/Edit tools** only.
- **Mandatory Snapshots**: Auto-backup is required before any destructive operation (merge, rollback, remove).
- **Scope**: `graph/` is never merged; regenerate with `/wiki-graph`.
- **Frontmatter**: `source_repo` tag only for **NEW** files.
- See `references/gotchas.md` for more.

### 🛡️ Careful Mode
When performing `/wiki-hub-merge` or `/wiki-hub-source-remove`:
1. **Always** verify the current branch is clean (`git status`).
2. **Always** check for existing snapshots before creating a new one to avoid name collisions.
3. If more than 10 files are CONFLICT, ask for user confirmation before proceeding with bulk LLM merging.

