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 agentmods add skills/gyf0311/lorekit/corpus-querynpx skills add GYF0311/lorekit --skill corpus-querygit clone --depth 1 https://github.com/GYF0311/lorekitWhat 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 | $0.00064 | $0.00845 |
| Opus 5 | $0.00032 | $0.00423 |
| Sonnet 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 3d 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.
- 3d 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 1mo ago), licensed MIT. It adds 64 tokens to every session and 845 once invoked, about $0.0003 per session on Opus 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.
Other skills, from other repositories
llm-wiki
Build and maintain a persistent, interlinked Obsidian-compatible markdown wiki using Karpathy's LLM Wiki pattern. Extension-backed with auto-generated metadata, guardrails, and 14 custom tools (+3 opt-in agent-trajectory tools).
mindbase
Maintain a persistent AI-tended research wiki. Activates when the user wants to ingest a source (PDF, URL, article, paste), capture a thought, build the wiki context, query what's already known, lint for orphans/contradictions, or maintain page conventions. Phrases include "add this to my wiki", "today I decided…"…
llm-wiki
Build and maintain an LLM-curated personal knowledge base — the "LLM Wiki" pattern from Andrej Karpathy's April 2026 gist. Use this skill whenever the user wants to ingest a source (paper, article, transcript, PDF, notes) into a persistent compounding knowledge base, ask a question against accumulated notes, lint or…
wiki-ingest
Process source files into synthesised wiki pages. Always use this skill when the user says /wiki-ingest, 'import these files', 'process my clippings', 'ingest this article', 'I have new articles to add', 'turn this PDF into a wiki page', 'what's in my raw/ folder', or 'what have I ingested'. Also use when the user…
wiki-config
Set up, validate, and reconfigure the llm-wiki skill suite. Always use this skill when the user says /wiki-config, asks to 'set up my wiki', 'configure wiki', 'initialize wiki config', mentions 'page structure problems', 'schema issues', 'missing templates', 'wiki help', 'how does the wiki work', or when any wiki…
wiki-lint
Health-check the wiki: scan all pages for broken wikilinks, orphaned pages, stale index entries, missing connections, em-dash violations, orphaned assets, and schema errors. Produces a dated lint report. Always use this skill when the user says /wiki-lint, mentions broken links, dead wikilinks, orphaned pages, 'what's…