Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add GYF0311/lorekit --skill corpus-querygit clone --depth 1 https://github.com/GYF0311/lorekitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/gyf0311/lorekit/corpus-query)<a href="https://agentmods.dev/skills/gyf0311/lorekit/corpus-query"><img src="https://agentmods.dev/badge/skills/gyf0311/lorekit/corpus-query/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/gyf0311/lorekit/corpus-query"><img src="https://agentmods.dev/badge/skills/gyf0311/lorekit/corpus-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00064 | $0.00845 |
| Opus 5.5 | $0.00026 | $0.00338 |
| Sonnet 5.5 | $0.00013 | $0.00169 |
| Haiku 4.5 | $0.00006 | $0.00085 |
Grade A, and why
corpus-query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
corpus-query
Optional read-only query gateway for registered Lorekit corpora. It routes a cross-project question to the named (or default) corpus, then follows that corpus's own rules.
Config
Read:
~/.config/lorekit/global-corpus.json
Required:
default_corpuslorekit_binor<default_corpus>/bin/lorekitknowledge_dir(default知识库)
Optional:
output_dircorpora— multi-corpus registry, enables querying any registered corpus by name:
"corpora": {
"总库": { "path": "/path/to/corpus", "aliases": ["总知识库", "主库"] },
"AI产品": { "path": "/path/to/ai-corpus", "aliases": ["AI产品工作集"] }
}
If the config is missing, ask for it. Do not guess the corpus path.
Target resolution(先定库,再查询)
- 用户点名了库(名称 / alias / 路径片段命中
corpora注册表)→ 路由该库。 - 用户没点名("查总知识库"、"查我的知识库")→ 用
default_corpus。 - 点名了但注册表对不上 → 列出已注册库名让用户选,不要猜路径。
- 问题其实属于当前所在 corpus → 不走本 gateway,直接用当前库的
wiki-query。
CLI 一律优先目标库自带的 <corpus>/bin/lorekit;不存在时才用全局 lorekit(或配置里的 lorekit_bin,仅对 default_corpus 有效)。
Boundary
This skill is an optional cross-project gateway. Target corpus rules remain authoritative.
Before answering, read the relevant local rules when available (<corpus> = the resolved target corpus):
<corpus>/AGENTS.md<corpus>/CLAUDE.md<corpus>/index.md<corpus>/skills/wiki-query/SKILL.md
Read only what is needed. Do not bulk-load the corpus.
Query Route
cd <corpus>(按 Target resolution 定出的库).- For exact terms, run
<corpus>/bin/lorekit search "<q>". - Read
<corpus>/index.md, then the relevant_INDEX.mdfiles. - Read canonical pages under
知识库/before answering. - 目标库无命中时诚实说明,随后直接联网检索兜底(WebSearch / WebFetch),不要停在「库里没有」;回答分层标注「库内已沉淀」(引 corpus 页)vs「联网新查」(给 URL,注明未入库)。另可按需:换另一个注册库查 / 记一条 capture。
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, then fall back to web research directly; label web findings as not-yet-ingested and cite URLs. Offer an inbox capture when a finding is worth keeping.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 84 lines · 64 tokens per session scan A e970f0ee32d4
corpus-query is a skill published in the GitHub repository GYF0311/lorekit (5 stars, last pushed 4mo ago), licensed MIT. It adds 64 tokens to every session and 845 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
corpus-query compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| corpus-queryGYF0311/lorekit | Skill | 5 | 4mo ago | MIT | A | 64 | Claude Code, Codex |
| mindbasefrankchu91/mindbase-llm-wiki | Skill | 142 | 1mo ago | MIT | A | 105 | Claude Code |
| llm-wikizosmaai/pi-llm-wiki | Skill | 634 | 6d ago | MIT | A | 52 | Claude Code |
| openclaw-memory-tencentdb-setupTencentCloud/TencentDB-Agent-Memory | Skill | 31k | yesterday | none | A | 70 | Claude Code, Codex |
| link-memorygowtham0992/link | Skill | 227 | 4d ago | MIT | A | 0 | Claude Code, Codex |
| link-retrievegowtham0992/link | Skill | 227 | 4d ago | MIT | A | 42 | Claude Code, Codex |
| kb-workflowwillynikes2/knowledge-base-server | Skill | 190 | 3d ago | MIT | A | 40 | Claude Code, Codex |