A growing markdown directory maintained by LLM — not a graph database.
codebase-wiki is a Claude Code plugin that turns source code repositories into a living, cross-referenced knowledge base. It implements the LLM Wiki pattern by Andrej Karpathy — knowledge is compiled at ingest time and continuously maintained, not re-derived per query.
Each time you ingest a repo, the LLM reads the source, extracts structural modules (Entities), maps them to cross-repo design questions (Problem Spaces), and writes or updates Concept pages with comparison tables, wikilinks, and source provenance. The [[wikilink]] network is the graph — open it in Obsidian and you see the knowledge structure directly.
Your source repos → LLM reads code, extracts structure
→ Maps modules to design questions
→ Writes & maintains cross-referenced markdown pages
→ You browse, query, compare, and evolve the wiki
Not a vector database. Not a graph database. No separate graph schema to maintain. Just a directory of markdown files linked by [[wikilinks]] that the LLM owns, writes, and keeps fresh.
- Claude Code
- Python 3.10+ (
pip install -r requirements.txt— only needed for thelinthealth check) - Obsidian (optional — for Graph View)
/plugin marketplace add myl17/codebase-wiki
/plugin install codebase-wiki@codebase-wiki
Or clone and register locally:
git clone https://github.com/myl17/codebase-wiki.git
/plugin marketplace add ./codebase-wiki
/plugin install codebase-wiki@codebase-wiki/ingest /path/to/your/repo my-repo-name
The LLM extracts entities, maps problem spaces, and writes Concept pages. Afterward, open wiki/ in Obsidian to see the graph. Ingest a second repo in the same domain and it will update existing Concept pages with comparisons — this is where the knowledge compounds.
| Skill | What it does |
|---|---|
/ingest |
Read source code → extract entities → map problem spaces → write/update concept pages |
/query |
Answer questions via wikilink traversal + 3-level retrieval escalation |
/compare |
Cross-repo comparison: Concept → Entity → Source code |
/lint |
Full wiki health check: wikilinks, frontmatter, orphans, provenance, repo consistency |
/evolve-apply |
Wikipedia-style concept evolution: merge, split, redirect |
/completion-gate |
Quality gate — runs automatically before any write operation completes |
Each skill's SKILL.md is the LLM's operating manual (currently in Chinese; English translation planned for v0.2.0).
Source → Entity (locatable module with independent responsibility boundary)
→ Problem Space Mapping (translate single-repo entities into cross-repo "how to..." questions)
→ Concept (cross-repo design space with per-framework solutions + comparison tables)
→ Insights & Views (on-demand: /query archives, /compare snapshots)
Evolution layer:
→ /evolve-apply (Wikipedia-style merge / split / redirect for Concept pages as more repos arrive)
Key design decisions:
- Scale-first. Every decision answers: "Does this still work with 500 repos and 500 concepts?"
- Wikilinks are the graph. No separate graph data structure —
[[wikilinks]]ARE the edges. - Concepts accumulate. Cross-repo knowledge lives in Concept pages — each new repo updates existing comparisons.
- Incremental by default. SHA-256 content hashing (
.ingest-state.json) skips unchanged entities on re-ingest. - Knowledge stays fresh. Any read that finds stale wiki data must fix it before regenerating output.
- Evolution built in. Concepts aren't frozen — merge/split/redirect handles drift as more repos arrive.
codebase-wiki/
├── commands/ Claude Code skills — the LLM's operating manual
├── schema/ Conventions & criteria the LLM follows
├── wiki/ Where YOUR knowledge base lives
├── scripts/lint.py Wiki health checker (6 structural checks)
├── tests/test_lint.py pytest suite
├── hooks/ Claude Code session hooks
└── .claude-plugin/ Marketplace metadata
- Claude Code (the runtime)
- Python 3.10+ (for
scripts/lint.py) - Obsidian (optional — wikilink graph visualization)
MIT © myl17
Built on the LLM Wiki pattern. For the Claude Code ecosystem.