llm-wiki
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 7 GitHub stars
Code Fail
- rm -rf — Recursive force deletion command in .github/workflows/ci.yml
- rm -rf — Recursive force deletion command in llm-wiki/install.sh
Permissions Pass
- Permissions — No dangerous permissions requested
This tool is a Claude Code skill that builds and maintains a persistent, interlinked knowledge base from your local source documents. It compiles information once so that context can be referenced automatically without being re-derived on every query.
Security Assessment
The overall risk is Medium. The tool does not request explicitly dangerous system permissions, but the underlying code relies heavily on executing shell scripts. The automated scan flagged multiple instances of "rm -rf" (recursive force deletion) within the installation script and the CI workflow. While this is a common practice for cleaning up directories in shell scripts, it poses a moderate risk if those paths are manipulated or behave unexpectedly on your system. No hardcoded secrets or sensitive data access were detected.
Quality Assessment
The project is licensed under the standard MIT license, ensuring clear usage rights. It appears to be actively maintained, with repository pushes occurring as recently as today. However, community trust and visibility are currently very low. The project has only 7 GitHub stars, indicating that it has not been widely adopted or peer-reviewed by a large audience.
Verdict
Use with caution — the active maintenance and open license are positives, but the low community visibility and potentially destructive shell commands mean you should audit the installation scripts before running them.
Claude Code skill for building persistent, interlinked knowledge bases from source documents. Knowledge is compiled once and kept current — never re-derived per query. Based on Karpathy's LLM Wiki pattern.
LLM Wiki — Compounding Knowledge Base for Claude Code
A Claude Code skill that builds and maintains a persistent, interlinked wiki from your source documents. Based on Andrej Karpathy's LLM Wiki pattern.
Knowledge is compiled once and kept current, not re-derived on every query.
Quick Start
Basic Setup
# 1. Install the skill globally (one-time)
./llm-wiki/install.sh --force
# 2. Set up wiki in your project
~/.claude/skills/llm-wiki/scripts/setup-project.sh ./wiki
# 3. Start Claude Code and ask questions — Claude checks the wiki automatically!
With Session Hooks (Recommended)
For the full experience, install with --with-hooks:
~/.claude/skills/llm-wiki/scripts/setup-project.sh ./wiki --with-hooks
This enables:
- Dynamic wiki stats at startup — page count, recent changes, pending reviews injected at the start of every session
- Hot-cache for session continuity — context from your last session is bridged forward so you don't lose state between sessions
What to Expect
After setup, start Claude Code in your project and ask a question:
You: "What is RISC-V?"
Claude: [reads ./wiki/.llm-wiki/index.md automatically]
[finds relevant pages]
[synthesizes answer with citations]
## Answer
RISC-V is an open standard instruction set architecture...
## Evidence
| Source Page | Key Point | Confidence |
|-------------|-----------|------------|
| [[risc-v]] | ISA overview | high |
You don't need to type /wiki-query for routine questions. Claude reads CLAUDE.md at startup and follows the rule: "check the wiki before answering."
If the wiki doesn't have relevant knowledge, Claude will tell you and suggest adding source files to .raw/.
Adding Knowledge
- Drop source files (markdown, text) into
./.raw/ - Run
/wiki-ingest .raw/your-file.md - The file is analyzed, concepts extracted, and interlinked pages created
Slash Commands
| Command | Description |
|---|---|
/wiki |
Dashboard — total pages, recent activity, pending reviews |
/wiki-ingest <file|URL> |
Two-phase ingest: analyze source → generate interlinked pages |
/wiki-query <question> |
Index-first retrieval — reads only relevant pages, synthesizes answer |
/wiki-lint [--quick|--full] |
Health check. Quick = bash scripts (free). Full = LLM semantic analysis |
/wiki-save |
Save current answer as a permanent synthesis page |
/wiki-graph |
Generate interactive D3.js force-directed knowledge graph |
/wiki-review |
Process the review queue — contradictions, stale pages, knowledge gaps |
Architecture
How Proactive Wiki Works
Session starts
↓
Claude reads CLAUDE.md → "Check the wiki before answering"
↓
SessionStart hook runs → wiki stats, topics, pending items
↓
Slash commands auto-discovered from ~/.claude/commands/
↓
Skill auto-registered as "wiki" from ~/.claude/skills/llm-wiki/
↓
User asks any question
↓
Claude reads index.md → finds relevant pages → answers with citations
Key Architectural Decisions
| Decision | Rationale |
|---|---|
| CLAUDE.md for rules | Always-loaded, no tool call needed. Tells Claude WHEN to use the wiki. |
| SessionStart hook for state | Dynamic wiki stats (pages, topics, pending items) injected each session. |
| LLM is the runtime | All content work done by Claude. No external language runtime needed. |
| Bash for determinism only | SHA-256 hashing, file listing, grep — correctness-critical operations only. |
| Markdown workflow files | Each command has a workflows/*.md procedure. Documentation = executable instructions. |
| Two-phase ingest | Phase 1 (analysis) writes a reviewable analysis before Phase 2 (generation) creates pages. |
| Auto-generated index | index.md regenerated on every change. Enables O(1) lookup of relevant pages. |
| SHA-256 incremental caching | .done sentinel files prevent re-ingestion. Safe to re-drop sources. |
Three-Layer Data Architecture
.raw/ (sources) → wiki/ (pages) → skill (schema + workflows)
(immutable) (LLM-generated) (conventions)
Wiki Directory Structure
wiki/
├── .llm-wiki/
│ ├── schema.md Copy of WIKI_SCHEMA.md
│ ├── config.md User preferences
│ ├── index.md ★ AUTO-GENERATED — never edit by hand ★
│ ├── review.json {pending: [...], resolved: [...]}
│ ├── cache/
│ │ ├── hot-cache.md Multi-session context bridge
│ │ ├── source-manifest.json SHA-256 → source metadata
│ │ ├── state-hash.txt Detects external modifications
│ │ └── ingests/{sha256}.done Sentinel files (idempotent ingestion)
│ └── inbox/{sha256}-analysis.md Phase 1 ingest analyses
├── transformer.md Concept page
├── 2026-04-28-weekly-notes.md Article page
├── alan-turing.md Person page
└── synth-2026-04-28-riscv.md Synthesis page
Page Types
concept — Define a term, idea, methodology, tool
type: concept
language: en | zh | bilingual
Body: Definition → Key Properties → Examples → Related
article — Notes, blog drafts, imported documents
type: article
File: YYYY-MM-DD-{slug}.md
person — Author, researcher, notable individual
type: person
synthesis — Saved query answer (the compounding mechanism)
type: synthesis
query, based_on[], confidence: high | medium | low
File: synth-YYYY-MM-DD-{slug}.md
Bilingual Support
- Auto-detection: CJK character ratio determines
zh/en/bilingual - Page titles:
"English / 中文"format for bilingual pages - Cross-language wikilinks:
aliasesfield provides translations for link resolution - Query matching: Prefers same-language pages, falls back across languages
Skill File Map
llm-wiki/
├── SKILL.md Skill manifest with proactive usage rules
├── WIKI.md CLAUDE.md template (copied to project root)
├── WIKI_SCHEMA.md Page type definitions & conventions
├── install.sh Global installation (one-time)
├── commands/ Auto-discovered slash commands
│ ├── wiki-ingest.md /wiki-ingest
│ ├── wiki-query.md /wiki-query
│ ├── wiki-lint.md /wiki-lint
│ ├── wiki-save.md /wiki-save
│ ├── wiki-graph.md /wiki-graph
│ └── wiki-review.md /wiki-review
├── templates/ Page templates (article, concept, person, synthesis)
├── scripts/ Deterministic bash operations
│ ├── setup-project.sh ★ One-stop project setup
│ ├── init-wiki.sh Bootstrap new wiki directory
│ ├── hash-files.sh SHA-256 hash source files
│ ├── check-stale.sh Index freshness check
│ ├── find-orphans.sh Pages with zero incoming links
│ ├── validate-frontmatter.sh Required field validation
│ └── find-broken-links.sh Dead wikilink detection
├── workflows/ Deep workflow procedures (read by the skill)
│ ├── ingest.md Two-phase source ingestion
│ ├── query.md Index-first knowledge retrieval
│ ├── lint.md Structural + semantic health check
│ ├── save-synthesis.md Persist answers as synthesis pages
│ ├── graph.md D3.js knowledge graph generation
│ └── review.md Review queue processing
└── hooks/ Session lifecycle
├── session-start.sh Wiki stats + PROACTIVE WIKI RULE
└── session-stop.sh Write hot-cache for next session
Compared to RAG
| Typical RAG | LLM Wiki | |
|---|---|---|
| Knowledge state | Re-derived per query | Persisted, compounding |
| Cross-references | None | Bidirectional [[wikilinks]] |
| Contradictions | Undetected | Flagged with callout blocks |
| Confidence | Opaque | Explicit per-page ratings |
| Audit trail | None | based_on provenance chain |
| Query cost | Every query reads source chunks | Index-first: only 3-5 pages read |
| Proactive | No — must be invoked | Yes — CLAUDE.md + hook drives behavior |
Note: Advanced RAG implementations can include some of these features, but they're not standard. LLM Wiki provides them by design.
Design Principles
| Principle | Implementation |
|---|---|
| LLM is the runtime | All content work done by Claude. No external language runtime needed. |
| Bash for determinism | SHA-256, grep, file listing — correctness-critical operations only. |
| Auto-generated index | Regenerated on every change. Never hand-edited. |
| Incremental caching | SHA-256 sentinel files prevent re-work. |
| Two-phase ingest | Human checkpoint between analysis and generation. |
| Hot cache | Multi-session context bridge via SessionStop/SessionStart hooks. |
| True bilingual | language field, CJK detection, cross-language aliases. |
| Lint separation | Quick (bash, free) vs Full (LLM, thorough) — pay only when needed. |
Community
Credits
- Pattern: Andrej Karpathy
- Implementation: Built with Claude Code
License
MIT — see LICENSE for full text.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found