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.
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.
| Folder | Role | Files |
|---|---|---|
| .claude | agent-config | 1 |
| docs | docs | 2 |
| .claude-plugin | folder | 1 |
| plugins | folder | 12 |
Requirements
Works with: Claude Code, OpenCode
Set it up
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
- 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
Claude Code reads CLAUDE.md from this folder automatically.
cd llm-knowledge-bases && claude
AutoGineer scanned these files at commit 342686f.
- 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
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
Ingest -- Raw documents (articles, papers, repos, YouTube transcripts, images, datasets) go into
raw/Compile -- Claude builds a structured Obsidian vault with summaries, backlinks, concept articles, and auto-generated indexes
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
Output -- Markdown reports, Marp slides, matplotlib charts -- saved to
output/and optionally filed back into the wikiMaintain -- Automated health checks (broken links, orphans, inconsistencies) and suggestions for new articles and connections
Prerequisites
Claude Code (CLI), installed and authenticated
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-basesAll 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-deepAvailable Skills
| Skill | Purpose |
|---|---|
kb-init | One-time setup: scaffolds directories, generates config, writes project files |
kb | Main skill with four workflows: compile, query, lint, evolve |
research | Generate a structured research outline for a topic |
research-deep | Launch parallel agents for deep research on each outline item |
research-add-fields | Add field definitions to an existing research outline |
research-add-items | Add research targets to an existing outline |
research-report | Compile 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 ClaudeX/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 cookiesOnce 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
docs/plans/2026-04-03-kb-skills-design.md
LLM Knowledge Base Skills -- Design Document
Date: 2026-04-03
Goal: Build two Claude Code skills that turn a directory of raw source documents into a living, LLM-maintained Obsidian wiki with Q&A, health checks, and self-improvement capabilities.
Architecture: Two skills -- kb-init for one-time setup, kb for four ongoing workflows (compile, query, lint, evolve). All workflows are opus-orchestrated with model-aware subagent dispatch. The wiki is an Obsidian vault with native formatting.
Skill 1: kb-init
Purpose: One-time (or re-runnable) setup that bootstraps a knowledge base project as an Obsidian vault.
Flow
Prerequisites check -- Inform user Obsidian must be installed. Ask if creating a new vault or using an existing one.
Source gathering -- Ask: "How do you want to get raw data in?"
Self-serve -- User drops files in
raw/. Skill provides per-type guidance (Web Clipper setup for articles, PDF downloads, repo snapshots, YouTube transcripts, dataset placement, image downloads).Assisted -- Claude fetches via
WebFetch,Bash(clone repos, download PDFs, pull transcripts).Mixed -- Some of each.
Supported source types: web articles, academic papers (PDF), GitHub repos/code, local markdown/text files, images/diagrams, YouTube transcripts, datasets (CSV, JSON, etc.).
Output preferences -- Ask which output formats the user wants: markdown, Marp slides, matplotlib charts, HTML, CSV, Excalidraw, or others. Extensible -- the skill teaches Claude the pattern for rendering into any format.
Maintenance cadence -- Inform user about health check scheduling:
For daily/hourly: use
/loop(e.g./loop 1d /kb lint)For weekly/monthly: use
/scheduleOr run manually anytime
Generate
kb.yamlat project root:name: "My Knowledge Base" paths: raw: raw/ wiki: wiki/ output: output/ output_formats: - markdown - marp obsidian: wikilinks: true recommended_plugins: - obsidian-web-clipper - obsidian-marp-slides - dataviewScaffold directories +
.obsidian/config if new vault.Write project-level
CLAUDE.mdso future Claude sessions know this is a KB repo and how to operate on it.Write
README.md-- Proper repo README explaining the project, setup, prerequisites, and usage.Next steps guidance -- After scaffolding, inform the user:
How to add raw sources (drop files in
raw/, use Web Clipper, or ask Claude to fetch)"Once you have sources in
raw/, ask me to compile the wiki" (invoke thekbskill)Remind about the four workflows: compile, query, lint, evolve
If maintenance cadence was set, confirm it's active
Skill 2: kb
Purpose: The main operating skill with four workflows for maintaining and querying the knowledge base.
Obsidian-Native Formatting
All wiki output must use Obsidian-compatible syntax:
YAML frontmatter delimited by
---[[wikilinks]]for all internal links (not markdown-style links)[[wikilinks|display text]]when the display name differsTags as
tags: [concept, topic]in frontmatter (Obsidian reads these)Aliases in frontmatter so alternate names resolve to the same article
Embeds for images:
![[image-name.png]]Standard markdown for everything else (headings, lists, code blocks)
Model Strategy
Opus orchestrates every workflow, delegates volume work to cheaper models, and always verifies before anything gets written to the wiki.
| Task | Executor | Verifier |
|---|---|---|
| Index scanning, link checking, file diffing | haiku subagents | -- (mechanical) |
| Summarizing individual sources | haiku subagents | opus spot-checks |
| Wiki article writing | sonnet subagents | opus reviews before committing |
Deep research (/research-deep) | sonnet subagents | opus orchestrates + verifies |
| Research synthesis / final reports | opus | -- |
| Lint issue detection | sonnet subagents | opus prioritizes + filters false positives |
| Query answering | opus | -- |
| Consistency checks across articles | sonnet subagents | opus makes final judgment |
Workflow 1: Compile
Trigger: User adds new files to raw/ and asks to compile, or says "update the wiki."
Incremental detection:
The skill maintains
wiki/_index.mdlisting every raw source and its last-compiled hash/timestamp.On compile, Claude diffs
raw/against the index to find new/changed/deleted files.Only processes what's changed.
Per-file compilation:
Read the raw source
Determine type (article, paper, repo, dataset, image, transcript, etc.)
Extract key concepts, claims, entities, relationships
For each new concept -- create a wiki article
For each existing concept -- update/enrich with new information
Add source backlinks (
[[Sources/source-name]])Auto-categorize into folder structure (Claude decides and evolves categories organically)
Wiki article format:
---
title: Attention Mechanisms
aliases: [self-attention, multi-head attention]
tags: [concept]
sources: [raw/papers/vaswani-2017.pdf, raw/articles/attention-explained.md]
last_updated: 2026-04-03
---
# Attention Mechanisms
Article body with [[wikilinks]] to related concepts...
## Sources
- [[Sources/vaswani-2017]] - Original transformer paper
- [[Sources/attention-explained]] - Blog walkthroughIndex maintenance:
wiki/_index.md-- master list of all articles with one-line summaries (Claude reads this first for Q&A)wiki/_sources.md-- all raw sources and which articles they contributed towiki/_categories.md-- auto-maintained category tree
Workflow 2: Query
Trigger: User asks a question against the wiki.
Step 1: Ask query depth:
Quick -- Wiki-only. Read indexes, find relevant articles, synthesize answer. Fast, no external calls.
Standard -- Wiki + web search. Read wiki first, supplement gaps with
WebSearch/WebFetch.Deep -- Full research pipeline. Invoke
/researchskill to generate outline, then/research-deepdispatches sonnet subagents for comprehensive structured research, opus orchestrates and verifies. Best for big open-ended questions.
Step 2: Execute at chosen depth.
Step 3: Render output in user's preferred format from kb.yaml (markdown, Marp, matplotlib, etc.), saved to output/.
Step 4: Smart suggest filing -- If the output contains genuinely new knowledge (especially from Standard/Deep searches that pulled in external data), suggest filing it back into the wiki. If yes, run the compile workflow on the new material.
Workflow 3: Lint
Trigger: User says "health check," "lint the wiki," or runs via /loop//schedule.
Checks (via sonnet subagents, opus-verified):
Broken links --
[[wikilinks]]pointing to non-existent articlesOrphan articles -- Articles with no inbound links
Orphan sources -- Files in
raw/never compiled into the wikiStale articles -- Source material changed since last compile
Consistency -- Conflicting claims across articles
Missing backlinks -- References that should be bidirectional but aren't
Sparse articles -- Articles below a content threshold
Output: Markdown report at output/lint-YYYY-MM-DD.md, issues grouped by severity. Suggests specific fixes Claude can make if user approves.
Workflow 4: Evolve
Trigger: User says "evolve the wiki," "suggest improvements," or "what's missing."
Flow (opus-orchestrated):
Read wiki indexes and category structure
Dispatch sonnet subagents to analyze article clusters for:
Gaps -- concepts referenced but never given their own article
Connections -- articles in different categories with unexplored relationships
Missing data -- claims that could be filled/verified with web search
Questions -- interesting questions the wiki could answer but doesn't yet
Opus collates, deduplicates, ranks by value
Present ranked suggestions to user
User picks which to pursue -- Claude executes (compile new articles, run queries, fill gaps)
Research Skills Integration
The /research, /research-deep, /research-add-fields, /research-add-items, and /research-report skills are copied into this repo to power the Deep query workflow. These skills are used with attribution to their original author (see README).
Config File: kb.yaml
Lives at project root. Generated by kb-init, read by kb.
name: "My Knowledge Base"
paths:
raw: raw/
wiki: wiki/
output: output/
output_formats:
- markdown
- marp
obsidian:
wikilinks: true
recommended_plugins:
- obsidian-web-clipper
- obsidian-marp-slides
- dataviewRepository Structure
llm-knowledge-bases/
kb.yaml # Config (generated by kb-init)
README.md # Repo documentation
CLAUDE.md # Project-level Claude instructions
.obsidian/ # Obsidian vault config
raw/ # Raw source documents
wiki/ # Compiled wiki (Obsidian vault content)
_index.md # Master article index
_sources.md # Source tracking
_categories.md # Category tree
output/ # Query results, reports, visualizations
skills/ # Claude Code skills
kb-init/
SKILL.md
kb/
SKILL.md
research/ # Copied research skills (with attribution)
...
docs/
plans/ # Design and implementation plans21 files
- .claude-plugin/marketplace.json
- .claude/settings.local.json
- ATTRIBUTION.md
- AUTOGINEER-RUNS.md
- CLAUDE.md
- LICENSE
- README.md
- docs/plans/2026-04-03-kb-skills-design.md
- docs/plans/2026-04-03-kb-skills-implementation.md
- plugins/kb/.claude-plugin/plugin.json
- plugins/kb/references/report-style-guide.md
- plugins/kb/setup.sh
- plugins/kb/skills/kb-init/SKILL.md
- plugins/kb/skills/kb-preferences/SKILL.md
- plugins/kb/skills/kb/SKILL.md
- plugins/kb/skills/research-add-fields/SKILL.md
- plugins/kb/skills/research-add-items/SKILL.md
- plugins/kb/skills/research-deep/SKILL.md
- plugins/kb/skills/research-report/SKILL.md
- plugins/kb/skills/research/SKILL.md
- plugins/kb/skills/research/validate_json.py
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 networkplugins/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-suggestionsplugins/kb/skills/kb/SKILL.md:Run the evaluation script if available:plugins/kb/skills/kb/SKILL.md:python experiments/evaluate.py "<vault_path>" --jsonplugins/kb/skills/kb/SKILL.md:If user approves, execute the improvementsplugins/kb/skills/kb/SKILL.md:Re-run evaluation to measure improvementplugins/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 networkplugins/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 networkplugins/kb/skills/kb/SKILL.md:If yt-dlp not installed: try `pip install yt-dlp` then retryplugins/kb/skills/kb/SKILL.md:Extract video metadata: `yt-dlp --dump-json "<url>" 2>/dev/null | python -c "import sys,json;· uses the networkplugins/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 silentlyplugins/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.jsonplugins/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
rvk7895
- 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