---
name: LLM Wiki Manager
slug: llm-wiki-manager-2
category: AI Engineering
description: LLM Wiki Manager ingests sources into an LLM-compiled wiki, compiles articles, and supports querying, linting, auditing, archiving, and session capture. Use it for wiki workflows, idea curation, portfolios, datasets, and related knowledge-base management.
github: "https://github.com/nvk/llm-wiki/tree/master/plugins/llm-wiki-opencode/skills/wiki-manager"
language: Python
stars: 1053
forks: 104
install: "npx degit https://github.com/nvk/llm-wiki/tree/master/plugins/llm-wiki-opencode/skills/wiki-manager ~/.claude/skills/wiki-manager"
installs_to: ~/.claude/skills/wiki-manager
source_path: plugins/llm-wiki-opencode/skills/wiki-manager/SKILL.md
collection_size: 6
category_size: 2451
collection_url: "https://dirskills.com/collections/nvk/llm-wiki"
added: 2026-08-21T05:13:41.391Z
last_synced: 2026-08-21T05:13:41.391Z
canonical_url: "https://dirskills.com/skills/llm-wiki-manager-2"
---

# LLM Wiki Manager

LLM Wiki Manager ingests sources into an LLM-compiled wiki, compiles articles, and supports querying, linting, auditing, archiving, and session capture. Use it for wiki workflows, idea curation, portfolios, datasets, and related knowledge-base management.

**Install:**

```bash
npx degit https://github.com/nvk/llm-wiki/tree/master/plugins/llm-wiki-opencode/skills/wiki-manager ~/.claude/skills/wiki-manager
```

## README

# LLM Wiki Manager

You manage an LLM-compiled knowledge base. Source documents are ingested into `raw/`, then incrementally compiled into a wiki of interconnected markdown articles. OpenCode is both the compiler and the query engine.

## OpenCode Integration Notes

This skill is loaded as an instruction file. OpenCode does not have Claude-style `/wiki:*` slash commands or Codex-style `@wiki` invocations. Treat any `/wiki:*` references in this skill and its references as shorthand for the equivalent natural-language request. For example, `/wiki:compile` means the user is asking you to compile the wiki.

OpenCode's built-in tools (`read`, `write`, `edit`, `glob`, `grep`, `bash`, `webfetch`, `websearch`) map directly to the tools this skill requires. Web search requires `OPENCODE_ENABLE_EXA=1` in the environment.

**Permissions**: OpenCode sandboxes file access to the project directory. The wiki hub at `~/wiki/` is external. Add `external_directory` permissions in `opencode.json` to allow access: `{ "permission": { "external_directory": { "~/wiki/**": "allow", "~/.config/llm-wiki/**": "allow" } } }`. If your configured hub uses another absolute path (for example iCloud Drive), add that path too. Alternatively, use `--local` mode to keep everything in `.wiki/` inside the project.

## Hub Path

**Resolution**: At the start of every operation, resolve **HUB** by reading `~/.config/llm-wiki/config.json` first. Prefer `hub_path`: expand the leading `~` only (not tildes in `com~apple~CloudDocs`) on the current machine. Treat `resolved_path` as a legacy cache only: use it when no `hub_path` exists, or as a fallback if the expanded `hub_path` is unavailable and `resolved_path` is initialized. Do not write machine-specific `resolved_path` values into shared configs. If no config file exists, try `~/wiki/_index.md` as a fallback. If `stat`/existence checks succeed but reading `wikis.json` or listing `topics/` fails with `Operation not permitted`, the hub path is correct and macOS is blocking this process; tell the user to grant Full Disk Access or iCloud Drive access to the exact app launching the agent and restart. Do not switch to `~/wiki` or `resolved_path` for that error. See [references/hub-resolution.md](references/hub-resolution.md) for the full protocol.

The config file looks like:

```json
{
  "hub_path": "~/Library/Mobile Documents/com~apple~CloudDocs/wiki"
}
```

If no config exists and `~/wiki/` has `_index.md`, that works too. But config is checked first — in sandboxed environments `~/wiki/` may not be accessible. All references to `~/wiki/` below mean HUB.

## Wiki Location

**Topic sub-wikis are the default.** HUB is a hub — content lives in `HUB/topics/<name>/`. Each topic gets isolated indexes, sources, and articles. This keeps queries focused and prevents unrelated topics from polluting each other's search space.

For collection families that will grow across subjects, prefer kind-first topic
slugs such as `memes-bitcoin`, `memes-ethereum`, `tools-bitcoin`, or
`examples-seedqr`. Use subject-first slugs when the subject is the primary
research area and the collection is only one artifact within that topic.

Resolution order:

1. `--local` flag → `.wiki/` in current project
2. `--wiki <name>` flag → named wiki from `HUB/wikis.json`; resolve registry paths as `<HUB>`, `~`, absolute, or relative to HUB, and fall back to `HUB/topics/<name>` if a registry path is stale
3. Current directory has `.wiki/` → use it
4. Otherwise → HUB (the hub)

When a command targets the hub and the hub has no content, suggest creating a topic sub-wiki instead.

See [references/wiki-structure.md](references/wiki-structure.md) for the complete directory layout and all file format conventions.

## Core Principles

1. **Indexes are a derived cache.** The `.md` files and their YAML frontmatter are the source of truth. `_index.md` files are a cached view rebuilt on read when stale. Always read indexes first for navigation — but before trusting one, stale-check it (file count vs row count). See [references/indexing.md](references/indexing.md) for the Derived Index Protocol.

2. **Raw is immutable.** Normal workflows never modify ingested sources. Explicit retraction runs first via hidden-input `scripts/llm-wiki retract`; content, archives, and sessions cannot veto it.

3. **Articles are synthesized, not copied.** A wiki article draws from multiple sources, contextualizes, and connects to other concepts. Think textbook, not clipboard.

4. **Dual-linking for Obsidian + OpenCode.** Cross-references use both `[[wikilink]]` (for Obsidian graph view) and standard markdown `[text](path)` (for OpenCode navigation) on the same line: `[[slug|Name]] ([Name](../category/slug.md))`. Bidirectional when it makes sense.

5. **Frontmatter is structured data.** Every `.md` file has YAML frontmatter with title, summary, tags, dates. This makes the wiki searchable without full-text scans.

6. **Incremental over wholesale.** Compilation processes only new sources by default. Full recompilation is expensive and explicit (`--full`).

7. **Honest gaps.** When answering questions, if the wiki doesn't have the answer, say so. Never hallucinate. Suggest what to ingest to fill the gap.

8. **Multi-wiki awareness.** When querying, answer from the primary wiki first. Then peek at sibling wiki indexes (via `HUB/wikis.json`) for relevant overlap. Flag connections but never merge content across wikis.

9. **Chunk large writes.** Never create files longer than ~200 lines in a single Write call — the API stream idles during large generations, causing timeout errors. Write the skeleton (frontmatter + headers + first section) first, then use sequential Edit calls to append remaining sections. For plans, articles, and raw notes: write one section per tool call.

10. **Archive is quiet preservation.** Archived topic wikis live under
`HUB/topics/.archive/<slug>/` and are hidden from normal semantic workflows.
They remain structurally maintainable through explicit archive/lint operations.
Deep queries may surface archived index matches separately, but archived content
must not influence new synthesis unless the user explicitly includes it.

11. **Session capture is operational memory.** Harness session digests live in
`HUB/.sessions/` or `.wiki/.sessions/`, not in topic `raw/` by default.
Automated hooks may capture redacted checkpoints, but promotion into topic wikis
is explicit and user-directed.

12. **Feedback is candidate memory.** User corrections, preferences, approvals,
and plan-acceptance signals may be captured as redacted candidates under
`HUB/.sessions/feedback/`, but generic acknowledgements are ignored and durable
wiki promotion remains explicit.

13. **Private adapters are a content-free external execution plane.** Their
machine-local registry lives under `~/.config/llm-wiki/`, not in the hub.
Adapter repositories contain tool code only; real inputs and all runtime
outputs remain in separately controlled external data planes. Only reviewed
`wiki-safe` candidates may enter the wiki through normal provenance and
compilation workflows. See
[references/adapters.md](references/adapters.md).

14. **Specialists are bounded methods, not credentials.** Personal,
instruction-only specialist packages live locally under `HUB/.skills/` and are
enabled per active topic. Loading one never grants tools, write access, professional
authority, or permission to spawn agents. Select the minimum useful method,
preserve disagreement, and record its version/hash. See
[references/specialists.md](references/specialists.md).

## Adapter Routing

For an action plus URL, run `adapter route --intent <effect> --resource <url>
--json` before ingestion. On a match, read its adapter-owned guide; provider
steps live there. A URL alone is not write authorization. See
[references/adapters.md](references/adapters.md).

Explicit `wiki skill-factory <request>` selects the registered named adapter;
do not invent a URL route. Run show/doctor and read its guide. It never
activates ambiently, and its external candidates remain disabled; installation,
topic enablement, commit, and publication are separate actions.

## Ambient Behavior

When this skill activates outside of an explicit wiki-related request:

1. Resolve the hub path (see Hub Path section above), then check if `HUB/_index.md` or `.wiki/_index.md` exists
2. Read the master `_index.md` to assess if the wiki might cover the user's question
3. If relevant content exists → read the relevant articles and answer with citations
4. If no relevant content → answer normally, optionally suggest: "This could be added to your wiki — just ask me to ingest it."
5. When peeking at sibling wikis, only read their `_index.md` — do not read full articles unless the user asks. Skip archived sibling wikis by default; in deep mode, archived index matches may be reported separately.

When giving any boot, resume, or "where you left off" briefing, start with the
active wiki identity: `<wiki-name> booted from <wiki-root-path>`. Prefer the
`config.md` title; for local `.wiki/` projects, fall back to the parent
directory name; for `HUB/topics/<slug>/`, fall back to the slug. Include this
line even when there is nothing in flight to resume.

If the user asks whether they can trust a wiki artifact, requests an audit,
mentions provenance or drift, or asks for content verification beyond a normal
query, use the Audit workflow instead of treating it as plain Q&A.

## Workflows

### Ingestion
See [references/ingestion.md](references/ingestion.md).
Flow: Source (URL/file/text/tweet/inbox) → fetch/read → extract metadata → write to `raw/{type}/` → update indexes → suggest compile if many uncompiled.

### Collection Ingestion
See [references/ingestion.md](references/ingestion.md) § Collection Ingestion.
Flow: structured upstream collection (Git repo, BIP-style proposal set, MediaWiki dump/API) → upstream item inventory → write a `raw/repos/` manifest plus immutable child sources → rebuild raw indexes → optionally compile synthesized clusters. Use `/wiki:ingest-collection` for bulk imports; never recursively crawl HTML.

### Private Adapters
See [references/adapters.md](references/adapters.md).
Flow: explicitly register an existing local adapter checkout → declare read and
write roots → verify the manifest hash and `describe` handshake → execute a v1
JSON request through the bundled deterministic CLI → verify artifact paths and
hashes → leave all outputs external → optionally review only `wiki-safe`
candidates and promote the smallest useful evidence through normal wiki writes.
Never clone, install, update, publish, or auto-promote an adapter.

### Personal Specialist Skills
See [references/specialists.md](references/specialists.md).
Flow: maintain user-owned instruction-only `SKILL.md` methods under
`HUB/.skills/` → validate structure and safety boundaries → explicitly enable
stable names per active topic → select zero to three by task features, normally
one → give selected methods the same bounded evidence packet → verify and
synthesize by evidence strength → record name, version, and content hash. Use
`/wiki:specialist suggest` for an index-first candidate scan and
`/wiki:specialist apply` for a bounded review. Do not treat titles such as CFO,
doctor, MBA, or PhD as credentials or capability upgrades.

### Inventory
See [references/inventory.md](references/inventory.md).
Flow: Run an inventory fit check → track durable wiki-adjacent things (items, Ideas, ingest candidates, entities, corpora, questions, tasks, watch items) as markdown records under `inventory/` → answer list requests from indexes/frontmatter as compact chat tables or bullets → optionally save derived views under `inventory/views/` → optionally convert legacy queue-like outputs through explicit dry-run-first migration. Inventory migration is additive and human-gated. Be explicit when something is too small for inventory, too large and should be a dataset/collection, or outside wiki scope.

### Ideas
See [references/ideas.md](references/ideas.md).
Flow: capture in `inventory/ideas/` → research/shape → require approval →
freeze `BRIEF.md` and promote. The Idea keeps lineage; the Project owns delivery.

### Portfolio
See [references/portfolio.md](references/portfolio.md).
Flow: read active Idea indexes and Project `WHY.md` files → cross-link only
explicit lineage → render separate read-only tables without copying records.

### Collect
See [references/inventory.md](references/inventory.md) and
[references/research-infrastructure.md](references/research-infrastructure.md).
Flow: Scope a bounded catalog request → infer scale and media policy → search
for candidate artifacts, examples, resources, entities, tools, media, or memes
→ fetch only promising context pages → deduplicate aliases/reposts/rehosts →
record `found_in_context` provenance and media metadata → save a
`type: collection` output under `output/collect-<slug>-YYYY-MM-DD.md` →
optionally create inventory records when the list is small and durable enough,
or one corpus record when it is medium/large. Collect outputs are useful to the
LLM as a staging layer before promotion into `raw/`, `wiki/`, `inventory`, or
`datasets`; they do not replace raw sources for factual claims. Download and
hash bounded public binary media into `output/assets/collect-<slug>/` by
default for media-bearing collections, never store binaries in `raw/`, and use
defensive download settings: timeouts, file-size caps, content-type checks, and
IPv4 retry (`curl -4`) when media hosts hang on IPv6. Do not pretend that "all"
means exhaustive beyond the stated strategy and limit.

### Dataset Registry
See [references/datasets.md](references/datasets.md).
Flow: Keep large or external datasets out of the wiki while indexing them through `datasets/<slug>/MANIFEST.md` → store locations, schema notes, small samples, profiles, and query recipes → answer list requests from `datasets/_index.md` plus manifest frontmatter only → optionally convert legacy dataset outputs through explicit dry-run-first migration. Dataset migration is additive and never copies the underlying data into the wiki.

### Archive
See [references/archive.md](references/archive.md).
Flow: Move whole topic wikis from `HUB/topics/<slug>/` to
`HUB/topics/.archive/<slug>/` → mark `wikis.json` with `status: archived` →
hide them from normal query/compile/research/collect/output/maintenance context →
restore by moving the folder back and setting `status: active`. Do not archive
individual raw sources or compiled articles in v1.

### Compilation
See [references/compilation.md](references/compilation.md).
Flow: Survey uncompiled sources → plan articles → classify (concept/topic/reference) → write/update articles with cross-references → update all indexes.

### Query
Flow: Read `_index.md` → identify relevant articles by summary/tag → read articles → follow See Also links → Grep for additional matches → synthesize answer with citations → note gaps → peek active sibling wikis. Supports `--resume` to reload context after a session break — reads session files, recent log entries, wiki stats, and last-updated articles to produce a "where you left off" briefing. Deep queries may peek archived sibling indexes in a separate Archived Matches section; full archived reads require explicit user intent.

### Linting
See [references/linting.md](references/linting.md).
Flow: Check structure → indexes → links → content → coverage → report → optionally auto-fix. Default lint keeps active material healthy and reports archived topics as skipped. Use `--include-archived` or `--archived-only` for explicit archived structural maintenance.

### Librarian
See [references/librarian.md](references/librarian.md).
Flow: Scan the active topic's compiled `wiki/` layer → score staleness, quality,
source-chain integrity, and link health → write `.librarian/scan-results.json`
and `.librarian/REPORT.md` → recommend ranked next actions. Optional
`--passes conventions` (or legacy `schema`) may write a proposal output for
topic-guide improvements. Topic guides are default for new topic wikis; older
wikis can adopt one with `llm-wiki schema adopt` or `llm-wiki lint --fix`. Librarian
must not rewrite `schema.md` without explicit user acceptance.
Librarian is the article-health advisor; it does not replace lint's structural
checks or audit's broader trust review.

### Audit
See [references/audit.md](references/audit.md).
Flow: Run or reuse the librarian pass → inspect artifact dependency chains across `output/`, `wiki/`, and `raw/` → escalate with fresh source checks and targeted research until trust verdicts converge → write `.audit/REPORT.md`.

### Search
Flow: Scan indexes for summary/tag matches → Grep full-text → rank results → present.

### Cross-Workflow Inventory Awareness
Inventory is first-class operational state, not a silo. Other workflows should
notice it without treating it as factual evidence:

- Ingest and ingest-collection: if the user wants to track before ingesting, or
  a source is too large/ambiguous, suggest an inventory record. When an
  inventory candidate is ingested, link the resulting raw or collection
  manifest from the record.
- Dataset: link dataset manifests to inventory records when the user cares
  about next actions, priority, acceptance state, or why the corpus matters.
- Compile and query: use inventory to surface gaps, candidates, and next
  actions, but cite raw/wiki sources for factual claims.
- Collect: write the catalog as an output first, then create per-item inventory
  records only for small durable lists; use one corpus record for medium/large,
  unstable, or media-heavy collections.
- Research, audit, librarian, refresh, plan, and output: propose inventory
  records for durable follow-ups, stale items, source queues, or watch lists,
  but show a sample before creating a larger backlog.

### Sessions
See [references/sessions.md](references/sessions.md).
Flow: Opt in with `session enable` → harness hooks append redacted events under
`HUB/.sessions/queue/` → session state and markdown digests update at tool-count,
compaction, stop/session-end, or manual checkpoints → `session rehydrate` returns
a compact context block → `session promote` explicitly copies the distilled
digest into a topic `raw/notes/` note. Automated capture is allowed; automated
promotion is not.

### Feedback Curator
See [references/feedback.md](references/feedback.md).
Flow: trusted user-prompt hooks or `feedback capture` classify high-signal user
corrections, preferences, approvals, and plan-acceptance turns → append redacted
candidates under `HUB/.sessions/feedback/` → `feedback list/show` review them →
`feedback promote` explicitly writes selected candidates into topic `raw/notes/`.
Ignore generic acknowledgements unless manually captured.

### Output
Flow: Gather relevant articles → generate artifact (summary/report/slides/etc) → save to `output/` → update indexes.

### Lessons Learned (ll)
Flow: Scan session for error→fix patterns, corrections, discoveries → extract structured lessons → write to `raw/notes/` with `type: lessons-learned` → optionally update relevant articles → optionally suggest CLAUDE.md rules.

## Links: File Paths and URLs

Terminal links break when they wrap to a second line. Rules for all wiki operations:

1. **Full absolute paths** — expand `~`, HUB, and all relative segments. Relative paths are not clickable.
2. **Markdown link syntax for URLs** — use `[short text](url)`, never bare long URLs that wrap and break.
3. **No indentation before links** — indentation eats terminal width. Put links flush-left on their own line.
4. **One link per line** — don't embed a long path mid-sentence. Break it out:
   ```
   Saved to:
   /Users/name/wiki/topics/my-topic/output/report-2026-04-08.md
   ```

See `references/research-infrastructure.md` § Agent Prompt Templates for examples. Applies to ingest, compile, collect, research, output, assess.

## Acti
