Generated banner for LLM Knowledge Bases
Generated logo for LLM Knowledge Bases

LLM Knowledge Bases

LLM wiki kit

First committed by rvk7895

Published in rvk7895/llm-knowledge-bases. Publisher page

35 GitHub stars

What it is

Claude Code plugin for building LLM-maintained Obsidian wikis from raw research — compile, query, lint, and evolve your personal knowledge base. Inspired by Karpathy's knowledge base workflow.
— the description by rvk7895

AutoGineer overview, from the brain’s own files

LLM Knowledge Bases is a plugin for Claude Code designed to automate the creation and maintenance of a personal knowledge base in Obsidian. By treating the LLM as a knowledge compiler, the system ingests raw materials—such as articles, papers, and transcripts—and organizes them into a structured, interlinked wiki. Users interact with the system by feeding raw data into a designated folder, while the agent handles the compilation, indexing, and health maintenance of the vault. It supports multiple query depths, ranging from quick index lookups to deep, multi-agent research pipelines, ensuring that the knowledge base evolves alongside the user's research interests.

How it works

Memory model: LLM wiki

AutoGineer overview, from the brain’s own files

The system operates by ingesting raw source documents from a raw folder. It then compiles these into an Obsidian vault containing summaries, backlinks, and indexes. Users can query the knowledge base at three levels of depth: quick, standard, or deep. The system also performs automated maintenance tasks like linting for broken links or orphans and provides tools for deep research, which involves generating outlines and deploying parallel agents to research specific topics. All outputs are saved to an output folder or integrated back into the wiki.

Folders
FolderRoleFiles
.claudeagent-config1
docsdocs2
.claude-pluginfolder1
pluginsfolder12

Requirements

Works with: Claude Code, OpenCode

Set it up

  1. This brain runs code automatically: 1 script. Review plugins/kb/setup.sh before opening the folder in Claude Code. No step below turns a hook on for you.

    • plugins/kb/setup.sh: sh plugins/kb/setup.sh
  2. Download the brain as a ZIP and unzip it where you keep your notes or project: https://mp-staging.autogineer.com/agent-brains/rvk7895/llm-knowledge-bases/download
  3. Claude Code reads CLAUDE.md from this folder automatically.

  4. cd llm-knowledge-bases && claude

  5. AutoGineer scanned these files at commit 342686f.

  6. Not scanned by AutoGineerThe author’s README also describes installing it as a Claude Code plugin marketplace. Read its install section: AutoGineer did not scan that path. https://github.com/rvk7895/llm-knowledge-bases/blob/342686f4cdf0e969872601eabbcc10466da91431/README.md#installation
  7. First committed by rvk7895. Published in rvk7895/llm-knowledge-bases. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Initialize a new knowledge base structure
  • Compile raw research documents into an Obsidian wiki
  • Query the knowledge base for information at varying depths
  • Perform automated health checks on the wiki
  • Execute deep research on specific topics using multi-agent pipelines
“/kb compile”
The agent processes all files in the raw/ directory and updates the Obsidian wiki with new summaries and backlinks.
“/research-deep Artificial Intelligence trends”
The agent generates a research outline and launches parallel agents to conduct deep research on each item in the outline.
“/kb lint”
The agent scans the wiki for broken links, orphans, and inconsistencies, reporting them for resolution.

Documentation by rvk7895

LLM Knowledge Bases

A Claude Code plugin that turns raw research material into an LLM-maintained Obsidian wiki -- inspired by Andrej Karpathy's description of using LLMs as knowledge compilers rather than just code manipulators.

You drop source material into raw/, run a single command, and Claude handles the rest: compiling interlinked wiki articles, maintaining indexes and backlinks, answering complex questions at multiple depth levels, and continuously improving the knowledge base over time.

The LLM owns the wiki. You rarely edit it manually -- just explore in Obsidian and keep feeding it raw data.

How It Works

  1. Ingest -- Raw documents (articles, papers, repos, YouTube transcripts, images, datasets) go into raw/

  2. Compile -- Claude builds a structured Obsidian vault with summaries, backlinks, concept articles, and auto-generated indexes

  3. Query -- Three depth levels:

    • Quick -- Answers from wiki indexes and summaries alone

    • Standard -- Cross-references the full wiki, supplements with web search

    • Deep -- Multi-agent research pipeline with parallel web search agents

  4. Output -- Markdown reports, Marp slides, matplotlib charts -- saved to output/ and optionally filed back into the wiki

  5. Maintain -- Automated health checks (broken links, orphans, inconsistencies) and suggestions for new articles and connections

Prerequisites

Obsidian plugins (Dataview, Obsidian Git, etc.) are installed automatically by the setup script during /kb-init.

Installation

In Claude Code, run:

/plugin marketplace add rvk7895/llm-knowledge-bases
/plugin install kb@llm-knowledge-bases

All skills are installed as a single plugin.

Quick Start

# Initialize a new knowledge base
/kb-init

# Add sources to raw/, then compile the wiki
/kb compile

# Query the knowledge base
/kb query

# Run a health check
/kb lint

# Deep multi-agent research on a topic
/research <topic>
/research-deep

Available Skills

SkillPurpose
kb-initOne-time setup: scaffolds directories, generates config, writes project files
kbMain skill with four workflows: compile, query, lint, evolve
researchGenerate a structured research outline for a topic
research-deepLaunch parallel agents for deep research on each outline item
research-add-fieldsAdd field definitions to an existing research outline
research-add-itemsAdd research targets to an existing outline
research-reportCompile deep research results into a markdown report

Directory Structure (after /kb-init)

raw/           -- Raw source documents
wiki/          -- LLM-compiled Obsidian vault
output/        -- Query results, slides, charts, reports
kb.yaml        -- Configuration
CLAUDE.md      -- Project instructions for Claude

X/Twitter Integration (Optional)

To ingest tweets, threads, and bookmarks from X, install Smaug:

npm install -g @steipete/bird
git clone https://github.com/alexknowshtml/smaug && cd smaug && npm install
npx smaug setup  # configures X session cookies

Once configured, paste any x.com link and the kb skill will fetch and compile it automatically. Without Smaug, you can still add X content by pasting tweet text directly or using Thread Reader App for threads.

Note: Smaug uses X session cookies for read-only access to your own data. This is not officially supported by X's TOS. Practical risk for personal use is very low, but be aware.

Attribution

  • Andrej Karpathy -- Original vision for LLM-maintained knowledge bases

  • Weizhena -- Deep Research skills adapted for the research pipeline

plugins/kb/skills/kb-preferences/SKILL.md


name: kb-preferences description: "Use when user wants to view, update, reset, or audit report preferences stored in vault kb.yaml. Triggers on '/kb-preferences', 'update report prefs', 'change report style', 'my preferences', or when a passive reflection step in another skill needs to propose preference updates." user-invocable: true allowed-tools: Read, Write, Edit, Glob, Bash, AskUserQuestion

Overview

Manage the report_preferences: block in the vault's kb.yaml. This is a free-text preference store — each field is a prose instruction string that research-report, kb compile, and kb query read when generating output. Factory defaults come from plugins/kb/references/report-style-guide.md, which is consulted only at init / reset time.

Update path in three places:

  1. User runs /kb-preferences ... explicitly — this skill.

  2. User hand-edits kb.yaml — no skill involvement.

  3. Another skill's reflection step proposes updates after finishing a report — that skill calls into this one.

Every write confirms with the user first and logs the change to .meta/_preference_history.md. The kb.yaml and the history file are the only two places state lives.

Prerequisites

  • kb.yaml exists at the vault root. If missing, tell the user to run kb-init and stop.

  • plugins/kb/references/report-style-guide.md exists (plugin-shipped; should always be present).

  • .meta/_preference_history.md exists. If missing, create it with the template below before any write.

Fields managed

All fields under kb.yaml → report_preferences::

FieldWhat it controls
audienceWho the report is written for; framing, polish, hedging
registerTone, sentence style, vocabulary
depthItems-covered × per-item-depth tradeoff
code_handlingInline vs linked vs walkthrough, scaled by codebase count
diagramsASCII / mermaid / prose / tables
self_containmentGlossing, mini-profiles, no appendix deferrals
citationsarXiv-style rigor vs loose references
argument_iterationDraft → advisor → verifier loop + "where this might be wrong"
notesFree-form addendum; grows via reflection

Modes

The skill detects mode from user invocation. Parse the arguments after /kb-preferences:

InvocationModeAction
/kb-preferences (bare)interactiveShow current prefs, ask what to update
/kb-preferences initinitRe-run the 5 init questions, regenerate all fields from style-guide + user answers
/kb-preferences update <field>update-oneFocus on one field; re-ask matching question or accept free-text
/kb-preferences add-note "..."add-noteAppend the quoted string as a new line/paragraph under notes:
/kb-preferences reflectreflect-nowRun the reflection step against the current conversation explicitly
/kb-preferences reviewreviewPrint current report_preferences: block read-only
/kb-preferences reset <field>reset-oneCopy factory default for one field; confirm first
/kb-preferences reset-allreset-allFull reset to defaults; confirm first
/kb-preferences historyhistoryPrint .meta/_preference_history.md
Mode: interactive (bare invocation)
  1. Read kb.yaml report_preferences: section.

  2. If missing, tell user to run /kb-preferences init first and stop.

  3. Print each field with a truncated preview (~80 chars, "..." if longer).

  4. AskUserQuestion: "Which field would you like to update?" with the 9 field names + "none / cancel" as options.

  5. If a field picked, delegate to update-one mode for that field.

Mode: init

Same flow as kb-init §5.5. Ask the 5 open-ended questions (see kb-init SKILL.md for the exact phrasing):

  1. Primary reader → audience

  2. Style preferences → register

  3. Depth vs breadth → depth

  4. Code handling → code_handling

  5. Anything else → notes (+ opportunistic tweaks to diagrams / citations if signaled)

For each answer, open plugins/kb/references/report-style-guide.md, pick the best-matching variant, optionally weave in user phrasing, write to the corresponding field in kb.yaml.

Fields not asked at init (self_containment, citations, argument_iteration) get their ### Default variants unchanged unless question 5 signaled a change.

Confirm the full assembled block with the user before writing. Show the block, ask "Write this to kb.yaml? [y/n/edit]". On edit, let them hand-revise the text.

Log each changed field to .meta/_preference_history.md.

Mode: update-one
  1. Argument is the field name. Validate it's one of the 9 known fields. If notes, prefer add-note mode.

  2. Show the current value of that field to the user.

  3. AskUserQuestion the matching init question for that field.

  4. Consult the style guide, pick a variant, weave in user phrasing.

  5. Show the new proposed value, confirm with user ("Write? [y/n/edit]").

  6. On confirmation, write to kb.yaml and log to history.

Mode: add-note
  1. Argument is a quoted string.

  2. Read current notes: field.

  3. Append the string as a new bullet (or paragraph if multi-sentence).

  4. Confirm with user, write, log.

Mode: reflect-now

Explicit reflection against the current conversation. Used when the user wants to force a pass.

  1. Scan the conversation for preference signals (see Reflection Protocol below).

  2. If signals found, propose updates with diffs.

  3. Confirm, write, log.

If no signals, say so and exit.

Mode: review

Read-only. Print the full report_preferences: block, each field shown in full (no truncation). No changes.

Mode: reset-one
  1. Argument is the field name.

  2. Open plugins/kb/references/report-style-guide.md, pull the ### Default variant for that field.

  3. Show diff between current value and factory default.

  4. AskUserQuestion: "Reset this field to factory default? [y/n]".

  5. On yes, write to kb.yaml, log reset-one trigger in history.

Mode: reset-all
  1. Confirm loudly: "This will replace all 9 fields with factory defaults and re-run the 5 init questions. Continue? [y/n]".

  2. On yes, behave like init mode.

  3. Every field change is a separate history log entry with trigger reset-all.

Mode: history

Print .meta/_preference_history.md. If missing, say "No history yet" and create the file per the template below.

Reflection Protocol

Called in two situations:

  • This skill's reflect-now mode (user explicit)

  • The reflection step at the end of research-report, kb compile, or kb query

Algorithm:

  1. Scan the conversation for signals across these categories:

    • Corrections: user pushed back on output ("no, make it plainer", "drop the academic connectives", "you're using too much jargon")

    • Silent-accept signals: user accepted a non-obvious style choice without comment → validation of that choice

    • Explicit feedback: user said "I liked X" or "next time, do Y"

    • Meta-comments: "for every work I do, remember X"

  2. Map each signal to a specific report_preferences field.

    • Word-level complaints → register

    • Content coverage / depth complaints → depth

    • Code handling complaints → code_handling

    • Citation rigor requests → citations

    • Diagram preferences → diagrams

    • Self-containment feedback → self_containment

    • Argument validation requests → argument_iteration

    • Target-reader hints → audience

    • Anything else that's a one-off preference → notes

  3. Propose concrete edits, not abstract advice. For each signal, show:

    Signal: "<short paraphrase of what user said or did>"
    Field: <field_name>
    Current (excerpt): "<~60 chars>..."
    Proposed (excerpt): "<~60 chars with the change>..."
  4. Present proposals as a numbered list and ask:

    Apply these changes to kb.yaml?
      [a] all   [n] none   [e] edit each one   [1,3] just those
  5. On apply: write accepted changes to kb.yaml, append entries to .meta/_preference_history.md.

  6. If no signals found: skip silently unless mode is reflect-now (in which case say "no signals detected").

Signal strength rules
  • Don't propose a change for a single offhand remark. Require either (a) explicit "remember this" phrasing, (b) two occurrences of the same feedback, or (c) the feedback is directly tied to the report just produced.

  • Don't propose contradictory changes. If the current field already captures the feedback, skip.

  • Don't propose style-guide lists (e.g., don't bloat register with 40 forbidden words from one session). Keep field text under ~400 words; if a field is bloating, start a new notes bullet instead.

.meta/_preference_history.md format

---
title: "Preference Change History"
updated: YYYY-MM-DD
---

# Preference Change History

Append-only log of changes to `report_preferences` in `kb.yaml`.

| Date | Field | Trigger | Old → New |
|------|-------|---------|-----------|
| 2026-04-21 | register | user (/kb-preferences update) | "Plain..." → "Plain and very short..." |
| 2026-04-22 | notes | reflection after /research-report | (empty) → "Per-item profiles max ~150 words" |

Triggers to use in the Trigger column:

  • user (/kb-preferences <mode>) — explicit user invocation

  • user (init) — first-time setup during kb-init

  • reflection after <skill> — reflection step from research-report / kb compile / kb query

  • reset-one / reset-all — factory default restore

  • hand-edit detected — if future tooling notices the user directly edited kb.yaml (not implemented now; reserved trigger)

For each write:

  • Truncate old and new values to ~60 chars; use ... if truncated.

  • If a field previously did not exist, old value is (unset). If a field is cleared, new value is (empty).

  • Update the updated: frontmatter to the current date.

Common Mistakes

  • Forgetting to confirm before writing. Every write path confirms. No silent updates except no-op exits when no signal is detected.

  • Treating notes as a dumping ground. Apply the signal to the specific field if one fits; only fall back to notes if no field matches.

  • Bloating fields indefinitely. Fields cap at ~400 words; past that, start a notes bullet instead.

  • Reading plugins/kb/references/report-style-guide.md at report-generation time. That file is only consulted by this skill and kb-init, at init / reset time. Report-generating skills read kb.yaml.

  • Renaming kb.yaml fields. The field names are a contract with the other skills (research-report, kb). Do not rename.

  • Parsing the free-text field values. They're prose instructions for the next report, not keyword lists.

  • Skipping history logging. Every approved change goes in .meta/_preference_history.md. If the file is missing, create it from the template.

21 files

Advantages

  • Automates the maintenance of interlinked wiki articles and indexes, reducing manual effort. evidence: README.md
  • Supports multi-agent research pipelines for deep, parallel investigation of topics. evidence: README.md

Limitations

  • Requires Claude Code CLI and Obsidian to function. evidence: README.md
  • The LLM owns the wiki, and manual editing of articles outside of the provided workflows is discouraged. evidence: CLAUDE.md

Security

Risk level: Medium risk

This brain runs

Install scripts (1)

  • plugins/kb/setup.sh: sh plugins/kb/setup.sh · uses the network

Agent instructions that run or fetch something (44)

  • plugins/kb/skills/kb-init/SKILL.md: After confirming the vault path, run the bundled setup script via Bash tool:
  • plugins/kb/skills/kb-init/SKILL.md: The script is idempotent — safe to re-run.
  • plugins/kb/skills/kb-init/SKILL.md: python -c "import pptx" 2>/dev/null && echo "python-pptx: available" || echo "python-pptx: not installed (needed for slide extraction)"
  • plugins/kb/skills/kb-init/SKILL.md: python -c "import pandas" 2>/dev/null && echo "pandas: available" || echo "pandas: not installed (needed for dataset analysis)"
  • plugins/kb/skills/kb-init/SKILL.md: When the user sets up Smaug (during init or later), save the install path here.
  • plugins/kb/skills/kb-preferences/SKILL.md: If missing, tell the user to run `kb-init` and stop.
  • plugins/kb/skills/kb-preferences/SKILL.md: | Invocation | Mode | Action | |---|---|---| | `/kb-preferences` (bare) | interactive | Show current prefs, ask what to update | | `/kb-preferences init` | init | Re-run the 5 init questions, regenerate all fields from style-guide + user answers | | `/kb-preferences update <field>` | up …[+30 chars]
  • plugins/kb/skills/kb-preferences/SKILL.md: re-ask matching question or accept free-text | | `/kb-preferences add-note "..."` | add-note | Append the quoted string as a new line/paragraph under `notes:` | | `/kb-preferences reflect` | reflect-now | Run the reflection step against the current conversation explicitly | | `/kb-pref …[+164 chars]
  • plugins/kb/skills/kb-preferences/SKILL.md: If missing, tell user to run `/kb-preferences init` first and stop.
  • plugins/kb/skills/kb-preferences/SKILL.md: Confirm loudly: "This will replace all 9 fields with factory defaults and re-run the 5 init questions.
  • plugins/kb/skills/kb/SKILL.md: If missing, tell the user to run `kb-init` and stop.
  • plugins/kb/skills/kb/SKILL.md: Run `/kb-preferences init` to customize."
  • plugins/kb/skills/kb/SKILL.md: After a compile or query finishes writing its output, run a **lightweight reflection step** — only propose preference updates for **high-confidence signals**:
  • plugins/kb/skills/kb/SKILL.md: The user can run `/kb-preferences reflect` manually if they want a forced pass.
  • plugins/kb/skills/kb/SKILL.md: Run lightweight reflection at the end.
  • plugins/kb/skills/kb/SKILL.md: **Detection heuristic:** Run this check for each file:
  • plugins/kb/skills/kb/SKILL.md: Please provide a transcript, or install: pip install openai-whisper"
  • plugins/kb/skills/kb/SKILL.md: Try: `yt-dlp --write-auto-sub --sub-lang en --skip-download --output "/tmp/%(id)s" "<url>"` to get subtitles · uses the network
  • plugins/kb/skills/kb/SKILL.md: Try extracting with python-pptx: `python -c "from pptx import Presentation;
  • plugins/kb/skills/kb/SKILL.md: For Parquet: `python -c "import pandas as pd;
  • plugins/kb/skills/kb/SKILL.md: Run lightweight reflection at the end (after the answer is delivered;
  • plugins/kb/skills/kb/SKILL.md: Run the appropriate pipeline.
  • plugins/kb/skills/kb/SKILL.md: Run the graph health script if available:
  • plugins/kb/skills/kb/SKILL.md: python plugins/kb/scripts/graph_health.py "<vault_path>" --json --fix-suggestions
  • plugins/kb/skills/kb/SKILL.md: Run the evaluation script if available:
  • plugins/kb/skills/kb/SKILL.md: python experiments/evaluate.py "<vault_path>" --json
  • plugins/kb/skills/kb/SKILL.md: If user approves, execute the improvements
  • plugins/kb/skills/kb/SKILL.md: Re-run evaluation to measure improvement
  • plugins/kb/skills/kb/SKILL.md: Run: `npx smaug fetch <tweet_id>` then `npx smaug process`
  • plugins/kb/skills/kb/SKILL.md: **Install Smaug** (recommended) — `git clone https://github.com/alexknowshtml/smaug && cd smaug && npm install`, then `npx smaug setup` to configure X session cookies (`auth_token` + `ct0` from browser DevTools → Cookies → x.com). · uses the network
  • plugins/kb/skills/kb/SKILL.md: After setup, **save the install path to `kb.yaml`** under `integrations.smaug.path`.
  • plugins/kb/skills/kb/SKILL.md: Try to fetch transcript: `yt-dlp --write-auto-sub --sub-lang en --skip-download --output "/tmp/%(id)s" "<url>" 2>&1` · uses the network
  • plugins/kb/skills/kb/SKILL.md: If yt-dlp not installed: try `pip install yt-dlp` then retry
  • plugins/kb/skills/kb/SKILL.md: Extract video metadata: `yt-dlp --dump-json "<url>" 2>/dev/null | python -c "import sys,json; · uses the network
  • plugins/kb/skills/kb/SKILL.md: On the next `/kb compile` run (for compile-time context searches)
  • plugins/kb/skills/kb/SKILL.md: Forgetting to dispatch the auto-evolve subagent after a query -- it must always run, even if it usually exits silently
  • plugins/kb/skills/research-add-items/SKILL.md: Execute simultaneously:
  • plugins/kb/skills/research-deep/SKILL.md: Execute in batches by batch_size (need user approval to proceed to next batch after completing one)
  • plugins/kb/skills/research-deep/SKILL.md: After completing JSON output, run validation script to ensure complete field coverage:
  • plugins/kb/skills/research-deep/SKILL.md: python ~/.claude/skills/research/validate_json.py -f {fields_path} -j {output_path}
  • plugins/kb/skills/research-deep/SKILL.md: After completing JSON output, run validation script to ensure complete field coverage:
  • plugins/kb/skills/research-deep/SKILL.md: python ~/.claude/skills/research/validate_json.py -f /home/weizhena/AIcoding/aicoding-history/fields.yaml -j /home/weizhena/AIcoding/aicoding-history/results/GitHub_Copilot.json
  • plugins/kb/skills/research-report/SKILL.md: **If `kb.yaml` itself is missing:** tell the user to run `kb-init` and stop.
  • plugins/kb/skills/research-report/SKILL.md: Run `python {topic}/generate_report.py`
  • Medium risk: runs-install-script-network-variable-host (plugins/kb/setup.sh)
  • Medium risk: network-variable-host (plugins/kb/setup.sh:81)
  • Medium risk: runs-instruction-instruction-network (plugins/kb/skills/kb/SKILL.md:206)
  • Medium risk: runs-instruction-instruction-network (plugins/kb/skills/kb/SKILL.md:571)
  • Medium risk: runs-instruction-instruction-network (plugins/kb/skills/kb/SKILL.md:596)
  • Medium risk: runs-instruction-instruction-network (plugins/kb/skills/kb/SKILL.md:600)
  • Low risk: network-instructions (.claude/settings.local.json:14)
  • Low risk: scripts-present (plugins/kb/setup.sh)
  • Low risk: network-instructions (plugins/kb/skills/kb/SKILL.md:202)
  • Low risk: autonomy-phrase (plugins/kb/skills/kb/SKILL.md:402)

Attribution and licence

First committed by
GitHub avatar of rvk7895rvk7895
Publisher
Ritvik Aryan Kalra (Community)
Source
rvk7895/llm-knowledge-bases · commit 342686f
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
ritvik-sarvam, rvk7895

AutoGineer is not affiliated with or endorsed by rvk7895.

Download

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