kb-search
Skill125 starsChanged 5 months agoMITView on GitHub
Search a project's markdown knowledge base (docs/, README files, *.md) via the GitMark CLI — ranked file-level results (FTS5 bm25 + title/description/tags + trigram/fuzzy, fused with RRF) instead of grepping across files — and answer structured questions over YAML frontmatter ("which decisions are active", "what did the agent write that no human verified", "how many plans per service"). Use when you need to find where something is documented, before reading files at random, or to generate an HTML overview/graph of the knowledge base. Handles substrings, typos, Russian morphology.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- gabe4coding/retroagenttheir own version, first seen Oct 17, 2026
- GoogleCloudPlatform/knowledge-catalog-labstheir own version, first seen Oct 13, 2026
- Azure/azure-sdk-toolstheir own version, first seen Oct 13, 2026
- EthanReedLabs/suldetheir own version, first seen Oct 8, 2026
- dingshuxin353/ai-knowledge-vaulttheir own version, first seen Sep 8, 2026
- gumbertnntu-cloud/hermes-kb-searchtheir own version, first seen Jun 24, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- GoogleCloudPlatform/knowledge-catalog★ 9.6ksame name
- Azure/azure-sdk-tools★ 134same name
- GoogleCloudPlatform/knowledge-catalog-labs★ 103same name
- EthanReedLabs/sulde★ 99same name
- dingshuxin353/ai-knowledge-vault★ 17same name
- gabe4coding/retroagent★ 1same name
- gumbertnntu-cloud/hermes-kb-search★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Don't grep frontmatter by hand — query understands lists, nested keys and OKF trust fields.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitMark — knowledge-base search
This plugin treats the repo's markdown as a md + README(index) + git knowledge base.
Markdown is the source of truth; the search index and HTML map are derived and
regenerated from md (.gitmark/ is gitignored). The CLI is pure Python stdlib (PyYAML is
used if installed, otherwise a built-in YAML subset parser).
Script: ${CLAUDE_PLUGIN_ROOT}/skills/kb-search/gitmark.py (when run as a project-local
copy, it's .claude/skills/kb-search/gitmark.py).
Two kinds of questions → two commands
| Question | Command |
| Where is X described / how does X work? (text) | search "<query>" |
| Which / how many docs have property P? (structure) | query key=val … |
search is full-text; query reads frontmatter straight from the md files (no index).
Don't grep frontmatter by hand — query understands lists, nested keys and OKF trust fields.
Commands
G="python3 ${CLAUDE_PLUGIN_ROOT:-.claude/plugins/gitmark}/skills/kb-search/gitmark.py"
$G index # (re)build .gitmark/index.db (fast, always full)
$G search "<query>" [-k 8] # one result per file: path:line › heading [type status]
$G search "<q>" --type runbook,gotcha --status active # filter by frontmatter
$G search "<q>" --scope live # skip historical plan/report snapshots (or: history)
$G query type=decision status!=deprecated --fields path,title,updated
$G query type=plan --count-by service # group & count (lists unrolled)
$G query 'generated.by~claude' trust=unverified # agent-written, nobody verified
$G query 'updated<2026-01-01' type=runbook # possibly outdated runbooks
$G health # KB scorecard: typed %, description %, links, trust, stale
$G lint [paths…] [--json] # ontology check (I1–I9)
$G lint --baseline origin/main # ratchet: exit 1 only if findings grew vs that ref
$G toc [--write] # rebuild <!-- gitmark:toc --> blocks in folder READMEs
$G secrets [files…] # tokens / keys / passwords in the KB (masked)
$G attrs [--write] # .gitattributes: README indexes merge=union
$G map -o docs-map.html # self-contained HTML: tree + rendered md + link graph
$G stat | versionquery conditions (AND-ed): key=val · key!=val · key~substr · key>val /
key<val (ISO dates compare as strings) · 'key?' exists · '!key' missing ·
alternatives status=draft|active · nested verified.by, links.depends_on.
Computed keys: path, area, type (= node_type), trust (unverified|machine|human),
stale. Quote conditions with ?, !, <, >, | in the shell.
Workflow
- Docs changed since the last index →
$G index. $G search "<terms>". Results are per file, best section first; typed KB docs rank above stray READMEs,deprecated/archived/stale docs are demoted (and labeled).[via]shows which channels matched:chunk(terms in a section),doc(title/description/tags/path),phrase(exact substring),fuzzy(typos/forms).- Open the returned
file:lineand read the exact place. - Miss? Reformulate once or twice before giving up: the exact identifier
(
MAX_RETRIES,api-gw-02), the other language (ru↔en), a synonym (деплой/выкатка, rate limit/лимит запросов). Search is lexical — it can't guess synonyms. - Trust signals in results:
stale= past itsstale_after;✓human= verified by a person. Prefer a verified, live doc over a stale one when they disagree.
Principles
- Markdown is the source of truth. Edit knowledge in
.md, never the index. - Don't commit
.gitmark/(it's in.gitignore). - What gets indexed: md files git sees (tracked + untracked, minus
.gitignore), minus.gitmarkignoreprefixes (one path per line — e.g. a docs copy used as test data). - How to maintain the KB (ontology, file placement, trust fields) — see
kb-curate.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

