Generated banner for LLM Wiki Manager
Generated logo for LLM Wiki Manager

LLM Wiki Manager

LLM wiki kit

Created by sametbrr

Published in sametbrr/llm-wiki-manager. Publisher page

73 GitHub stars

What it is

Agent Skills plugin for a persistent LLM-managed markdown wiki — ingest, cross-reference, cited queries and lint with 5 stdlib scripts
— the description by sametbrr

AutoGineer overview, from the brain’s own files

LLM Wiki Manager is an agent skill and plugin designed to implement the Karpathy LLM Wiki pattern. It shifts the paradigm from traditional RAG—where an LLM re-reads raw documents on every query—to a persistent, compounding knowledge base. The system maintains a clear division of labor: the user curates raw source files in a dedicated folder, while the agent manages the wiki layer, handling synthesis, cross-referencing, indexing, and bookkeeping. It includes idempotent Python scripts for maintenance tasks like linting, logging, and schema evolution, ensuring that knowledge remains structured and traceable over time.

How it works

Memory model: LLM wiki

AutoGineer overview, from the brain’s own files

The system organizes data into a three-layer model: a schema file for conventions, a raw folder for immutable source documents, and a wiki folder for synthesized content. The agent uses a set of Python scripts to manage this structure. When a user provides a source, the agent ingests it, summarizes the content, updates entity and concept pages, and logs the action. It supports advanced operations like semantic updates to propagate changes across multiple pages, automated health checks that generate dated reports, and multi-wiki routing to bridge project-specific and global knowledge bases.

Folders
FolderRoleFiles
.githubagent-config2
skillsagent-instructions27
teststests1
.claude-pluginfolder1
.codex-pluginfolder1

The agent reads

The agent writes

Requirements

Works with: Claude Code, OpenAI Codex, GitHub Copilot, Cursor, Kiro, OpenCode, Amp, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. Download the brain as a ZIP and unzip it where you keep your notes or project: https://mp-staging.autogineer.com/agent-brains/sametbrr/llm-wiki-manager/download
  2. Claude Code reads CLAUDE.md from this folder automatically.

  3. cd llm-wiki-manager && claude

  4. AutoGineer scanned these files at commit 28ad285.

  5. Created by sametbrr. Published in sametbrr/llm-wiki-manager. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Bootstrap a new wiki environment in a research folder.
  • Ingest PDF or text documents into the wiki.
  • Query the wiki for synthesized answers with citations.
  • Perform semantic updates to propagate information changes across the wiki.
  • Run automated health checks to identify broken links or orphan pages.
  • Route knowledge between project-specific and global wikis.
“Set up an LLM wiki here. Topic: history of nutrition science.”
The agent scaffolds the raw/ and wiki/ folders and initializes the schema file.
“Add this PDF to the wiki.”
The agent reads the source, writes a summary, updates relevant entity pages, and logs the ingestion.
“Smith 2024 supersedes Keys 1980, update the wiki.”
The agent performs a semantic sweep across all pages to update the superseded claim and logs the change.
“Lint the wiki.”
The agent runs a health check, generates a dated report in the reports folder, and updates the index.

Documentation by sametbrr

Image: Release Image: License: MIT Image: Agent Skills

Quick Start • Installation • Usage • Update mode • Multi-wiki • Compatibility

LLM Wiki Manager

An Agent Skill and plugin for Claude Code and Codex for building and maintaining a personal LLM-managed wiki — a persistent, compounding knowledge base where the LLM does all the writing, cross-referencing, and bookkeeping while you curate sources and ask questions.

🇹🇷 Türkçe için README.tr.md


Quick Start

claude plugin marketplace add sametbrr/skill-hub && claude plugin install llm-wiki-manager@skill-hub   # Claude Code
codex plugin marketplace add sametbrr/skill-hub && codex plugin add llm-wiki-manager@skill-hub         # Codex

Start a new session in your research folder:

mkdir ~/research/my-topic && cd ~/research/my-topic && claude   # or: codex
> "Set up an LLM wiki here. Topic: history of nutrition science."

Features

Instead of RAG — where the LLM rediscovers answers from raw documents on every query — this pattern has the LLM compile raw sources into a persistent, interlinked markdown wiki. Each new source enriches existing pages. Cross-references are built eagerly. Contradictions are flagged. Knowledge compounds over time.

Implements Karpathy's LLM Wiki pattern as a full agent skill with 9 operating modes (including multi-wiki routing and migrate), 5 idempotent Python scripts, 8 page templates, and 11 reference documents.

Without this pattern          With this pattern
────────────────────          ──────────────────
Query 1 → re-read 50 docs     Query 1 → read compiled wiki (already synthesized)
Query 2 → re-read 50 docs     Query 2 → read updated wiki (cross-refs already there)
Query 3 → re-read 50 docs     Query 3 → read updated wiki (contradictions already flagged)

Requirements

  • Claude Code, OpenAI Codex, or any agentskills.io-compatible agent

  • Python 3.9+ (stdlib only, for the 5 included scripts — no pip install needed)


Installation

Option 1 — Claude Code plugin (recommended)

claude plugin marketplace add sametbrr/skill-hub
claude plugin install llm-wiki-manager@skill-hub

Option 2 — Codex plugin

codex plugin marketplace add sametbrr/skill-hub
codex plugin add llm-wiki-manager@skill-hub

Option 3 — GitHub CLI, any agent (gh CLI with gh skill)

gh skill install sametbrr/llm-wiki-manager llm-wiki-manager --agent claude-code --scope user   # or --agent codex

Option 4 — manual copy: copy skills/llm-wiki-manager/ into ~/.claude/skills/ or ~/.agents/skills/.

After installing, start a new session. The skill loads automatically when relevant.


Usage

The skill auto-detects which mode applies from natural language. No slash commands needed.

> "Set up an LLM wiki here"                             # Bootstrap: scaffold raw/, wiki/ and the schema file
> "Add this PDF to the wiki"                            # Ingest: summarize, cross-reference, index, log
> "What does the wiki say about X?"                     # Query: answer with citations, offer to file back
> "Smith 2024 supersedes Keys 1980, update the wiki"    # Update: sweep every page that paraphrases the claim
> "Lint the wiki"                                       # Lint: dated health report in wiki/reports/
> "We should always do X going forward"                 # Schema-evolve: record a convention for future sessions
> "Add this to my global wiki"                          # Multi-wiki: route between project and global wiki
> "How does this pattern work?"                         # Teach: explain the pattern and compare it with RAG
Modes
ModeTrigger examplesWhat happens
Bootstrap"Set up a wiki", "start a knowledge base here"Scaffolds raw/, wiki/ and the schema file (AGENTS.md + a CLAUDE.md pointer) from templates
Ingest"Add this PDF to the wiki", "I just read X, file it"Reads source → writes summary → updates entity/concept pages → indexes → logs
Query"What does the wiki say about X?", "Compare X and Y"Reads index → candidate pages → synthesizes answer with citations → offers to file back
Update"Smith 2024 supersedes Keys 1980, update the wiki"Semantic sweep across all pages → diff-before-write per page → single log entry
Lint"Health check the wiki", "anything broken?"Runs lint_wiki.py → auto-saves wiki/reports/lint-YYYY-MM-DD.md → auto-tracks in index and log
Schema-evolve"We should always do X going forward"Updates the schema file (AGENTS.md / CLAUDE.md) so future sessions inherit the convention
Multi-wiki"Add this to my global wiki", "promote this page to global"Routes between project wiki and global wiki using the External Wiki: declaration in project CLAUDE.md
Teach"How does this pattern work?", "explain the LLM wiki idea"Explains the pattern, compares with RAG, walks through a concrete example
Full walkthrough
# 1. Go to your research folder
mkdir ~/research/my-topic && cd ~/research/my-topic && claude

# 2. Bootstrap the wiki
> "Set up an LLM wiki here. Topic: history of nutrition science."

# 3. Drop a source
cp ~/Downloads/pollan-2008.pdf raw/

# 4. Ingest it
> "Ingest Pollan's In Defense of Food"

# 5. Ask questions
> "What does the wiki say about nutritionism?"

# 6. Health check (auto-saves dated report to wiki/reports/)
> "Lint the wiki"

The three-layer model

your-wiki/
├── AGENTS.md          # Schema — conventions for this wiki (co-evolved over time)
├── CLAUDE.md          # One line: @AGENTS.md (Claude Code reads CLAUDE.md, Codex reads AGENTS.md)
├── raw/               # YOUR layer — immutable sources you curate. LLM reads, never writes.
└── wiki/              # LLM layer — all pages written and maintained by the LLM
    ├── index.md       # Content catalog (updated on every ingest)
    ├── log.md         # Append-only operation log (greppable)
    ├── hot.md         # Hot cache — most recently ingested sources and active references
    ├── sources/       # One summary page per ingested source
    ├── entities/      # People, organizations, places, products
    ├── concepts/      # Ideas, theories, frameworks, terms
    ├── notes/         # Filed-back query answers and loose pages
    └── reports/       # Auto-generated dated lint reports (wiki/reports/lint-YYYY-MM-DD.md)

Division of labor:

You doThe LLM does
Curate sources (decide what to read)Read sources end-to-end
Ask questions, steer directionWrite summaries, entity and concept pages
Review the wiki, follow linksUpdate cross-references in-place
Decide what mattersMaintain index.md and log.md
Own raw/Flag contradictions, surface gaps

You almost never write wiki pages by hand. The LLM does the bookkeeping — that's what makes the wiki compound instead of collapse.


Core disciplines

  1. LLM owns wiki/. You own raw/. No exceptions.

  2. Every operation logs to log.md via append_log.py. Greppable: grep "^## \[" log.md | tail -20

  3. Every new or updated page touches index.md via update_index.py. Stale index = wiki that feels lost.

  4. Cross-reference aggressively. When a source mentions an entity that already has a page, update that page. Don't leave connections implicit.

  5. Cite back to raw/. Every claim is traceable to a specific source file.

  6. Flag contradictions, don't overwrite. New source disagrees with old claim? Both stay, marked with their source, with a > [!warning] Sources disagree callout.

  7. Schema lives in CLAUDE.md. When a convention works, write it down. The next session starts informed.


What's inside

Scripts (Python stdlib, no dependencies, all idempotent)
ScriptPurpose
scripts/init_wiki.pyScaffold a new wiki — creates raw/, wiki/, the schema file (AGENTS.md + CLAUDE.md pointer, or keeps an existing one), index.md, log.md, and hot.md. Idempotent.
scripts/append_log.pyAppend a ## [YYYY-MM-DD] action | title entry to log.md. Supports flexible log path detection.
scripts/update_index.pyAdd or update an entry under a category in index.md. Case-insensitive categories, keeps section order and content, follows the index link style (markdown or [[wikilinks]]), new categories go before ## Meta.
scripts/lint_wiki.pyHealth check. Detects orphan pages, broken links and index drift in both standard markdown and Obsidian wiki-link format ([[page#heading]], ![[embed.png]] included). Default: writes wiki/reports/lint-<today>.md and auto-tracks. Run --stdout for terminal output.
scripts/migrate_wiki.pySchema upgrade (v1 → v2). Deduplicates index.md, moves dated changelog blocks from hot.md into log.md, stamps the schema version. Idempotent.
Templates
TemplateUsed for
wiki-CLAUDE.md.tmplThe schema file dropped into a fresh wiki
source-summary.md.tmplOne ingested source — claims, methodology, cross-links, open questions
entity-page.md.tmplPeople, organizations, places, products
concept-page.md.tmplIdeas, frameworks, theories, terms
comparison-page.md.tmpl"X vs Y" pages, often filed-back query answers
index.md.tmplInitial content catalog
log.md.tmplInitial log with bootstrap entry
hot.md.tmplInitial hot cache — rewritten after each ingest with latest sources and active references
Reference docs

Eleven detailed workflow documents in references/: philosophy.md · architecture.md · bootstrap-workflow.md · ingest-workflow.md · query-workflow.md · update-workflow.md · lint-workflow.md · migrate-workflow.md · schema-design-guide.md · multi-wiki-routing.md · teaching-mode.md

The skill reads these selectively — you don't need to. They're there to give the LLM depth on each mode.


Update mode

Standard ingest already handles contradictions on a single page (Disputes section). Update mode is for when a new source supersedes a claim that's paraphrased across multiple pages — the same idea written four different ways in four different files.

Scenario: Smith 2024 reanalysis shows Keys 1980's seven-countries study cherry-picked data.
The Keys r=0.87 claim appears as:
  concepts/saturated-fat.md     → "Keys found r=0.87 across seven countries"
  entities/ancel-keys.md        → "famous for showing strong correlation"
  concepts/heart-disease.md     → "saturated fat is a primary driver per Keys"
  concepts/dietary-policy.md    → "the saturated fat hypothesis drove decades of policy"

Update mode:
  1. Semantic sweep — finds all four (grep won't, LLM will)
  2. Shows scope: "4 pages affected. Proceed?"
  3. Diff-before-write per page — y/n/skip/edit per change
  4. Per-page strategy: revise / disputes / annotate (not one-size-fits-all)
  5. One log entry tying all four edits to Smith 2024

This is change propagation, not change tracking. The log and frontmatter track what was edited. Update mode ensures the edit reaches everywhere it should.


Auto-dated lint reports

lint_wiki.py with no flags:

  • Writes wiki/reports/lint-YYYY-MM-DD.md (overwrites same-day run — idempotent daily)

  • Adds a Reports index entry automatically

  • Appends a lint | Health check log entry automatically

  • Exits with code 1 if any block-severity issue found (useful for CI)

Reports accumulate as a longitudinal health record. git log wiki/reports/ shows how wiki quality evolved over time.

Override flags: --stdout (terminal, no tracking), --no-track (write file, skip index/log), --report PATH (custom path).


Multi-wiki

Most users start with one wiki. Once you have two — say, a per-project wiki at the working directory plus a long-lived global "second brain" (often an existing Obsidian vault) — the skill routes writes between them based on a single declaration in the project's CLAUDE.md.

~/projects/x-project/          ← active project (current working directory)
├── CLAUDE.md                  ← project schema — declares the global wiki path
├── raw/                       ← project sources
└── wiki/                      ← project wiki

~/Documents/obsidian/          ← global wiki (long-lived, exists across projects)
├── CLAUDE.md                  ← global schema
├── raw/
└── wiki/
One-time setup

Add this to the project's CLAUDE.md (or ask the agent to do it):

## External Wiki

Global knowledge base: ~/Documents/obsidian/

### Routing rules
- Project-specific code decisions, architecture, bugs, configuration → this project's `wiki/`
- Concepts, frameworks, patterns, ideas applicable beyond this project → global wiki
- When in doubt, ask before writing
- Scripts always need `--path` flag pointing to the right wiki root

### Cross-wiki links
- Use absolute paths (`~/...`) when linking from one wiki to the other.
- Never use relative paths that cross wiki boundaries.
Four canonical scenarios
#ScenarioTriggerWhat the agent does
AWrite to global while in a project"Add JWT refresh rotation to my global wiki"Reads project CLAUDE.md → resolves global path → writes to global, project wiki untouched
BPull from global into a project"What does the global wiki say about rate limiting? Apply it to /api/search"Reads global pages → synthesizes recommendation → writes a project-specific page that links to the global one (never copies)
CPromote a page from project to global"concepts/event-sourcing.md has matured, promote it"Moves content to global → leaves a one-line redirect stub at the project path → updates both indexes and logs
DLint both wikis at once"Lint both wikis"Runs lint_wiki.py --path against each → reads both reports → returns one summary

Full walkthroughs of all four scenarios in references/multi-wiki-routing.md.


Compatibility

ToolInstallSchema file it reads
Claude Codeplugin (claude plugin install llm-wiki-manager@skill-hub) or ~/.claude/skills/CLAUDE.md
OpenAI Codexplugin (codex plugin add llm-wiki-manager@skill-hub) or ~/.agents/skills/AGENTS.md
GitHub Copilot, Cursor, Gemini CLI, …gh skill install … --agent <name>usually AGENTS.md

A wiki that keeps its schema in AGENTS.md with a one-line CLAUDE.md (@AGENTS.md) works in all of them; init_wiki.py sets that up.



Contributing


License

MIT — see LICENSE.


<div align="center">

Report Bug · Request Feature

</div>

skills/llm-wiki-manager/references/query-workflow.md

Query Workflow

Use this when the user asks a question that depends on what's in the wiki. Examples: "what does my wiki say about X", "compare the two papers on Y", "based on what I've read, is Z plausible", "what did Pollan think about supplements".

The point of querying a wiki — versus asking a generic LLM — is that the synthesis is already partly done. Most pages have been written, cross-references already exist, contradictions are already flagged. Your job is to find the right pages, read them, and produce a focused answer.

Goal

Answer the user's question using the wiki as the source of truth, citing wiki pages (and through them, raw sources). Where the wiki has gaps, name them. Where the answer is non-trivial, offer to file it back as a new page so future queries benefit.

The full loop

1. Read wiki/index.md first

The index is the navigation aid. Don't grep blindly across wiki/. Read the index, identify candidate pages, then drill in. For most queries, two to five pages will be relevant.

Hub navigation: if the index marks a page with ★, that page is the cluster's hub (MOC) — it lists every page in its cluster with one-line descriptions. When the question falls inside a theme that has a hub, the cheapest route is short index → hub → page: read the theme's section of the index, open the hub, and jump straight to the right page instead of scanning the whole index or grepping.

If the index is large (hundreds of entries) and skimming is slow, use a search approach:

grep -ri "<keyword>" wiki/ --include="*.md" -l

For larger wikis (~100+ sources), consider a proper search tool like qmd. Document the choice in CLAUDE.md.

2. Read the candidate pages

Read them fully. Skim is not enough — the contradictions section, the "open questions" footer, the linked sources are often where the real answer hides.

If a page references a source summary or another concept page that seems load-bearing, follow the link.

3. Decide if the wiki has the answer

Three possibilities:

  • Wiki has it. Pages cover the question well; synthesize from them.

  • Wiki has parts. Some pages are relevant but the question requires connecting threads not yet connected. Synthesize and flag this — it's a candidate to file back as a new page.

  • Wiki has nothing. The topic isn't in the wiki yet. Don't fabricate. Tell the user the wiki is silent on this, and either (a) suggest sources to add, (b) answer from general knowledge with a clear "this isn't from your wiki" disclaimer, or (c) both.

4. Synthesize the answer

Cite wiki pages, not raw sources, by default. Wiki pages are the user's curated synthesis; raw sources are below them. Use this style:

Pollan's main objection to supplements is that they extend nutritionism — the idea that food is reducible to nutrients (see [Nutritionism](concepts/nutritionism.md)). He argues that isolating nutrients and packaging them in pills loses the synergistic effects of whole foods ([Pollan 2008](sources/pollan-eat-food.md)).

A counterpoint comes from [Smith 2019](sources/smith-2019-vitamin-d.md), who argues that vitamin D supplementation does have well-supported isolated benefits in deficient populations.

If the question deserves a structure (comparison, timeline, decision matrix), use one. Tables, lists, hierarchies. Don't force prose where structure is clearer.

5. Surface contradictions and gaps

If the wiki contains contradictions on the topic, name them. If there are open questions noted on the relevant pages, mention them. If the user's question hits a topic with thin coverage (one source only, dated source only), say so.

Honesty about thin coverage is more valuable than a confident synthesis from a thin base.

6. Offer to file the answer back

If the answer is non-trivial — a synthesis, a comparison, an analysis — offer to save it as a new wiki page:

Want me to save this as wiki/notes/pollan-on-supplements.md so it shows up in future queries?

This is the most underused part of the pattern. Good answers should compound just like ingested sources do. Default to offering. Default to "yes, save it" unless the user declines.

If the user accepts:

  • Pick a category — notes/ is the default for synthesized answers; promote to concepts/ or entities/ if the page becomes substantial.

  • Write the page using the same structure principles as ingest-produced pages: clear title, source citations, links to other relevant pages.

  • Update wiki/index.md.

  • Append to wiki/log.md as a query action.

7. Append to log

Even if the answer wasn't filed back. Every query gets a log entry:

python scripts/append_log.py --path . --action query \
  --title "What did Pollan think about supplements?" \
  --details "Read concepts/nutritionism.md and sources/pollan-eat-food.md. Filed answer to notes/pollan-on-supplements.md."

Logging queries serves two purposes: lets the user see "what have I been asking about" later, and lets the LLM in future sessions notice patterns ("the user has asked about X three times — maybe X deserves its own page").

Output formats

A query answer is a flexible artifact. Common shapes:

  • Plain markdown response in chat. Default for short questions.

  • A markdown page filed to wiki/notes/. When the answer is substantial enough to be worth saving.

  • A comparison table. When the question is "X vs Y".

  • A timeline. When the question has a temporal dimension ("how did the user's thinking evolve").

  • A chart (matplotlib or similar). For numeric data; render to image, save to wiki/notes/assets/, link from a notes page.

  • A slide deck (Marp, if the wiki uses it). For presentation-shaped queries.

Pick the format that fits the question. Long prose in chat is rarely the best answer.

When the wiki is silent

If after reading the index and candidate pages the wiki genuinely has nothing on the topic:

  1. Say so plainly. "Your wiki has no pages on X."

  2. Offer paths forward:

    • Suggest a couple of sources that would fill the gap (with web search if available).

    • Answer from general knowledge with a clear "not from your wiki" disclaimer.

    • Ask if they have a source ready to ingest first.

  3. Log it. A query that hits empty space is itself useful information — it surfaces a gap. Log it as query | <question> | wiki silent.

Heuristics

  • Read the index first. Always. Even when you "know" where the answer is.

  • Cite wiki pages, not raw sources. The wiki is the curated layer; that's the point.

  • Offer to file back. Most users won't think to ask, but most users want it.

  • Name your gaps. A confident answer from thin coverage is worse than an honest "the wiki is thin here, want me to find more sources?".

  • Don't re-ingest during a query. If a query reveals that a relevant source exists in raw/ but was never summarized into wiki/, note it and offer to ingest it after answering. Don't try to do both at once.

Common mistakes

  • Skipping the index. Searching with grep when a 30-second read of the index would have shown the answer page.

  • Overciting raw sources. A query answer should sit on top of the wiki layer, not bypass it.

  • Not offering to file back. Letting the synthesis disappear into chat history. The whole point is compounding.

  • Synthesizing a confident answer from one thin page. State the limitation; don't paper over it.

  • Forgetting the log entry. Easy to skip on a "quick question". Don't.

40 files

Advantages

  • Compounding knowledge base that synthesizes information rather than re-reading raw documents on every query. evidence: README.md
  • Automated bookkeeping and cross-referencing reduce manual maintenance effort. evidence: README.md
  • Idempotent scripts ensure reliable operations without external dependencies. evidence: README.md

Limitations

  • Requires strict adherence to the division of labor between the raw source folder and the LLM-managed wiki folder. evidence: README.md
  • Multi-wiki routing requires manual configuration of paths in the schema file. evidence: README.md

Security

Risk level: No risk found

This brain runs

Agent instructions that run or fetch something (8)

  • AGENTS.md: `tests/test_scripts.py`: functional tests that run every script against temp wikis.
  • AGENTS.md: `python3 -m unittest discover -s tests`
  • AGENTS.md: Codex: install from a local marketplace in an isolated `CODEX_HOME`;
  • skills/llm-wiki-manager/SKILL.md: Run them by path relative to this skill's directory, and always pass `--path <wiki-root>`.
  • skills/llm-wiki-manager/SKILL.md: If it is lower than the version this skill expects, offer one sentence before starting the requested work: *"This wiki is at schema v1, the skill expects v2 — run `scripts/migrate_wiki.py` first?"* Don't block the requested operation if the user declines;
  • skills/llm-wiki-manager/SKILL.md: If the section is missing and a multi-wiki operation is requested, **run Schema-evolve first** to add it, then proceed.
  • skills/llm-wiki-manager/SKILL.md: Some users run two wikis: a per-project wiki at the working directory and a long-lived global wiki (often an existing Obsidian vault) at a fixed path.
  • skills/llm-wiki-manager/SKILL.md: unstamped = v1), shows a **dry-run** of the mechanical steps plus the manual (LLM) steps, applies with `--apply` only.

Attribution and licence

Created by
sametbrr
Declared authors
  • sametbrr (declared in .claude-plugin/plugin.json)
Publisher
Samet Birer (Community)
Source
sametbrr/llm-wiki-manager · commit 28ad285
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by sametbrr.

Download

The ZIP holds the files AutoGineer serves, with ATTRIBUTION.md and the licence. Download llm-wiki-manager.zip