llm-wiki

llm-wiki — nvk’s take

A Claude Code plugin for building LLM-compiled knowledge bases. Ingest sources, compile interconnected markdown articles, query, lint, research, and generate outputs — all from Claude Code. Optionally view in Obsidian.

Inspired by Karpathy’s LLM wiki concept and his idea file.

Install

Claude Code (native plugin):

/install-plugin github:nvk/llm-wiki

OpenAI Codex / Any LLM Agent (idea file):

# Copy AGENTS.md into your agent's context or project root
cp AGENTS.md ~/your-project/AGENTS.md

The AGENTS.md file contains the complete wiki protocol as a single portable document — works with any LLM agent that can read/write files and search the web.

New to a topic? Two commands. Each topic gets its own wiki — isolated indexes, focused queries, no cross-topic noise:

/wiki init nutrition
/wiki:research "gut microbiome and mental health" --sources 10 --wiki nutrition

The research command launches parallel agents to search the web, ingest the best sources, and compile them into interconnected articles. Drill into gaps with more /wiki:research, ask questions with /wiki:query, drop articles into the inbox anytime.

Quick Start

/wiki init nutrition                              # Create a topic wiki
/wiki:research "gut-brain axis" --wiki nutrition  # 5 parallel agents search, ingest, compile
/wiki:research "probiotics" --deep                # 8 agents, broader angles
/wiki:research "fasting" --retardmax              # 10 agents, max speed, ingest everything
/wiki:query "How does fiber affect mood?"         # Ask the wiki
/wiki:query "compare keto and mediterranean" --deep  # Deep cross-referenced answer
/wiki:ingest https://example.com/article          # Manually ingest a source
/wiki:ingest --inbox                              # Process files dropped in inbox/
/wiki:compile                                     # Compile any unprocessed sources
/wiki:output report --topic gut-brain             # Generate a report
/wiki:output slides --retardmax                   # Ship a rough slide deck NOW
/wiki:assess /path/to/my-app --wiki nutrition     # Gap analysis: repo vs wiki vs market
/wiki:lint --fix                                  # Clean up inconsistencies

Commands

Command Description
/wiki Show wiki status, stats, and list all topic wikis
/wiki init <name> Create a topic wiki at ~/wiki/topics/<name>/
/wiki init <name> --local Create a project-local wiki at .wiki/
/wiki:ingest <source> Ingest a URL, file path, or quoted text
/wiki:ingest --inbox Process all files in the topic wiki’s inbox/
/wiki:compile Compile new sources into wiki articles
/wiki:compile --full Recompile everything from scratch
/wiki:query <question> Q&A against the wiki (standard depth)
/wiki:query <question> --quick Fast answer from indexes only
/wiki:query <question> --deep Thorough — reads everything, checks raw + sibling wikis
/wiki:research <topic> 5 parallel agents: academic, technical, applied, news, contrarian
/wiki:research <topic> --deep 8 agents: adds historical, adjacent, data/stats
/wiki:research <topic> --retardmax 10 agents: skip planning, max speed, ingest aggressively
/wiki:search <terms> Find content by keyword or tag
/wiki:lint Run health checks on the wiki
/wiki:lint --fix Auto-fix structural issues
/wiki:lint --deep Web-verify facts and suggest improvements
/wiki:output <type> Generate: summary, report, study-guide, slides, timeline, glossary, comparison
/wiki:output <type> --retardmax Ship it now — rough but comprehensive, iterate later
/wiki:assess <path> Assess a repo against wiki research + market. Gap analysis.
/wiki:assess <path> --retardmax Wide net — adds adjacent fields and failure analysis

All commands accept --wiki <name> to target a specific topic wiki and --local to target the project wiki.

How It Works

Architecture

~/wiki/                                 # Hub — lightweight, no content
├── wikis.json                          # Registry of all topic wikis
├── _index.md                           # Lists topic wikis with stats
├── log.md                              # Global activity log
└── topics/                             # Each topic is an isolated wiki
    ├── nutrition/                      # Example topic wiki
    │   ├── .obsidian/                  # Obsidian vault config
    │   ├── inbox/                      # Drop zone for this topic
    │   ├── raw/                        # Immutable sources
    │   ├── wiki/                       # Compiled articles
    │   │   ├── concepts/
    │   │   ├── topics/
    │   │   └── references/
    │   ├── output/                     # Generated artifacts
    │   ├── _index.md
    │   ├── config.md
    │   └── log.md
    ├── woodworking/                    # Another topic wiki
    └── ...

The hub is just a registry — no content directories, no .obsidian/. All content lives in topic sub-wikis with isolated indexes and articles. Queries stay focused. The multi-wiki peek finds overlap across topics when relevant.

The Flow

  1. Research a topic — parallel agents search the web, ingest sources, and compile articles in one command
  2. Ingest additional sources — URLs, files, text, tweets (via Grok MCP), or bulk via inbox
  3. Compile raw sources into synthesized wiki articles with cross-references and confidence scores
  4. Query the wiki — quick (indexes), standard (articles), or deep (everything)
  5. Assess a repo against the wiki — gap analysis: what aligns, what’s missing, what the market offers
  6. Lint for consistency — broken links, missing indexes, orphan articles
  7. Output artifacts — summaries, reports, slides — filed back into the wiki

Key Design

Research Modes

Mode Flag Agents Style
Standard (default) 5 Academic, technical, applied, news, contrarian
Deep --deep 8 Adds historical, adjacent fields, data/stats
Retardmax --retardmax 10 Adds rabbit-hole agents. Skip planning, cast widest net, ingest aggressively, compile fast. Lint later.

Retardmax mode is inspired by Elisha Long’s retardmaxxing philosophy — act first, think later. The antidote to analysis paralysis. Works for both /wiki:research and /wiki:output.

Linking: Works Everywhere

Every cross-reference in the wiki uses dual-link format:

[[gut-brain-axis|Gut-Brain Axis]] ([Gut-Brain Axis](../concepts/gut-brain-axis.md))

The wiki is not locked into any tool:

Obsidian Integration

Each topic wiki has its own .obsidian/ config and can be opened as an independent vault:

open ~/wiki/topics/nutrition/     # Open in Obsidian — focused graph for one topic

The hub (~/wiki/) has no .obsidian/ to avoid nested vault confusion. If you want a cross-topic view, open ~/wiki/ manually and let Obsidian create its own config.

What works out of the box:

Claude Code is the compiler. Obsidian is an optional viewer.

Query Depths

Depth Flag What it does
Quick --quick Reads indexes only. Fastest. For simple lookups.
Standard (default) Reads relevant articles + full-text search. For most questions.
Deep --deep Reads everything, searches raw sources, peeks sibling wikis. For complex questions.

Credits

License

MIT