Skip to content
Agentmart
Submit a tool

llm-wiki

Build and maintain an LLM-curated knowledge base from papers, articles, transcripts, notes and project findings.

Skill by praneybehl

IndexedMIT★ 122
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/praneybehl-llm-wiki

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Build and maintain an LLM-curated knowledge base from papers, articles, transcripts, notes and project findings. Ingest sources into linked Markdown, answer questions with citations, lint or upgrade a wiki, and preserve useful synthesis across sessions and agents. Also capture verified task experience, consolidate success/failure patterns, and propose, evaluate, apply or roll back evidence-linked skill improvements. Trigger on "add this to my wiki", "what does the wiki say", "learn from this task", "improve this procedure", /wiki:learn or /wiki:evolve. Use index-first navigation, atomic pages and local hybrid search.

Use cases: documents, ml, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/llm-wiki

What's inside

Skill name
llm-wiki
Description
Build and maintain an LLM-curated knowledge base from papers, articles, transcripts, notes and project findings. Ingest sources into linked Markdown, answer questions with citations, lint or upgrade a wiki, and preserve useful synthesis across sessions and agents. Also capture verified task experience, consolidate success/failure patterns, and propose, evaluate, apply or roll back evidence-linked skill improvements. Trigger on "add this to my wiki", "what does the wiki say", "learn from this task", "improve this procedure", /wiki:learn or /wiki:evolve. Use index-first navigation, atomic pages and local hybrid search.
License
MIT
Instructions
183 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (37)

  • SKILL.md
  • SCHEMA.md.template · assets/
  • evolution_README.md.template · assets/
  • experience.json.template · assets/
  • graph_README.md.template · assets/
  • graph_gitignore.template · assets/
  • index.md.template · assets/
  • log.md.template · assets/
  • ontology.yaml.template · assets/
  • page.md.template · assets/
  • pattern.md.template · assets/
  • wiki-cache_gitignore.template · assets/
  • agent-memory-integration.md · references/
  • architecture.md · references/
  • evolution-workflow.md · references/
  • graph-workflow.md · references/
  • ingest-workflow.md · references/
  • lint-workflow.md · references/
  • page-conventions.md · references/
  • query-workflow.md · references/
  • retrieval-setup.md · references/
  • scaling-playbook.md · references/
  • init_wiki.py · scripts/
  • setup_wiki.py · scripts/
  • test_link_resolution.py · scripts/
  • wiki_evolve.py · scripts/
  • wiki_evolve_agent.py · scripts/
  • wiki_evolve_api.py · scripts/
  • wiki_evolve_claude.py · scripts/
  • wiki_evolve_loop.py · scripts/
  • wiki_evolve_stream.py · scripts/
  • wiki_graph_extract.py · scripts/
  • wiki_graph_lint.py · scripts/
  • wiki_graph_query.py · scripts/
  • wiki_lint.py · scripts/
  • wiki_search.py · scripts/
  • wiki_stats.py · scripts/

SKILL.md (first lines)

# LLM Wiki

A skill for building and maintaining an LLM-curated knowledge base at any user-chosen filesystem location, following the pattern Andrej Karpathy described in his April 2026 gist. One personal wiki can compound knowledge across projects, or a wiki can be isolated inside one project. The user curates sources and asks questions; the LLM does the bookkeeping.

## The pattern in one paragraph

Conventional RAG re-derives knowledge from raw chunks on every query; nothing accumulates. The LLM Wiki pattern flips this: when a new source arrives, the LLM compiles it once into a persistent, structured wiki: extracting concepts, writing entity pages, updating cross-references, flagging contradictions. Subsequent queries read the pre-synthesized wiki rather than the raw sources. Knowledge compounds. The user is in charge of sourcing and asking good questions; the LLM handles the summarizing, linking, and consistency work that humans abandon wikis over.

## When to use this skill

The trigger surface is broad. Any time the user is accumulating textual material over time (research papers, articles, transcripts, meeting notes, book chapters, customer calls, code repos, journal entries) and would benefit from having that material organized rather than dumped into a chat each session, this skill applies. It is equally useful for one source ("ingest this paper") and for the steady-state operations against an existing wiki ("what does my wiki say about diffusion models", "lint the wiki", "what's missing").

Resolve the wiki before doing anything else. Prefer, in order: a path or URL named by the user, a path or URL in the nearest project instructions, a path or URL in global agent instructions, then `wiki/` in the current project. Read the resolved wiki's `SCHEMA.md`; it may override defaults documented here. Never silently combine two wikis. If no wiki exists, run the bootstrap step below.

All relative `wiki/` and `raw/` paths in this skill refer to the resolved wiki and raw-source roots, not necessarily the current working directory.

## Backends: local folder or hosted URL

A wiki has one of two backends. The workflows, page conventions and `SCHEMA.md` are the same for both.

- **Local folder.** Pages are files. Use file reads, `str_replace` and the bundled scripts.
- **Hosted URL.** Pages are on an LLM Wiki server (a Cloudflare Worker). Use the MCP tools `wiki_overview`, `wiki_read`, `wiki_search`, `wiki_commit`, `wiki_history`, `wiki_graph`, `wiki_lint` and `wiki_raw`. Without MCP, use `python3 scripts/wiki_remote.py` (stdlib only).

Select the hosted backend when the instructions give a wiki URL, or when the `wiki_overview` tool is available and no local path is given. In hosted mode:

1. Call `wiki_overview` first. It returns `SCHEMA.md` and `index.md`.
2. Make surgical changes with `wiki_commit` `edit` operations. Each `old` text must occur once.
3. Add `log.md` and index lines with `append` operations. They never conflict.
4. After a conflict (HTTP 409 or `isError`), read the page again, make the change again and retry. Never overwrite another agent's change.
5. Do not run extract or cache scripts. The server updates search, links and the graph on each commit.

A `pull` mirror of a hosted wiki is read-only. Do not edit it. Full procedure, tool map and limits: `references/hosted-mode.md`.

**Optional decision layer.** Small decision models can gate search relevance and flag weak graph evidence or untrusted text. The layer is off by default and never writes pages. Enable it only on the user's request: `references/decision-models.md`.

## Architecture: three layers, three operations

The wiki has three layers and three operations. Internalize this vocabulary because the rest of the skill assumes it.

The three layers are **raw sources** (the user's curated source material: articles, papers, PDFs, transcripts; immutable, the LLM reads but never modifies them), **the wiki** (a directory of LLM-generated markdown pages: entity pages, concept pages, comparisons, summaries; the LLM owns this layer entirely), and **the schema** (a `SCHEMA.md` file at the wiki root that documents the conventions for this particular wiki: page types, naming rules, tag taxonomy, ingest workflow customizations; co-evolved with the user).

The three operations are **ingest** (a new source arrives; the LLM reads it, writes a summary page, updates relevant entity and concept pages, appends to the log), **query** (the user asks a question; the LLM navigates the wiki via the index, reads the relevant pages, and synthesizes an answer, often filing the answer back as a new page so the exploration compounds), and **lint** (a periodic health check; the LLM scans for contradictions, stale claims, orphan pages, missing concepts, broken links).

For the canonical write-up of these operations, read `references/architecture.md`. For the step-by-step procedures, read `references/ingest-workflow.md`, `references/query-workflow.md`, and `references/lint-workflow.md` as needed.

## Graph layer (compiled, optional)

Pages can carry typed `graph:` metadata in frontmatter. A bundled extractor compiles every page into `wiki/graph/`: `nodes.jsonl`, `edges.jsonl`, `graph.sqlite`, `graph.graphml`. **Markdown is canonical**; the graph is a regenerable index. Pages without `graph:` still appear as nodes (derived from their `type`/`kind`) and contribute low-confidence `mentions` edges from body wikilinks. Typed semantic edges (e.g. `founded`, `proposed`, `depends_on`) require an explicit source and evidence quote: never emit one inferred from training data.

The conventions for the graph layer (predicate vocabulary, node id format, required fields) live in `wiki/graph/ontology.yaml`. The full reference is `references/graph-workflow.md`. Run the bundled scripts after substantive ingests:

```bash
uv run --script scripts/wiki_graph_lint.py wiki/      # check ontology + evidence + alias collisions
uv run --script scripts/wiki_graph_extract.py wiki/   # rebuild nodes.jsonl, edges.jsonl, graph.sqlite, graph.graphml
python scripts/wiki_graph_query.py wiki/ neighbors --node product:konvy
```

If `wiki/graph/ontology.yaml` does not exist, the wiki is pre-graph and you should treat the graph step as a no-op: don't fabricate it.

## Storage scope and layout

Wiki storage scope is independent of skill installation scope. Installing the skill globally only makes it available across projects; it does not create or select a global wiki.

Use one of two layouts:

- **Personal global wiki:** a stable root such as `~/wiki/`, with raw sources at `~/wiki/raw/`. Point the agent's global instructions to that user-level path. This lets work from any project be deliberately ingested into one compounding knowledge base.
- **Project wiki:** `wiki/` and `raw/` live in the project and are referenced by that project's agent-memory file. Use this when knowledge needs repository-level isolation or versioning.

A global wiki does not crawl or ingest projects automatically. Add project sources and durable findings when the user requests ingestion or their global instructions require those findings to be preserved.

The project-local default is:

```
<project-root>/
├── wiki/
│   ├── SCHEMA.md              ← conventions, the "config file": read this FIRST
│   ├── index.md               ← entry point: catalog of all pages with one-line summaries
│   ├── log.md                 ← append-only chronological log of ingests/queries/lints
│   ├── indexes/               ← (appears once index.md shards) per-category indexes
│   ├── entities/              ← pages about specific things (people, products, papers, places)
│   ├── concepts/              ← pages about ideas, methods, frameworks
│   ├── sources/               ← per-source summary pages (one per ingested source)
│   └── synthesis/             ← cross-cutting analyses, comparisons, query results filed back
├── raw/                       ← the user's source material (PDFs, .md clippings, images)
│   └── assets/                ← downloaded images referenced by raw clippings
└── ...
```

This layout is a default, not a requirement. A global wiki can put `raw/` inside the wiki root, and either scope can use another name such as `kb/`, `notes/`, or `vault/`. Follow `SCHEMA.md`.

## The scalability discipline

The single biggest failure mode of the LLM Wiki pattern is the wiki itself becoming a context bottleneck. Naive implementations break around a few hundred pages: the LLM either reads too many pages per query or starts hallucinating because it skipped the relevant ones. This skill's design is shaped almost entirely by avoiding that failure. The principles below are non-negotiable; ignoring them is what makes the pattern collapse at scale.

**Atomic pages.** Every wiki page is about one concept and stays small: soft cap 400 lines or roughly 2,000 words, hard cap 800 lines. When a page outgrows this, split it: extract sub-concepts into their own pages and have the parent link to them. A page that takes up 30% of the context window on its own is a design smell.

**Index-first navigation.** Never grep or glob the wiki blindly when answering a query. Always read `index.md` (or the relevant sharded index under `indexes/`) first to identify candidate pages, then drill into only those. The index is engineered to be cheap to read (one line per page, no bodies), and it is the cache that makes the whole pattern scalable.

**Sharded indexes.** When `index.md` itself exceeds ~300 lines or the wiki passes ~150 pages, shard it: move category-specific entries into `indexes/<category>.md` files (e.g. `indexes/entities.md`, `indexes/concepts.md`, `indexes/sources.md`, or finer domain shards), and have the top-level `index.md` become a directory of those shards. Now reading the index is a two-step lookup but each step is bounded.

**YAML frontmatter on every page.** Every wiki page begins with frontmatter that includes at minimum `type`, `tags`, `sources`, and `updated`. The bundled `wiki_search.py` script can filter on these without reading page bodies. See `references/page-conventions.md`.

**Surgical edits, not rewrites.** When updating a page (e.g. adding a new cross-reference because a freshly ingested source mentions an existing entity), use `str_replace` to touch only the relevant section. Rewriting whole pages is slow, expensive in tokens, and risks losing prior nuance.

**Backlink discovery via grep.** To find every page that references a given entity, run `grep -rl "\[\[entity-name\]\]" wiki/` rather than reading pages to look for mentions. The bundled scripts make this easy.

**Chunked source ingestion.** Large raw sources (long PDFs, book chapters, lengthy transcripts) should be read in chunks during ingest, not loaded whole. The ingest workflow handles this: see `references/ingest-workflow.md`.

**Search script for large wikis.** Once the wiki passes ~300 pages, plain index lookup may not surface the right pages for fuzzy queries. Use `scripts/wiki_search.py` for section-level hybrid retrieval with optional frontmatter filters and structured `--json` evidence rows. The default path runs the local `BAAI/bge-small-en-v1.5` FastEmbed model, stores derived vectors in `wiki/.wiki-cache/embeddings.sqlite` through sqlite-vec, and fuses semantic and BM25 ranks with RRF. Initialization and upgrade run `scripts/setup_wiki.py` through `uv`, installing pinned FastEmbed, sqlite-vec, and PyYAML, caching the model, and synchronizing every section before setup is reported ready. No wiki or query text leaves the machine. For dependency-free BM25, bypass PEP 723 resolution with `python scripts/wiki_search.py "query" --no-embed`.

For the full scaling playbook including thresholds and migration steps, read `references/scaling-playbook.md`.

## Initializing a new wiki

Ask whether the user wants one global personal wiki or a project wiki. Then run the bootstrap script against the selected base directory:

```bash
# Project wiki: <project-root>/wiki and <project-root>/raw
python scripts/init_wiki.py <project-root> [--wiki-dir wiki] [--raw-dir raw]

From praneybehl/llm-wiki-plugin, MIT.

Signals

Stars
122
Forks
17
Open issues
1
Last commit (this folder)
Sep 13, 2026 (1 month ago)
Last release
Sep 13, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026
Cite this page

llm-wiki skill. Agent Mart. https://agentmart.dev/skills/praneybehl-llm-wiki (last updated 2026-10-24)