ZhengchenTao

Kb Index — AI skill for Claude Code

AI community

Hybrid (vector + BM25) search over many markdown repos in one SQLite file, served over MCP for coding agents: per-hit AGENTS.md chains, link graph, archived-doc detection, incremental delta distributi.

How to install Kb Index

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

What Kb Index does

Hybrid (vector + BM25) search over many markdown repos in one SQLite file, served over MCP for coding agents: per-hit AGENTS.md chains, link graph, archived-doc detection, incremental delta distribution.

Alternatives in AI

  • Model Update — 增量更新财务模型 — 用新财报/新指引/修正假设重算 DCF 内在价值、Comps 隐含价、投资逻辑与目标价,输出 before→after delta 6.6k ★
  • Real-World Pain Points — Project: https://github.com/Narwhal-Lab/MagicSkills For many teams building multi-agent systems, the first thi 277 ★
  • Laravel AI Translator — High quality automatic translate your language files into many languages using AI like Claude, GPT and etc 250 ★

README

kb-index

English | [简体中文](README.zh-CN.md)

Hybrid search over several Markdown repositories, packed into one SQLite file and served to AI coding agents over MCP.

I keep notes, work documentation and a few project wikis in separate repositories, each with its own `AGENTS.md` rules. Agents kept asking "which repo is this in, and which rules apply?", and kept missing documents that used different words than the question. kb-index indexes all of them into a single `index.db` and gives agents four read-only tools. Every result carries the rules of the repository it came from, so the rules travel with the content instead of depending on which directory the agent was started in.

 repositories (git, bare or not / plain directories)
        │  idx index     (incremental; one container run on a schedule)
        ▼
   ┌──────────┐   SQLite: chunks + vectors + FTS5 + link graph + meta (rules, settings)
   │ index.db │   published with a sha256, a manifest and per-file deltas
   └──────────┘
        │  copied to each machine however you like (scp, a share, `ssh host cat`, ...)
        ▼
   kb-index-mcp  (one process per machine, HTTP on loopback, or stdio)
        │
        ▼
   Claude Code / Codex / any MCP client

Mental model: Markdown files are the source code, `index.db` is the build artifact, the indexer is the compiler. Writing documents needs no extra step; if the database breaks, delete it and rebuild.

What it does

  • Hybrid retrieval. A vector leg (cosine similarity) and a BM25 leg (SQLite FTS5, trigram tokenizer, so CJK text works) fused with reciprocal rank fusion. The similarity threshold only cuts the vector leg: identifiers like 8081 or a container name are found by BM25 even when the embedding is useless. When both legs are empty the answer is an honest found: false.
  • Rules travel with content. Each source has a one-line rule; every tool returns the rules of the repositories it hit, plus agents_chain: the AGENTS.md fil