by SamurAIGPT
A personal knowledge base that builds and maintains itself. Drop in sources — Claude (or Codex/Gemini) reads them, extracts knowledge, and maintains a persistent interlinked wiki. Works with Claude Code, Codex, OpenCode, Gemini CLI. No API key needed.
# Add to your Claude Code skills
git clone https://github.com/SamurAIGPT/llm-wiki-agentA coding agent skill. Drop source documents into raw/ and type /wiki-ingest — the agent reads them, extracts knowledge, and builds a persistent interlinked wiki. Every new source makes the wiki richer. You never write it.
Most knowledge tools make you search your own notes. This one reads everything you've collected and writes a structured wiki that compounds over time — cross-references already built, contradictions already flagged, synthesis already done.
/wiki-ingest raw/papers/attention-is-all-you-need.md
wiki/
├── index.md catalog of all pages — updated on every ingest
├── log.md append-only record of every operation
├── overview.md living synthesis across all sources
├── sources/ one summary page per source document
├── entities/ people, companies, projects — auto-created
├── concepts/ ideas, frameworks, methods — auto-created
└── syntheses/ query answers filed back as wiki pages
graph/
├── graph.json persistent node/edge data (SHA256-cached)
└── graph.html interactive vis.js visualization — open in any browser
Requires: Claude Code, Codex, Gemini CLI, or any agent that reads a config file.
git clone https://github.com/SamurAIGPT/llm-wiki-agent.git
cd llm-wiki-agent
Open in your agent — no API key or Python setup needed:
claude # reads CLAUDE.md + .claude/commands/
codex # reads AGENTS.md
opencode # reads AGENTS.md
gemini # reads GEMINI.md
No comments yet. Be the first to share your thoughts!
/wiki-ingest raw/papers/my-paper.md # ingest a source into the wiki
/wiki-ingest raw/articles/my-article.md # works on any markdown file
/wiki-query "what are the main themes?" # synthesize answer from wiki pages
/wiki-query "how does X relate to Y?" # with [[wikilink]] citations
/wiki-lint # find orphans, contradictions, gaps
/wiki-graph # build graph.html from all wikilinks
Plain English also works with any agent:
"Ingest this paper: raw/papers/llama2.md"
"What does the wiki say about attention mechanisms?"
"Check for contradictions across sources"
"Build the knowledge graph and tell me the most connected nodes"
Works with any markdown source — articles, papers, book chapters, meeting notes, journal entries, research summaries.
Persistent wiki — structured markdown pages that accumulate across sessions. Unlike chat, nothing is lost.
Entity pages — auto-created for every person, company, or project mentioned across sources. Updated each time a new source references them.
Concept pages — auto-created for every key idea or framework. Cross-referenced to every source that discusses them.
Living overview — wiki/overview.md is revised on every ingest to reflect the current synthesis across everything you've read.
Contradiction flags — when a new source contradicts an existing claim, it's flagged at ingest time, not buried until query time.
Knowledge graph — graph.html shows every wiki page as a node, every [[wikilink]] as an edge, and Claude-inferred implicit relationships as dotted edges. Community detection clusters related topics.
Lint reports — orphan pages, broken links, missing entity pages, data gaps with suggested sources to fill them.
Going deep on a topic over weeks — reading papers, articles, reports.
/wiki-ingest raw/papers/attention-is-all-you-need.md
/wiki-ingest raw/papers/llama2.md
/wiki-ingest raw/papers/rag-survey.md
# Wiki builds entity pages (Meta AI, Google Brain) and
# concept pages (Attention, RLHF, Context Window) automatically.
/wiki-query "What are the main approaches to reducing hallucination?"
/wiki-query "How has context window size evolved across models?"
/wiki-lint
# → "No sources on mixture-of-experts — consider the Mixtral paper"
By the end you have a structured, interlinked reference — not a folder of PDFs you'll never reopen.
File each chapter as you go. Build out pages for characters, themes, arguments.
/wiki-ingest raw/book/chapter-01.md
/wiki-ingest raw/book/chapter-02.md
# Wiki creates entity and theme pages automatically.
/wiki-query "How has the protagonist's motivation evolved?"
/wiki-query "What contradictions exist in the author's argument so far?"
/wiki-graph # → graph.html shows every character/theme and how they connect
Think fan wikis like Tolkien Gateway — built as you read, with the agent doing all the cross-referencing.
Track goals, health, habits, self-improvement — file journal entries, articles, podcast notes.
/wiki-ingest raw/journal/2026-01-week1.md
/wiki-ingest raw/articles/huberman-sleep-protocol.md
/wiki-ingest raw/articles/atomic-habits-summary.md
/wiki-query "What patterns show up in my journal entries about energy?"
/wiki-query "What habits have I tried and what was the outcome?"
The wiki builds a structured picture over time. Concepts like "Sleep", "Exercise", "Deep Work" accumulate evidence from every source filed.
Feed in meeting transcripts, project docs, customer calls.
/wiki-ingest raw/meetings/q1-planning-transcript.md
/wiki-ingest raw/docs/product-roadmap-2026.md
/wiki-ingest raw/calls/customer-interview-acme.md
/wiki-query "What feature requests have come up most across customer calls?"
/wiki-query "What decisions were made in Q1 and what was the rationale?"
/wiki-lint
# → "Project X mentioned in 5 pages but no dedicated page"
# → "Roadmap contradicts customer interview on priority of feature Y"
The wiki stays current because the agent does the maintenance no one wants to do.
Track a company, market, or technology over time.
/wiki-ingest raw/competitors/openai-announcements.md
/wiki-ingest raw/market/ai-funding-report-q1.md
/wiki-query "How do OpenAI and Anthropic differ on safety approach?"
/wiki-query "Which companies announced multimodal models in the last 6 months?"
/wiki-query "Competitive landscape summary as of today" --save
Two-pass build:
[[wikilinks]] across wiki pages → edges tagged EXTRACTEDINFERRED (with confidence score) or AMBIGUOUSLouvain community detection clusters nodes by topic. SHA256 cache means only changed pages are reprocessed. Output is a self-contained graph.html — no server, opens in any browser.
The schema file tells the agent how to maintain the wiki — page formats, ingest/query/lint/graph workflows, naming conventions. This is the key config file. Edit it to customize behavior for your domain.
| Agent | Schema file |
|---|---|
| Claude Code | CLAUDE.md |
| Codex / OpenCode | AGENTS.md |
| Gemini CLI | GEMINI.md |
| RAG | LLM Wiki Agent | |---|---| | Re-derives knowledge every query | Compiles once, keeps current | | Raw chunks as retrieval unit | Structured wiki pages | | No cross-references | Cross-references pre-built | | Contradictions surface at query time (maybe) | Flagged at ingest time | | No accumulation | Every source makes the wiki richer |
raw/--save — your explorations compound just like ingested sourcestools/ work without a coding agent (require ANTHROPIC_API_KEY)NetworkX + Louvain + Claude + vis.js. No server, no database, runs entirely locally. Everything is plain markdown files.
MIT License — see LICENSE for details.