LLM Wiki — Build a Compounding Knowledge Base with LLMs
by @fengsusky
Build, maintain, query, archive, and audit a Markdown / Obsidian knowledge Wiki continuously maintained by an LLM. Use this skill to initialize a personal kn...
clawhub install llm-obsidian-wiki📖 About This Skill
name: llm-wiki description: Build, maintain, query, archive, and audit a Markdown / Obsidian knowledge Wiki continuously maintained by an LLM. Use this skill to initialize a personal knowledge base; import raw materials grouped by source under source/ into wiki/; organize articles, papers, book notes, interviews, and meeting notes; maintain source pages, entity pages, concept pages, synthesis pages, comparison pages, and query archive pages; update index.md and log.md; answer questions based on the Wiki and archive answers with long-term value; check broken links, orphan pages, duplicate concepts, outdated conclusions, unlabeled contradictions, encoding corruption, and organizational disorder.
LLM Wiki
Goal
Maintain a Markdown / Obsidian Wiki that is accumulative, linkable, and evolvable. Whenever importing material or answering a question, do not merely generate a summary. Instead, compile new knowledge into existing pages: update entities, concepts, synthesized judgments, comparisons, and query archives so the Wiki becomes more valuable through continued use.
Default Three-Layer Structure
source/ # Raw material layer: factual sources, read-only by default
wiki/ # Knowledge compilation layer: structured Wiki maintained by the LLM
schema/SKILL.md # Convention layer: this skill / schema
Knowledge Root Directory
The Knowledge/ root directory should contain only a small number of structural entry points and tool files. Do not place ordinary knowledge pages there.
Recommended root contents:
Knowledge/
source/
wiki/
schema/
verify_wiki.py # Optional compatibility wrapper delegating to schema/scripts/verify_wiki.py
README.md # Optional: minimal entry point
The root directory should not contain:
If a root entry point is needed, create a minimal Knowledge/README.md that only links to:
[[Knowledge/wiki/README]][[Knowledge/wiki/index]][[Knowledge/wiki/syntheses/Knowledge Wiki Topic Map]][[Knowledge/wiki/log]][[Knowledge/source]]Principle: the root directory is for “entry points”; wiki/ is for “knowledge”.
source/
wiki/
Use English for the default directory names in the English schema:
wiki/
index.md # Main index; keep the English file name
log.md # Operation log; keep the English file name
README.md # Wiki documentation; keep the English file name
sources/
entities/
concepts/
syntheses/
comparisons/
queries/
Conventions:
index.md, log.md, README.md, and schema/SKILL.md, use readable English directory and file names whenever possible.AI Agent.md, OpenClaw.md, Claude Code.md, or Harness Engineering.md.sources/, concepts/, and entities/. If historical empty duplicates are found, clean them up. If they contain content, migrate that content into the canonical directories and update links.source-*, concept-*, or synthesis-*.Page Types
Source Pages: wiki/sources/
Use source pages to summarize and locate a single source. A source page should include:
Entity Pages: wiki/entities/
Use entity pages for people, organizations, products, projects, tools, and similar objects. Entity pages hold facts and background; they should not carry excessively long arguments.
source/ metadata.Recommended structure: Positioning → Key information (structured fact table) → Core capabilities / product features → Role in the knowledge base → Related sources → Related pages
Concept Pages: wiki/concepts/
Use concept pages for methods, patterns, theories, problem framings, frameworks, and similar ideas. Prefer reusing and updating existing concept pages to avoid synonym duplication.
Recommended structure: Definition → Core understanding / judgments → Relationship to neighboring concepts → Related sources → Related pages
Anti-template rules:
Synthesis Pages: wiki/syntheses/
Use synthesis pages for cross-source judgments, frameworks, thematic overviews, case matrices, architecture analyses, and similar compiled knowledge.
Each synthesis page should include at least: a core judgment, multi-source synthesis (not single-source retelling), and cross-references to 3+ source pages.
Comparison Pages: wiki/comparisons/
Use comparison pages to distinguish easily confused concepts, products, paradigms, or solutions, for example Reasoner vs Agent.md.
Recommended structure:
1. One-sentence conclusion; 2. Definitions of the compared objects; 3. Comparison table; 4. Decision method / usage scenarios; 5. Common misconceptions; 6. Relationship to the knowledge-base main threads; 7. Related sources; 8. Related pages.
Minimum quality requirements:
A / B; write the concrete objects being compared.Topic Map Pages: wiki/syntheses/
A topic map page is a type of synthesis page. It organizes the Wiki's long-term reading paths and thematic main threads. Do not place it in the Knowledge/ root directory.
Recommended locations:
wiki/syntheses/Knowledge Wiki Topic Map.mdwiki/syntheses/Agent Engineering Topic Map.mdA topic map should include:
Division of responsibilities with index.md:
index.md keeps the full entry list and page catalog;index.md carry too much explanatory content, otherwise it will become an overly long essay.Query Pages: wiki/queries/
Archive question-and-answer outputs with long-term value as reusable pages. A query page should answer a clear question and link back to related source, concept, and synthesis pages.
Core Workflows
Initialize the Wiki
1. Scan the directories, file types, and source groupings under source/.
2. Create or update wiki/index.md, wiki/log.md, and wiki/README.md.
3. Create source pages for the first batch of materials.
4. Extract entity, concept, synthesis, and comparison pages.
5. Update the index and log.
6. Check broken links, encoding corruption, duplicate directories, and empty directories.
Import Materials
1. Read wiki/index.md first to locate existing related pages.
2. Read the new source and extract its summary, key structure, entities, concepts, and reusable judgments.
3. Create or update the source page.
4. Update existing entity pages, concept pages, and synthesis pages. Prefer updating existing pages; do not lightly create duplicate concepts.
5. Mark relationships: supports, supplements, revises, contradicts, or needs verification.
6. Update wiki/index.md and wiki/log.md.
7. Run broken-link and encoding-corruption checks.
Topic Batch Import
When importing 5 or more materials under the same topic in one batch, do not only create multiple source pages. Establish a topic structure as well.
Steps:
1. Determine whether a corresponding synthesis page or topic-map entry already exists;
2. Create a source page for each source;
3. Create or update a topic synthesis page, for example:
- Claude Code Source Architecture Map
- Agent-Era Startup Methodology
4. Extract shared concepts and entities; avoid creating duplicate concepts for every source;
5. Present the batch as a group in index.md;
6. Add the topic's reading path to the topic map;
7. Record the batch in log.md by topic, rather than as a per-file operation ledger.
Answer Questions Based on the Wiki
1. Read wiki/index.md first.
2. Then read relevant pages. Do not scan the entire Wiki by default.
3. Cite Wiki page links in the answer.
4. If the answer has long-term value, archive it under wiki/queries/ or update a synthesis page.
5. Update wiki/log.md.
Wiki-Layer Reorganization / Thematic Refactoring
Use this when source/ already contains many imported materials, wiki/ has grown in page count, and the user wants to improve navigability, thematic clustering, and long-term maintainability.
Steps:
1. Run the audit script or equivalent checks first, confirming:
- source coverage;
- broken links;
- index coverage;
- UTF-8 issues;
- thin pages / template remnants.
2. Read wiki/index.md, wiki/README.md, wiki/log.md, and existing synthesis pages.
3. Identify the Wiki's thematic main threads; do not organize mechanically by source directory.
4. If the page count is large, create or update a topic map page, for example: wiki/syntheses/Knowledge Wiki Topic Map.md.
5. Clarify the division of responsibilities between index.md and the topic map:
- index.md: full catalog;
- topic map: reading paths, thematic main threads, and knowledge architecture.
6. Prioritize refactoring:
- weak comparison pages;
- thin concept pages;
- synthesis pages with unclear thematic ownership;
- long lists in index.md that are hard to navigate.
7. Update README.md, index.md, and log.md.
8. Finally rerun broken-link, coverage, index, and encoding checks.
Enrich Existing Pages
1. Read the target page and related sources.
2. If the existing sources are insufficient to support a complete concept, external information may be searched and added with attribution.
3. After enrichment, update the page's updated date.
4. Check bidirectional-link completeness.
Page Quality Audit
Regularly check for thin pages and template remnants. Passing broken-link checks does not mean the knowledge quality is sufficient.
Thin Page Identification
The following pages should be reviewed first:
A thin page does not necessarily have to be expanded, but it must be judged:
Template Remnant Check
Search especially for:
A / B placeholder column names;When template remnants are found, rewrite them into concrete judgments based on the original source materials and related pages. Do not merely delete the heading.
Audit Script
The publishable audit script for the current Knowledge Wiki is located at:
python3 Knowledge/schema/scripts/verify_wiki.py
For compatibility with existing commands, this vault also keeps a root-level wrapper:
python3 Knowledge/verify_wiki.py
When publishing the skill, package Knowledge/schema/scripts/verify_wiki.py as scripts/verify_wiki.py inside the skill package, together with SKILL.md; the root-level wrapper is only a convenience entry point for this vault.
Run the audit script after every batch import, refactor, rename, or topic-map update.
Passing criteria:
Sources without ziliao: 0Broken wikilinks: 0Pages not in index.md: 0UTF-8 issues: 0If script output conflicts with human judgment, human inspection takes precedence, but the reason must be recorded in wiki/log.md.
Do not mechanically create low-quality source pages merely to pass the script. Source pages still need to meet the minimum quality standard for source pages.
index.md Specification
wiki/index.md is the navigation entry point. Recommended structure:
# Knowledge Wiki IndexQuick Links
Sources
Entities
Concepts
Syntheses
Comparisons
Queries
Each record should preferably include:
- [[Knowledge/wiki/concepts/Context Engineering]] — one-sentence description; status: evolving.
log.md Specification
wiki/log.md is a date-based timeline for phase-level changes, not an overly granular operation ledger. Update principles:
## YYYY-MM-DD|Topic Overview whenever possible, using ### to group by topic.wiki/queries/. log.md should only link to a summary.Recommended format:
## YYYY-MM-DD|Topic OverviewTopic One
Import/update scope: ...
Created/updated: [[Knowledge/wiki/...]], [[Knowledge/wiki/...]]
Key conclusion: ... Topic Two
... Current To-Dos / Follow-Up Directions
[ ] ...
Common topics:
Frontmatter Recommendations
Source page:
---
type: source
tags: [source-summary]
source_file: "[[Knowledge/source/...]]"
source_name:
author:
url:
created: YYYY-MM-DD
updated: YYYY-MM-DD
status: initialized
Entity page:
---
type: entity
tags: [entity]
created: YYYY-MM-DD
updated: YYYY-MM-DD
status: evolving
Concept page:
---
type: concept
tags: [concept]
created: YYYY-MM-DD
updated: YYYY-MM-DD
status: evolving
Synthesis page:
---
type: synthesis
tags: [synthesis]
created: YYYY-MM-DD
updated: YYYY-MM-DD
status: evolving
Comparison page:
---
type: comparison
tags: [comparison]
created: YYYY-MM-DD
updated: YYYY-MM-DD
status: evolving
Query page:
---
type: query
tags: [query]
created: YYYY-MM-DD
updated: YYYY-MM-DD
status: archived
External Search Boundaries
By default, prioritize internal materials under Knowledge/source/ and Knowledge/wiki/. Do not use external search to replace existing sources.
External search may be used when:
When using external search:
Link Rules
[[Knowledge/wiki/concepts/Context Engineering]].[[...]] links.Encoding Safety Rules
Chinese content must be written as UTF-8. In Windows / PowerShell environments, writing Chinese directly with PowerShell here-strings, Add-Content, or Set-Content can easily produce question-mark corruption.
Prefer:
apply_patch to modify Markdown;.py script and write text with Path.write_text(..., encoding="utf-8");read_text(..., encoding="utf-8").Avoid:
After every batch write, check for:
Images and Attachments
source/ by default, unless the user requests it or the image is critical for long-term understanding.![[image.png]].Safety Principles
README.md should keep its English name.