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/ernestolee13/para-knowledge-base/kb-querynpx skills add ernestolee13/para-knowledge-base --skill kb-querygit clone --depth 1 https://github.com/ernestolee13/para-knowledge-baseWrote 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/ernestolee13/para-knowledge-base/kb-query)<a href="https://agentmods.dev/skills/ernestolee13/para-knowledge-base/kb-query"><img src="https://agentmods.dev/badge/skills/ernestolee13/para-knowledge-base/kb-query.svg" alt="Measured on agentmods" 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 | $0.00057 | $0.02075 |
| Opus 5 | $0.00028 | $0.01038 |
| Sonnet 5 | $0.00011 | $0.00415 |
| Haiku 4.5 | $0.00006 | $0.00208 |
Grade A, and why
kb-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 4d 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 — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
KB Query
Answer vault-based questions by narrowing the search path before reading full documents. Cite sources with [[wikilinks]]. Do not answer from memory alone when the user asks about vault content.
Core Contract
- Parse the question: subject, scope, time range, desired output.
- If query telemetry is configured, start one explicit
kb-queryoperation before the first vault lookup and retain the returnedoperation_id. - Pick the cheapest route or route combination.
- Start from indexes, project hubs, tags, backlinks, or short search snippets.
- Read full documents only when needed for the answer.
- Synthesize with source
[[wikilinks]]. - Immediately before the final answer, complete that same operation with one semantic
QuerySummary; the runtime Stop hook then finalizes elapsed time and token deltas including answer generation.
Keep source reading under a small budget by default. Expand only when evidence is insufficient.
Routes
| Route | Use when | First move |
|---|---|---|
| A. Direct folder | Target project/category is clear | Read the category index or project hub if present, then selected files |
| B. Tag/topic collection | Topic spans folders | Use tag inventory/search, then inspect matched candidates |
| C. Backlink/reference | User asks what cites or depends on something | Use Obsidian backlinks or targeted wikilink search |
| D. Index/log browse | User asks overview, recent activity, trend, or change history | Read relevant index and only the needed log window |
| E. Full-text search | User gives a term, phrase, error, or concept | Use short search/context results before opening files |
Complex questions can combine routes. Example: project status may use Route A for the project hub, Route D for recent _log.md, and Route E for a specific term.
Search Rules
- Do not always start from
0. Common/index.md; choose the route that best matches the question. - For project-like names, first try the project hub if the vault uses project hubs (
1. Projects/<slug>/_index.md) or inspect1. Projects/_index.mdto resolve the slug. Do not run broad full-text search on the project name before checking indexes. - For topic-wide questions, prefer tags, backlinks, and short context snippets over reading every match.
- Use
search:contextfor specific terms, errors, phrases, or concepts. Avoid high-frequency broad queries such as category names, project names, or large OR patterns unless the output is capped. - If a first hit-list command returns many files, narrow to candidate paths before requesting context lines. Do not run vault-wide context grep over all matches.
- For recent activity, project
_log.mdfiles are usually newest-first when the vault uses them. Read from the top. - For
0. Common/log.md, parse by[YYYY-MM-DD]records and inspect only the requested date range. - Avoid logs unless the question needs time, change history, trends, or root-cause evidence.
- If the answer is already supported by index/search snippets, do not open more documents just to be exhaustive.
- If a candidate document has no frontmatter
summaryfield, read its first paragraph as a lightweight substitute before deciding whether the full document is needed. - Skip full-body reads for documents with frontmatter
type: data(large data-style listings — raw exports, link dumps, telemetry-adjacent tables). Read only their frontmatter andsummary(or first-paragraph fallback) to judge relevance; open the full body only if the user explicitly asks for its contents.
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.
- 4d ago First seen · 129 lines · 57 tokens per session scan A 3a2f789f0a09
kb-query is a skill published in the GitHub repository ernestolee13/para-knowledge-base (21 stars, last pushed 27d ago), licensed MIT. It adds 57 tokens to every session and 2,075 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-30.
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).
compile-wiki
Merge source summaries into durable concept pages with backlinks, index entries, and explicit open questions.
refresh-context
Re-snapshot Core Context.md from the 9 mothership system files and key essays when the mothership changes or the snapshot is older than 30 days; also responds to /refresh-context and 코어 컨텍스트 갱신.
qa-agent
Answer questions from the vault, then file durable insights back into the knowledge base.
llm-wiki
The foundational knowledge distillation pattern for building and maintaining an AI-powered Obsidian wiki. Based on Andrej Karpathy's LLM Wiki architecture. Use this skill whenever the user wants to understand the wiki pattern, set up a new knowledge base, or needs guidance on the three-layer architecture (raw sources…
wiki-lint
Audit and maintain the health of the Obsidian wiki. Use this skill when the user wants to check their wiki for issues, find orphaned pages, detect contradictions, identify stale content, fix broken wikilinks, or perform general maintenance on their knowledge base. Also triggers on "clean up the wiki", "what needs…