llm-wiki-master is a general-purpose skill for building and maintaining persistent LLM-maintained knowledge bases.
It follows the LLM Wiki pattern: raw sources stay immutable, the AI maintains a structured Markdown wiki, and a schema defines how future agents ingest, query, update, lint, and cite knowledge.
This version is based on the open-source llm-wiki-skill project and adds stricter project knowledge-base workflows: multi-source traceability, Lark/Feishu collaboration, Graphify helpers, export quality gates, and checks against empty source pages.
Use this skill when you want an AI agent to maintain durable knowledge instead of answering from raw files every time.
Common uses:
| Scenario | Examples |
|---|---|
| Project handoff | Code repos, architecture docs, local reports, Lark spaces |
| Research | Papers, PDFs, web articles, interview notes |
| Team wiki | Meeting notes, design docs, decision logs |
| Personal knowledge base | Reading notes, goals, learning paths |
| Multi-source analysis | Local files + web + PDFs + videos + Lark + code graphs |
Install with an explicit llm-wiki-master target directory:
# Codex
bash install.sh --platform codex --target-dir ~/.codex/skills/llm-wiki-master
# Claude Code
bash install.sh --platform claude --target-dir ~/.claude/skills/llm-wiki-masterOptional extractors for web pages, X/Twitter, WeChat, YouTube, and Zhihu can be installed separately:
bash install.sh --platform codex --target-dir ~/.codex/skills/llm-wiki-master --with-optional-adapters
bash install.sh --platform claude --target-dir ~/.claude/skills/llm-wiki-master --with-optional-adaptersThe optional LLM Wiki desktop app is not installed silently with the skill. Install it only when you want the local visual UI or API.
Codex:
bash ~/.codex/skills/llm-wiki-master/deps/llm-wiki-app/scripts/install_llm_wiki_app.shClaude Code:
bash ~/.claude/skills/llm-wiki-master/deps/llm-wiki-app/scripts/install_llm_wiki_app.shCheck the local app API after launch.
Codex:
bash ~/.codex/skills/llm-wiki-master/deps/llm-wiki-app/scripts/llm_wiki_app_status.shClaude Code:
bash ~/.claude/skills/llm-wiki-master/deps/llm-wiki-app/scripts/llm_wiki_app_status.shUse llm-wiki-master to initialize this knowledge base.
Use llm-wiki-master to ingest these project docs.
Use llm-wiki-master to refresh the local/Lark source diffs.
Use llm-wiki-master to check whether this wiki has empty source pages or broken links.
Use llm-wiki-master to answer this architecture question and save reusable findings back into the wiki.
Every knowledge base has three layers:
| Layer | Typical Location | Rule |
|---|---|---|
| Raw sources | raw/, .ai-wiki-cache/, local repos, exported docs |
Immutable inputs. Do not rewrite them into summaries. |
| Wiki | wiki/ or docs/ai-wiki/ |
AI-maintained Markdown synthesis. |
| Schema | .wiki-schema.md, schema.md, AGENTS.md, CLAUDE.md |
Operating rules for future agents. |
Generated wiki pages are not more authoritative than their sources. For accuracy-sensitive answers, reopen or cite the underlying raw source.
For project or codebase knowledge bases:
wiki/
├── overview.md
├── knowledge-tree.md
├── modules/
│ └── <module>/
│ ├── index.md
│ ├── design.md
│ ├── implementation.md
│ ├── flows.md
│ ├── risks.md
│ ├── security.md
│ └── source-traceability.md
├── concepts/
├── entities/
├── questions/
├── sources/
├── state/
├── index.md
└── log.md
A useful project wiki is not just a file tree. Each important module should have overview, design, implementation, flows, risks, security, and source traceability pages.
| Source | Source ID Pattern | Notes |
|---|---|---|
| Local file | local:path/to/file.md |
Prefer stable relative paths from the workspace root. |
| Local code | local:path/to/repo or local:path/to/file.go |
Summarize architecture, ownership, APIs, state machines, and risks. |
| Lark / Feishu | lark:<node_token> |
Use lark-reader or project scripts when available. Do not publish raw caches by default. |
| Web page | web:<url> |
Use adapter extraction when installed; otherwise paste or export Markdown. |
pdf:<path> |
Extract text, then visually inspect pages when layout or figures matter. | |
| Video | video:<url> or transcript:<path> |
Prefer transcript extraction. If unavailable, use manual transcription. |
| Graphify | graphify:<query> |
Treat graph output as an auxiliary source, not as final evidence. |
When adding or refreshing sources:
- Capture source state or snapshots.
- Assign stable source IDs.
- Create or update source summary pages.
- Update affected module, concept, entity, and synthesis pages.
- Flag contradictions, superseded claims, and gaps.
- Update
index.md. - Append a parseable entry to
log.md. - Run lint and export quality checks.
Do not create source pages that only contain a path, link, or source_ref. A source page must contain enough preview, status, summary, evidence, or manifest information for a future AI to understand what the source is.
When answering questions:
- Read
index.mdfirst. - Read
knowledge-tree.mdif present. - Read relevant module, concept, entity, source, and question pages.
- Reopen raw sources for high-stakes facts or exact behavior.
- Answer with source IDs.
- Save reusable answers into
questions/or update the related module/concept page.
Useful confidence labels:
| Label | Meaning |
|---|---|
EXTRACTED |
Directly stated by a source. |
INFERRED |
Synthesized by the AI from multiple sources. |
AMBIGUOUS |
Source wording or ownership is unclear. |
UNVERIFIED |
Not yet confirmed against raw source. |
CONTRADICTION |
Sources disagree. |
SUPERSEDED |
Newer source replaces older claim. |
Knowledge bases should be refreshable.
Projects may provide their own source-state scripts, for example:
node scripts/ai-wiki/collect-local-sources.mjs
node scripts/ai-wiki/ingest-lark-space.mjs --root-url "<lark-space-url>"
node scripts/ai-wiki/ingest-lark-space.mjs --root-url "<lark-space-url>" --fetch-contentAfter state refresh:
- Read
state/snapshots and diffs. - Update only affected wiki pages.
- Mark stale or superseded conclusions.
- Update
index.mdandlog.md. - Run quality gates.
Before exporting a wiki to an app, graph viewer, or another AI, run:
bash ~/.codex/skills/llm-wiki-master/scripts/export-quality-gate.sh "<export-root>" "<wiki-root>/state/export-quality-gate.json"The gate checks for:
- source pages that are only
source_ref, path, or link shells (Analysis not available)placeholders- missing source status for
local:*,lark:*,web:*, and related IDs - collection references rendered as broken single-file pages
- broad navigation without actual synthesis
Passing the gate does not prove the wiki is perfect. It prevents the most damaging handoff failures.
Graphify is optional. Use it when a graph already exists:
bash ~/.codex/skills/llm-wiki-master/scripts/graphify-helper.sh status
bash ~/.codex/skills/llm-wiki-master/scripts/graphify-helper.sh query "How does deposit flow through this system?"
bash ~/.codex/skills/llm-wiki-master/scripts/graphify-helper.sh explain "Risk Center"
bash ~/.codex/skills/llm-wiki-master/scripts/graphify-helper.sh path "Bridge" "Indexer"Rules:
- If
graphify-out/graph.jsonexists, use Graphify for scoped architecture and relationship questions. - If no graph exists, fall back to
index.md,knowledge-tree.md, module pages, and source state. - Verify important claims against raw code or documents.
You do not need Obsidian, but it is useful.
| Viewer | Best For |
|---|---|
| Obsidian | Markdown browsing, backlinks, graph view, Dataview |
| LLM Wiki App | Three-pane wiki and knowledge graph reading |
| Self-contained HTML graph | Offline visual browsing |
| Codex / Claude | Maintenance, querying, linting, and updates |
The durable artifact is the Markdown wiki plus its source traceability. Viewers are interchangeable.
nashsu/llm_wiki is an optional cross-platform desktop app. It is useful for browsing the generated wiki and knowledge graph, but it is not required for wiki maintenance.
Install or stage the latest release.
Codex:
bash ~/.codex/skills/llm-wiki-master/deps/llm-wiki-app/scripts/install_llm_wiki_app.shClaude Code:
bash ~/.claude/skills/llm-wiki-master/deps/llm-wiki-app/scripts/install_llm_wiki_app.shDownload without installing.
Codex:
bash ~/.codex/skills/llm-wiki-master/deps/llm-wiki-app/scripts/install_llm_wiki_app.sh --download-onlyClaude Code:
bash ~/.claude/skills/llm-wiki-master/deps/llm-wiki-app/scripts/install_llm_wiki_app.sh --download-onlySupported release families:
| OS | Support |
|---|---|
| macOS Apple Silicon | .dmg and .app.tar.gz |
| macOS Intel | No dedicated latest asset detected; check GitHub Releases manually |
| Windows x64 | setup .exe, .msi, portable .zip |
| Linux x64 | .AppImage, .deb, .rpm |
| Linux arm64/aarch64 | .AppImage, .deb, .rpm |
After launching the app:
- Enable
Settings -> API Server -> Enable local HTTP API. - If token auth is enabled, set
LLM_WIKI_API_TOKEN. - Run:
bash ~/.codex/skills/llm-wiki-master/deps/llm-wiki-app/scripts/llm_wiki_app_status.shClaude Code:
bash ~/.claude/skills/llm-wiki-master/deps/llm-wiki-app/scripts/llm_wiki_app_status.sh- Building only a file index instead of a synthesized wiki.
- Generating empty source pages with only
source_ref. - Treating generated wiki pages as stronger evidence than raw sources.
- Leaving useful answers only in chat history.
- Publishing private Lark or local cache content by accident.
- Treating Graphify, Obsidian, or RAG as the source of truth.
- Skipping diff state, which makes future incremental updates hard.
- Not recording contradictions, uncertainty, or superseded claims.
| File | Purpose |
|---|---|
SKILL.md |
Main operating instructions for agents. |
scripts/source-registry.tsv |
Supported source families and extraction boundaries. |
scripts/dependency-check.sh |
Checks optional Lark/PDF/Graphify/web/video dependency availability. |
scripts/export-quality-gate.sh |
Checks exported wiki pages for empty shells and placeholders. |
scripts/graphify-helper.sh |
Thin Graphify wrapper with wiki fallback behavior. |
templates/project-traceability-template.md |
Claim-to-source traceability template. |
deps/lark-reader/SKILL.md |
Lark/Feishu reader companion skill. |
deps/pdf/SKILL.md |
PDF ingestion companion skill and extraction script. |
deps/graphify/SKILL.md |
Graphify companion skill with install script and CLI wrapper. |
deps/llm-wiki-app/SKILL.md |
Optional LLM Wiki desktop app installer and API checker. |
This skill is based on the public llm-wiki-skill project and the LLM Wiki methodology. The enhanced workflow here keeps the upstream idea but removes project-specific presentation details, focusing on reusable multi-source knowledge-base maintenance.
MIT