Logo: Llm Wiki

Llm Wiki

Communautéit
lewislulu
llm-wiki

Build and maintain a Karpathy-style LLM knowledge base — a self-compiling Obsidian markdown wiki where an Agent ingests raw sources, compiles cross-linked concept/entity/summary pages, answers queries against the corpus, lints the graph for health, and audits in-context human feedback filed from Obsidian or the local web viewer. Use when (1) scaffolding a new knowledge base for any research topic, (2) ingesting articles/papers/PDFs/web pages into raw/, (3) compiling or restructuring wiki articles from existing raw material, (4) answering questions against the wiki and filing durable answers back, (5) running lint passes for dead links / orphan pages / coverage gaps / audit shape, (6) processing human feedback from the audit/ directory and applying corrections. Not for general note-taking, daily journals, or non-wiki Obsidian use.

Iwwersiicht

Editeurlewislulu
Repositoryllm-wiki-skill
Skill-Nummllm-wiki
Stären
655
Forks
104
Matgeliwwert Dateien
8
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 8 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    lewislulu huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Llm Wiki an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/lewislulu/llm-wiki-skill/tree/main/llm-wiki
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lewislulu/llm-wiki-skill.git /tmp/llm-wiki-skill
mkdir -p .claude/skills
cp -r /tmp/llm-wiki-skill/llm-wiki .claude/skills/llm-wiki
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Llm Wiki an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Llm Wiki automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Llm Wiki net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

LLM Wiki — Karpathy Knowledge Base Pattern

Experimental skill — iterating. Authored by Lewis Liu (lylewis@outlook.com) · Inspired by Karpathy's llm-wiki Gist

Core idea

Instead of RAG (re-retrieving raw docs on every query), the LLM compiles raw sources into a persistent, cross-linked wiki. Every ingest, query, lint, and audit pass makes the wiki richer. Knowledge compounds — and the human stays in the loop via a structured feedback channel instead of ad-hoc corrections that get lost.

  • You own: sourcing raw material, asking good questions, steering direction, filing feedback on anything the AI got wrong.
  • LLM owns: all writing, cross-referencing, filing, bookkeeping, and acting on your feedback.

The wiki is a living artifact with five operations — compile, ingest, query, lint, audit. Every session starts by reading CLAUDE.md and wiki/index.md.

Directory layout

<wiki-root>/
├── CLAUDE.md          ← Schema: scope, conventions, current articles, gaps
├── log/               ← Per-day operation log (one file per day)
│   ├── 20260409.md
│   └── 20260410.md
├── audit/             ← Human feedback inbox (one file per comment)
│   ├── 20260409-143022-claude-code-size.md
│   └── resolved/      ← Processed feedback, archived with resolution notes
├── raw/               ← Immutable source documents (LLM reads, never writes)
│   ├── articles/
│   ├── papers/
│   ├── notes/
│   └── refs/          ← Pointer files for large binaries kept outside raw/
├── wiki/              ← LLM-generated knowledge (LLM writes, you read)
│   ├── index.md       ← Master catalog — every page, structured by category
│   ├── concepts/      ← Concept/topic pages (split into subfolders when >1200 words)
│   ├── entities/      ← People, tools, papers, organizations
│   └── summaries/     ← Per-source summary pages
└── outputs/
    └── queries/       ← Query answers (promote durable ones to wiki/)

CLAUDE.md is the schema file — the single most important configuration. It tells the LLM the wiki's scope, naming conventions, current article list, open questions, and research gaps. Read references/schema-guide.md for what to put in it. Read it at the start of every session.

Core principles

Four rules govern everything below. If a future instruction contradicts one, flag it to the user before acting.

1. Divide and conquer

A single concept page should never try to cover a complex topic end-to-end. Target: 400–1200 words per page. When a topic would blow past that:

  • Create a subfolder: wiki/concepts/<topic>/
  • Put a short index page at wiki/concepts/<topic>/index.md — definition, list of sub-pages, one-line summaries
  • Put each aspect in its own file: wiki/concepts/<topic>/<aspect>.md
  • In wiki/index.md, show the hierarchy via indented bullets

Example layout (from a real wiki):

wiki/tech/claude-code/
├── index.md                         (overview + links to sub-pages)
├── Claude_Code_Architecture.md
├── Claude_Code_Agent_Framework.md
├── Claude_Code_Bridge_System.md
├── Claude_Code_Query_Engine.md
├── Claude_Code_Skills_Plugins.md
├── Claude_Code_State_Management.md
└── Claude_Code_Tool_System.md

One fat file covering all seven aspects would be unreadable and unlinkable. Seven focused files + an index page give you navigation, selective reading, clean backlinks, and small audit targets.

2. Mermaid for diagrams, KaTeX for formulas

  • Any flow, sequence, hierarchy, or state diagram must be written in mermaid — never ASCII art. ASCII boxes rot fast and are impossible to annotate.
    ```mermaid
    flowchart LR
        A[raw/article.md] --> B[summary]
        B --> C[concept page]
        C --> D[index.md]
    ```
  • Any formula must be written in KaTeX: inline $f(x) = \sum_i w_i x_i$ or block $$...$$.

Both render in the web viewer (server-side KaTeX, client-side mermaid) and in Obsidian with default settings.

3. Raw file policy

Small text-based sources (md, txt, small pdfs, small images) → copy into raw/<subfolder>/.

Large binaries (videos, model weights, installers, datasets, large PDFs >10 MB) → do not copy. Instead:

  • Create a pointer file at raw/refs/<slug>.md with:
    yaml
    ---
    kind: ref
    external_path: /Volumes/external/models/llama-3-70b/
    size: ~140 GB
    ---
    followed by a short description of what it is and why it matters to this wiki.
  • Wiki pages cite [[raw/refs/<slug>]] exactly like any other source.

This keeps the wiki repo git-friendly and portable.

4. Audit is the human feedback surface

The wiki is AI-written; it will be wrong sometimes. The raw sources are human-written; they will contradict each other. The audit/ directory is how humans correct both without losing the corrections in chat history.

  • Humans file feedback via the Obsidian plugin or the web viewer. Each feedback is one file in audit/ with YAML frontmatter (anchor, target, severity) and a markdown body.
  • The AI must periodically run the audit op — never silently ignore audit/*.md files.
  • When feedback is applied, the file moves to audit/resolved/ with a # Resolution section appended and a log entry recorded in log/YYYYMMDD.md.

See references/audit-guide.md for the full file format and processing workflow.


The five operations

Every action on the wiki is one of these five. Each appends an entry to the current day's log file (log/YYYYMMDD.md).

1. compile

(Re)structure wiki content from existing raw/ material — including splitting oversized pages, merging near-duplicates, and rebuilding index.md.

When to run: after a big ingest batch, when an existing page has outgrown 1200 words, when index.md no longer reflects reality, or when the user says "clean up the wiki".

Steps:

  1. Read CLAUDE.md, wiki/index.md, and every file in the target subtree.
  2. For each page over ~1200 words: plan a split into concepts/<topic>/ with an index + sub-pages. Confirm the plan with the user before writing.
  3. For each pair of near-duplicate pages: propose a merge. Confirm, then rewrite.
  4. Regenerate wiki/index.md so every page is listed exactly once.
  5. Log: ## [HH:MM] compile | <what you did — files touched, splits, merges>

2. ingest

Add a new source. One source typically touches 5–15 wiki pages.

Steps:

  1. Save source to the right subfolder:
    • web article → raw/articles/<slug>.md
    • paper → raw/papers/<slug>.md (extracted text for big PDFs)
    • note → raw/notes/<slug>.md
    • large binary → raw/refs/<slug>.md pointer file (see raw file policy)
  2. Read the source in full.
  3. Create wiki/summaries/<slug>.md (200–400 words — key takeaways, not a rewrite; see references/article-guide.md).
  4. Create or update relevant concept pages in wiki/concepts/. Respect divide-and-conquer: if a concept page would exceed 1200 words, split instead of cramming.
  5. Create or update entity pages in wiki/entities/ for any new people / tools / papers / organizations referenced.
  6. Update wiki/index.md so the new pages appear under the right category.
  7. Log: ## [HH:MM] ingest | <slug> — <one-line description> (touched N pages)

3. query

Answer a question grounded in the wiki, not general knowledge.

Steps:

  1. Read wiki/index.md. Scan for relevant pages by category.
  2. Read the identified pages in full; follow one level of wikilinks.
  3. If the wiki doesn't have enough material, say so and suggest what to ingest next instead of making something up.
  4. Synthesize the answer, citing pages inline with [[Page Name]].
  5. Save to outputs/queries/<YYYY-MM-DD>-<question-slug>.md.
  6. If the answer is durable (a comparison, analysis, or new synthesis) → promote a cleaned-up version to wiki/concepts/, add to index.md.
  7. Log: ## [HH:MM] query | <question-slug> (and a separate ## [HH:MM] promote | ... line if promoted).

4. lint

Health check. Run:

bash
python3 scripts/lint_wiki.py <wiki-root>

The script reports:

  • Dead wikilinks — [[Target]] where Target.md doesn't exist
  • Orphan pages — pages with no inbound wikilinks
  • Missing index entries — pages not listed in wiki/index.md
  • Frequently-linked missing pages — [[X]] referenced 3+ times but no page
  • log/ shape — stray files or wrong filenames in log/
  • audit/ shape — malformed YAML frontmatter in audit/*.md
  • Audit target resolution — every open audit's target file must exist

For each issue, propose a fix, confirm with the user, then apply. Log: ## [HH:MM] lint | <N> issues found, <M> fixed.

5. audit

Process human feedback from audit/.

Steps:

  1. Run python3 scripts/audit_review.py <wiki-root> --open to get a grouped list.
  2. For each open audit, read the file. Use the anchor_before / anchor_text / anchor_after window to locate the exact range in the target file (line numbers may have drifted).
  3. Decide the action:
    • Accept: apply the correction to the target file.
    • Partially accept: apply what makes sense, note the rest in the resolution.
    • Reject: explain why in the resolution — the feedback may be based on a misreading of scope or a contradictory source.
    • Defer: add to CLAUDE.md "Open research questions" and leave the audit in place with a comment.
  4. For applied audits, append a # Resolution section to the audit file:
    markdown
    # Resolution
    
    2026-04-10 · accepted.
    Fixed the file count (was "~1,900", corrected to "~1,800" per commit abc123).
    Updated: tech/Claude_Code.md lines 47–48.
  5. Move the file from audit/ to audit/resolved/. Filename unchanged.
  6. Log per resolved audit:
    ## [HH:MM] audit | resolved 20260409-143022-a1b2 — <one-line what>
  7. Never delete audit files. Rejected ones still go to resolved/ with the rejection rationale in their resolution section — that's valuable history.

See references/audit-guide.md for the full audit file format.


Tooling

ToolPurpose
ObsidianIDE for browsing the wiki; graph view shows connections
plugins/obsidian-audit/Obsidian plugin — select text → add feedback → writes to audit/
web/Local Node.js server — preview the wiki with mermaid/math rendered; select → feedback → audit/
scripts/scaffold.pyBootstrap a new wiki directory tree
scripts/lint_wiki.pySeven-pass health check
scripts/audit_review.pyGroup open/resolved audits by target file
qmdOptional local semantic search (useful at >100 pages)

The Obsidian plugin and the web viewer both write audit files in the same format with the same anchor algorithm, so feedback filed from either place can be resolved by either place.

Starting a new wiki

bash
python3 scripts/scaffold.py <wiki-root> "<Topic Title>"

Creates the full tree (including log/<today>.md, audit/, audit/resolved/), a blank CLAUDE.md based on the new template, and a blank wiki/index.md with the recommended category layout.

After scaffolding:

  1. Fill in CLAUDE.md — define scope, naming conventions, initial research questions.
  2. Start ingesting sources.
  3. Ask questions to build up outputs/queries/; promote durable answers.
  4. Run lint periodically.
  5. Run audit whenever new feedback accumulates.

wiki/index.md format

The LLM rebuilds index.md on every compile and touches it on every ingest. Format:

markdown
# Index — <Topic>

> One-sentence scope of the wiki.

## 🔖 Navigation
- [[#Concepts]] · [[#Entities]] · [[#Summaries]] · [[#Open Questions]]

## Concepts
### <Category A>
- [[concepts/Foo]] — one-line summary
- [[concepts/Bar/index|Bar]] — (folder-split) one-line summary
    - [[concepts/Bar/aspect-1]] — ...
    - [[concepts/Bar/aspect-2]] — ...

### <Category B>
- ...

## Entities
- [[entities/Andrej Karpathy]] — AI researcher, author of the llm-wiki pattern

## Summaries (chronological)
- 2026-04-09 — [[summaries/llm-wiki-gist]] — Karpathy's original Gist

## Open Questions
- Q1: ...

Rules:

  • Every wiki page must appear exactly once in index.md. lint enforces this.
  • Folder-split concepts show hierarchy via indented bullets.
  • index.md + CLAUDE.md together are what the AI reads at session start.

log/ format

See references/log-guide.md for full details. Minimum:

  • One file per day: log/YYYYMMDD.md
  • H1 = the date; H2 per entry with ## [HH:MM] <op> | <one-line description>
  • Ops: compile, ingest, query, lint, audit, promote, split, scaffold

Quick grep across history: grep -rh "^## \[" log/ | tail -20.

Use cases

  • Research deep-dive — reading papers/articles on a topic over weeks; the wiki evolves with your understanding, and the audit trail keeps AI mistakes from silently accumulating
  • Personal wiki — journal entries, notes, ideas compiled into a personal encyclopedia; comment on anything you disagree with later, the AI corrects it
  • Team knowledge base — fed by Slack threads, meeting notes, docs; team members file corrections through the web viewer
  • Reading companion — filing each book chapter as you go; builds a rich companion wiki by the end

References

  • references/schema-guide.md — What to put in CLAUDE.md
  • references/article-guide.md — How to write good wiki articles (length, wikilinks, mermaid, math, divide-and-conquer)
  • references/log-guide.md — The log/ folder convention
  • references/audit-guide.md — Audit file format, anchor strategy, processing workflow
  • references/tooling-tips.md — Obsidian setup, Web Clipper, qmd, plugin + web installation

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Llm Wiki?

Build and maintain a Karpathy-style LLM knowledge base — a self-compiling Obsidian markdown wiki where an Agent ingests raw sources, compiles cross-linked concept/entity/summary pages, answers queries against the corpus, lints the graph for health, and audits in-context human feedback filed from Obsidian or the local web viewer. Use when (1) scaffolding a new knowledge base for any research topic, (2) ingesting articles/papers/PDFs/web pages into raw/, (3) compiling or restructuring wiki articles from existing raw material, (4) answering questions against the wiki and filing durable answers...

Firwat Llm Wiki op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Llm Wiki besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Llm Wiki an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/lewislulu/llm-wiki-skill/tree/main/llm-wiki an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Llm Wiki benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Llm Wiki benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Llm Wiki domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Llm Wiki gratis?

lewislulu huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇