name: corpus-query description: 用于显式配置目标 corpus 后,从任意项目搜索、查询、回忆或综合该 LoreKit corpus 的已有知识。
corpus-query
Optional read-only query gateway for a configured Lorekit corpus. It routes a cross-project question back to that corpus, then follows the target corpus rules.
Config
Read:
~/.config/lorekit/global-corpus.json
Required:
default_corpuslorekit_binor<default_corpus>/bin/lorekitknowledge_dir(default知识库)
Optional:
gbrain_binoutput_dir
If the config is missing, ask for it. Do not guess the corpus path.
Use the configured corpus-local wrapper (lorekit_bin) for CLI calls; fall back only to <default_corpus>/bin/lorekit when that path exists.
Boundary
This skill is an optional cross-project gateway. Target corpus rules remain authoritative.
Before answering, read the relevant local rules when available:
<default_corpus>/AGENTS.md<default_corpus>/CLAUDE.md<default_corpus>/index.md<default_corpus>/skills/wiki-query/SKILL.md
Read only what is needed. Do not bulk-load the corpus.
Query Route
cd <default_corpus>.- For exact terms, run
<lorekit_bin> search "<q>". - Read
<default_corpus>/index.md, then the relevant_INDEX.mdfiles. - Read canonical pages under
知识库/before answering. - If recall is weak and GBrain is configured, use
corpus-gbrain-queryas a candidate discovery layer.
GBrain candidates are not sources of truth. Always map them back to canonical 知识库/ pages.
Output
Answer with:
- concise synthesis
- citations to real corpus pages
- confidence notes when source confidence is low or medium
- query path summary when useful
If the corpus does not contain relevant information, say so. Offer to run web research or create an inbox note only if useful.
Writes
Default is read-only.
Do not modify 知识库/, 原料/, or 每日/ during query.
If the answer has reusable value, ask whether the user wants fileback. Only corpus-fileback performs the write.