smallnest

Chao RAG Wiki — AI skill for Claude Code

AI community

a rag-based wiki skill with obsidian just like karpathy-llm-wiki.

How to install Chao RAG Wiki

This entry records only its repository, not the path inside it, so there is no exact command to give. Open smallnest/chao-rag-wiki and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Chao RAG Wiki does

a rag-based wiki skill with obsidian just like karpathy-llm-wiki.

Alternatives in AI

  • WeKnora — Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, an 26.9k ★
  • Llmwiki — Open Source Implementation of Karpathy's LLM Wiki 1.5k ★
  • Nocturne Memory — A lightweight, rollbackable, and visual Long-Term Memory Server for MCP Agents 1.3k ★

README

chao-rag-wiki

A RAG (retrieval-augmented generation) skill for Claude Code. It builds a semantic vector index over your local `raw/` document corpus and answers questions by retrieving the most relevant chunks.

  • Embeddings: any OpenAI-compatible /embeddings endpoint, set via RAG_EMBED_* env vars (default: Qianfan bge-large-zh, 1024-d). OpenAI, Voyage, OneAPI/OpenRouter, local vLLM all work.
  • Retrieval: hybrid — dense vector search (turbovec TurboQuantIndex) fused with lexical BM25 via Reciprocal Rank Fusion (CJK-aware, dependency-free), plus an optional LLM rerank stage (--rerank) for higher precision
  • Inspired by: karpathy-llm-wiki, but retrieval-first — raw/ is never modified and there is no manual article-compilation step.

Install

npx skills add smallnest/chao-rag-wiki

Requirements

  • An embedding API key — QIANFAN_API_KEY for the default Qianfan provider, or RAG_EMBED_API_KEY for any other (see Embedding provider below)
  • Python 3 (a self-contained venv is created under .venv/)

Embedding provider

Provider-agnostic via env vars (no keys are hard-coded or stored in the index):

Env var Default Meaning
RAG_EMBED_BASE_URL https://qianfan.baidubce.com/v2 API base (no /embeddings)
RAG_EMBED_API_KEY falls back to QIANFAN_API_KEY, then OPENAI_API_KEY Bearer key
RAG_EMBED_MODEL bge-large-zh model name
RAG_EMBED_DIM 1024 vector dimension

OpenAI: `RAG_EMBED_BASE_URL=https://api.openai.com/v1 RAG_EMBED_MODEL=text-embedding-3-small RAG_EMBED_DIM=1536`. Voyage (Anthropic's recommended embeddings — Claude has no embedding API): `RAG_EMBED_BASE_URL=https://api.voyageai.com/v1 RAG_EMBED_MODEL=voyage-3`. Changing provider/model/dim requires a full rebuild.

Quick start

SK=~/.claude/skills/chao-rag-wiki

# one-time venv (skip if .venv exist