kb-query
Skill1 starsChanged 26 days agoMITView on GitHub
Answers questions from the user's own knowledge base of Markdown files in a Google Drive folder by searching it first, never from memory; each fact names its source file, and when nothing is found it says where it looked. Use when a question may be recorded there - what was agreed or decided, current values and limits, owners, dates, status, open items, terms, how something changed; personal records such as IDs, health, insurance, money, contracts, due dates; or whether some material is already filed. Examples: "When is the launch date?", "Who owns Project Atlas?". When the user has a knowledge base set up (a kb-libraries.json registry, KB_LIBRARIES, or libraries named in project instructions), check it before searching code or answering from general knowledge, even if the user does not say "check my knowledge base". Not for unrelated general questions. Read-only - intake, archive, health checks and setup belong to kb-ingest; saving notes belongs to kb-note.
6 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- Iabstergo1/pdf-to-study-kbtheir own version, first seen Nov 7, 2026
- janezslapnik/llm-wiki-kbtheir own version, first seen Nov 1, 2026
- walkwithedi/evergreen-wikiedited, first seen Oct 11, 2026
- davidmatousek/tachitheir own version, first seen Oct 10, 2026
- viniciusbedum/vb-ai-contexttheir own version, first seen Sep 25, 2026
- tjkuhns/explodabletheir own version, first seen Apr 19, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- walkwithedi/evergreen-wiki★ 212% same
Wrote their own version · 5
- davidmatousek/tachi★ 95same name
- Iabstergo1/pdf-to-study-kb★ 2same name
- viniciusbedum/vb-ai-context★ 2same name
- janezslapnik/llm-wiki-kb★ 1same name
- tjkuhns/explodable★ 1same 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
12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Read-only: search, read and answer.
- Very specific: line 12
Read references/config.md and references/environment.md once before starting.
- Distinctive: line 19
If unsure whether a question falls in a library, read that library's spec Table A to check.
- Very specific: line 25
After the answer, check each library searched for files waiting for consolidation (references/config.md, section 5).
- Distinctive: line 41
Use the operations in the backend file, always inside the chosen library root.
- Distinctive: line 50
Never use a file ID or path from memory.
- Distinctive: line 51
Search with partial strings, not full titles.
- Very specific: line 53
Never use the ignored files listed in references/config.md.
- Distinctive: line 55
Search cap: one search and one reworded retry per keyword.
- Distinctive: line 67
Every statement of fact names its basis file (full file name), with the library when several were searched: "basis: Life 00_Status-Card.md".
- Distinctive: line 68
Use the standard terms from the status card and glossary.
- Distinctive: line 70
No inference. What the library does not record: "not recorded in the knowledge base".
“Common” is measured: kept by at least 6 in 10 of the 6 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
Knowledge base questions
Version: 2.1.0
Read-only: search, read and answer. Never create, change, move or delete anything in a library. Partitions, topics and terms are read from the library, never from this file.
Read references/config.md and references/environment.md once before starting.
Step 1: which library
- A question unrelated to every library's scope (general knowledge, writing, code): do not search; answer normally.
- Load the registry and match the question against each scope. Search the libraries that fit.
- Unclear, or more than one could hold the answer: search every library that might, without asking.
- If unsure whether a question falls in a library, read that library's spec Table A to check; still unsure, treat as rule 3.
- Intake, archive, health check or setup requests belong to kb-ingest.
- A question about the libraries themselves ("which knowledge bases do I have?", "where does this go?"): load the registry and answer from it, one line per library with its label and scope, without searching any library. No registry: references/config.md, section 1.
For each library searched, read its backend file and _kb.json. Start the answer with: Library: <label(s)>.
After the answer, check each library searched for files waiting for consolidation (references/config.md, section 5); remind once per conversation. This skill only reminds and hands "consolidate" to kb-ingest.
Step 2: which file first
| Question about | Read first |
| conclusions, positions, definitions, owners, boundaries, numbers, the current state of something | status card (always consulted; see Step 3 for how much of it to read) |
| whether some material is filed | file index |
| open decisions (work) or due dates, renewals, follow-ups, payments, to-dos (life) | open items |
| how something changed, what it used to be | change log, with the status card for the current state |
| how a term is written, whether a name is standard, open issues | glossary, checked against the status card |
| which partition a subject belongs to | spec, Table A |
| details (meeting content, design specifics, reports, contract terms, statements) | status card to locate, then the source material |
Step 3: search
Use the operations in the backend file, always inside the chosen library root.
Wordings first: for each keyword, list the ways the library may write it: the user's words, the standard term in the status card and glossary, the old forms the spec's Table B maps to it, and for a person, organisation, system or project its Table E name and aliases (from files already read for this question; do not fetch extra files just for this). Search a keyword with up to three of its wordings at once, as the backend file says for several wordings.
- Summary files: find_by_name with the search key (references/config.md).
- Source material by name: find_by_name. File names look like
<partition><topic><type><short title>.md, so a partition can be searched with its prefix ("05"). Family material in a life library carries the family member in the short title. - Source material by content: find_by_text.
Rules:
- Never use a file ID or path from memory; use what the search returns.
- Search with partial strings, not full titles. When a keyword finds nothing, its reworded retry (rule 6) uses wordings not tried yet.
- Stay in the root folder level; never widen the search beyond the library. The entities folder is searched only for questions about one person, organisation, system or project as a whole.
- Never use the ignored files listed in references/config.md.
- Several copies of one summary file: use the most recently modified and add "several copies of this file exist; the newest was used".
- Search cap: one search and one reworded retry per keyword; at most 8 searches for one library and 4 more for each extra library. Then stop and answer as "not found".
- Several source files match: prefer the ones the status card or index mention, then newest first; read at most 5 per library.
- Each library is searched with its own root only.
Quick-note fallback: only when the library itself has nothing relevant, search its notes folder (names.notes_dir) with find_by_text, not its filed subfolder. These count toward the cap.
History: only when the user asks for old versions, search the archive folder, and say the result is a superseded version.
Step 4: answer
- Priority: status card, then change log and lists, then source material. If source material disagrees with the status card, answer with the status card as current, point out the difference and where it is; do not decide who is right.
- Every statement of fact names its basis file (full file name), with the library when several were searched: "basis: Life 00_Status-Card.md".
- Use the standard terms from the status card and glossary; if the user used an older form, give the standard one and the old one in brackets once.
- Numbers and dates exactly as written, with units and the time they refer to; no conversion or estimate. Where files disagree, list each with its source.
- No inference. What the library does not record: "not recorded in the knowledge base". If general knowledge is really needed, put it in a separate paragraph headed "not from the knowledge base".
- Items still open in the open-items list: state that and the deadline recorded.
- A basis file that is still in the consolidation queue (names.consolidation_queue; read the queue once when a source file is the basis): add "this file is not consolidated yet; the status card may not reflect it yet" (「该文件尚未整合,状态卡可能还没有反映它的内容」). When it disagrees with the status card, say which is newer by the filed time in the queue, and still do not decide who is right.
- Quick notes: mark "quick note, not yet filed" with the note's file name, and that it has not been checked; keep any "unconfirmed" mark.
- Answer snapshots (files of the type "answer archive", or quick notes whose source is "knowledge base answer"): use one only when the status card and source material do not answer; say it is a snapshot of its date that is not updated when its sources change, and name the basis files it cites. Where it disagrees with the status card, the status card is current.
- Nothing found: say which libraries, files, keywords and wordings were searched, conclude "nothing found in the knowledge base", and suggest rewording or checking whether the material was filed.
- With sensitivity enabled: never show class-A data in full (ID, card and account numbers, passwords, codes); mask with asterisks, at most the last keep_last characters. No health, money or investment advice and no interpretation of results, diagnoses, returns or coverage; report only what is recorded.
- Answer only what was asked; mention the search process only when nothing was found or sources conflict.
- Replies follow the library language and preferences.output.
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.

