Claude Code 技能在个人 GitHub 仓库上实现 Karpathy 的 LLM-wiki 模式,并支持 qmd 进行设备内混合搜索。
概览
你的代理负责获取源代码,编写页面,保持交叉引用的最新状态,并从维基中获取答案。设备内混合搜索。无服务器,无SaaS,无数据库——默认本地提交,可选GitHub发布。 - — 每一次导入的源代码和回答的查询都丰富了维基。- — 版本化、可移植、本地或通过GitHub共享,差异以变更日志形式保存。零隐藏状态以致损坏。- — 通过QMD进行BM25 + 向量+LLM重新排序。无外部API,无嵌入上传。- — 唯一的运行时是bash、git、qmd,以及可选的GitHub同步GH。- — 支持Claude Code、Cursor、Codex、Copilot或任何兼容Agent-Skills的代理。- — 过时日期、孤儿、断链、索引漂移、缺失的交叉引用和矛盾。 Karpathy LLM-wiki模式的三层: 1. (来源/)——文章、论文、笔记。不可变;大型语言模型读取但永不重写。2. (页面/、人物/、概念/)——大型语言模型拥有的降价;综合在这里积累。3.(CLAUDE.md+技能。
概述(AI 翻译)
一个自我维护的知识维基,存在于你自己的git仓库中。 你的代理负责导入源代码,编写页面,保持交叉引用的最新,并从维基中回答答案。设备内混合搜索。无服务器,无SaaS,无数据库——默认本地提交,可选GitHub发布。
特色
- 随时间积累的复合词 — 每一次被获取的来源和回答的问题都丰富了维基。
- 你的仓库是存储库 — 有版本限制、可携带、可本地或通过GitHub共享,差异可作为变更日志。零隐藏状态损坏。
- 设备内混合搜索 — BM25 + 矢量 + LLM 通过 [
qmd][qmd] 重新排序。无外部 API,无嵌入上传。 - 无服务器,无SaaS — 唯一的运行时是
bash、git、qmd,以及可选的gh用于GitHub同步。 - Agent-Skills 标准 — 可与 Claude Code、Cursor、Codex、Copilot 或任何 [Agent-Skills-兼容代理][home]相配合。
- lint for drift — 陈旧日期、孤儿、断链、索引漂移、缺失交叉引用和矛盾。
它是如何运作的
来自[Karpathy LLM-wiki模式][gist]的三层:
- 原始来源(
sources/)——文章、论文、笔记。不可变;LLM读取但不重写。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
git-wiki
A self-maintaining knowledge wiki that lives in your own git repo. Your agent ingests sources, writes the pages, keeps cross-references current, and answers from the wiki. On-device hybrid search. No server, no SaaS, no DB — local commits by default, optional GitHub publishing.
bash <(curl -sL https://raw.githubusercontent.com/rarce/git-wiki/main/install.sh)
Features
- Compounds over time — every ingested source and answered query enriches the wiki.
- Your repo is the store — versioned, portable, shareable locally or via GitHub, diffs as a change log. Zero hidden state to corrupt.
- On-device hybrid search — BM25 + vector + LLM rerank via [
qmd][qmd]. No external API, no embeddings uploaded anywhere. - No server, no SaaS — the only runtime is
bash,git,qmd, and optionallyghfor GitHub sync. - Agent-Skills standard — works with Claude Code, Cursor, Codex, Copilot, or any [Agent-Skills-compatible agent][home].
- Lint for drift — stale dates, orphans, broken links, index drift, missing cross-references, and contradictions.
How it works
Three layers from the [Karpathy LLM-wiki pattern][gist]:
- Raw sources (
sources/) — articles, papers, notes. Immutable; the LLM reads but never rewrites them. - Wiki pages (
pages/,people/,concepts/) — LLM-owned markdown; synthesis accumulates here. - Schema (
CLAUDE.md+SKILL.md) — conventions and workflows the LLM follows.
Two navigation files:
index.md— content catalog, grouped by category. Read first on every query.log.md— append-only chronological record, grep-friendly (## [YYYY-MM-DD] |).
ingest query
│ │
▼ ▼
sources/ ──► wiki pages ──► index.md ──► answer with citations
▲ │
└───── qmd search ─┘
git-wiki vs classic RAG
| Classic RAG | git-wiki | |
|---|---|---|
| What’s retrieved | raw chunks | curated wiki pages |
| Quality over time | flat | compounds with each ingest |
| Storage | vector DB | markdown in git |
| Contradictions | silently coexist | surfaced by lint |
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add rarce/git-wiki