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)- 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. 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.
- Lint for drift — stale dates, orphans, broken links, index drift, missing cross-references, and contradictions.
Three layers from the Karpathy LLM-wiki pattern:
- 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] <op> | <title>).
ingest query
│ │
▼ ▼
sources/ ──► wiki pages ──► index.md ──► answer with citations
▲ │
└───── qmd search ─┘
| 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 |
| Ownership | vendor-specific DB | a git repo you own |
| Portability | migrate DB, reindex | git clone / local copy |
- You read a lot (papers, articles, docs) and wish your agent remembered it.
- You want your knowledge portable, versioned, and yours — not locked in a vendor DB.
- You already work in an Agent-Skills-compatible editor (Claude Code, Cursor, Codex, Copilot…).
- You prefer plain markdown + git over proprietary formats.
This repo hosts the skill, not a wiki. Installing it gives your agent the
git-wikicapability; runningscripts/setup.shcreates your personal wiki as a separate repo. The installer creates a private GitHub repo by default, or a local-only repo withWIKI_VIS=local.
| piece | role |
|---|---|
gh |
create, clone, and push GitHub-backed wiki repos (optional for local-only) |
git |
local commits and branching |
qmd |
on-device BM25 + vector + LLM-rerank search over the wiki |
| the skill | runs from any Agent-Skills-compatible agent and edits the files |
ghauthenticated (gh auth status) for GitHub-backed installsgitwithuser.nameanduser.emailconfigurednode+npm(fornpx skills add)qmdinstalled and available onPATH- An Agent-Skills-compatible agent (Claude Code, Cursor, Copilot, …)
bash <(curl -sL https://raw.githubusercontent.com/rarce/git-wiki/main/install.sh)The installer will:
- Check dependencies (
git,node,npm,qmd, and authenticatedghunless using local-only mode). - Prompt for a wiki repo name, visibility (
private,public, orlocal), and local wiki path. - Create the wiki repo:
gh repo create --clonefor GitHub-backed installs, orgit initforWIKI_VIS=local. npx -y skills add rarce/git-wiki— drops the skill into.agents/skills/git-wiki/inside the wiki repo.- Runs the bundled scaffolder
(
.agents/skills/git-wiki/scripts/setup.sh), which lays outCLAUDE.md,index.md,log.md,pages/,people/,concepts/,sources/, registers the wiki withqmd, commits, and pushes only when anoriginremote exists. The scaffolder does not install external packages.
All three prompts can be pre-set:
WIKI_REPO=my-wiki WIKI_VIS=private WIKI_DIR=~/wiki \
bash <(curl -sL https://raw.githubusercontent.com/rarce/git-wiki/main/install.sh)For a local-only wiki that is never published to GitHub:
WIKI_REPO=my-wiki WIKI_VIS=local WIKI_DIR=~/wiki \
bash <(curl -sL https://raw.githubusercontent.com/rarce/git-wiki/main/install.sh)curl -sL https://raw.githubusercontent.com/rarce/git-wiki/main/install.sh -o install.sh
less install.sh
bash install.shIf you prefer to run each step yourself — for example, to add the skill to a wiki repo you already have:
# 1. Create (or cd into) the wiki repo
gh repo create my-wiki --private --clone
cd my-wiki
# 2. Install the skill into this repo
npx -y skills add rarce/git-wiki
# 3. Run the bundled scaffolder
.agents/skills/git-wiki/scripts/setup.shFor manual local-only setup:
mkdir my-wiki
cd my-wiki
git init -b main
npx -y skills add rarce/git-wiki
GIT_WIKI_LOCAL=1 .agents/skills/git-wiki/scripts/setup.shThe scaffolder expects to be run from inside a git repo; it will not create or clone a repo for you.
From inside the wiki repo (or with WIKI_DIR set), invoke your agent and
use any of:
- Ingest a source: "ingest this article:
<url|path>" - Query: "what do I know about
<topic>?" - Lint: "lint the wiki" — checks for stale dates, orphans, broken links, index drift, and missing cross-references.
The skill takes care of file layout, index/log updates, qmd re-embedding,
and local commits. GitHub-backed repos can also push to origin.
rarce/git-wiki/
├── README.md # this file
└── skills/
└── git-wiki/ # the Agent Skill itself
├── SKILL.md # frontmatter + instructions
├── scripts/
│ └── setup.sh # bootstrap for the user's personal wiki
└── assets/
└── wiki-scaffold/ # files copied into the user's wiki on setup
├── CLAUDE.md # wiki schema
├── README.md
├── index.md
├── log.md
└── gitattributes
See skills/git-wiki/SKILL.md for the full
skill definition, triggering rules, and operation procedures.
<wiki-repo>/
├── CLAUDE.md # schema the LLM follows (loaded automatically)
├── README.md # short intro for humans browsing on GitHub
├── index.md # categorized content catalog
├── log.md # append-only chronological log
├── pages/ # general topic pages
├── people/ # one file per person (kebab-case)
├── concepts/ # one file per concept
└── sources/ # raw source notes (immutable)
- Agent Skills — specification and overview
- skills.sh — the
npx skills addCLI used to install this skill - Karpathy's LLM-wiki gist
qmd— Query Markdown- GitHub CLI
