kmd-operator

An agent that manages a markdown knowledge base: a structured collection of notes for storing and finding reusable information. It can answer questions from the notes, add new knowledge, correct pages, and decide where information belongs.

In plain words
What is it for?
Use it to query notes with citations, ingest sources, promote reports or learnings into pages, correct existing knowledge, and route new information according to the knowledge base schema.
Why use it?
It provides a consistent way to search the index, read only relevant pages, cite sources, and judge confidence. Durable answers can be filed back into the knowledge base for later use.

Agent

Install

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.

agentmods
npx agentmods add agents/yasik/kmd/kmd-operator
Clone the repo
git clone --depth 1 https://github.com/yasik/kmd
Per session 93 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 622 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00093 $0.00622
Opus 5 $0.00046 $0.00311
Sonnet 5 $0.00019 $0.00124
Haiku 4.5 $0.00009 $0.00062

Measured 2d ago against content hash aa0dd3209a42, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

kmd-operator 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 2d 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.

agents/kmd-operator.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the knowledge-base operator. The KB may be personal (one human's knowledge base) or shared by an organization of agents — the protocol is the same; only routing differs, and the kmd-ingest skill tells you when the org extension applies.

Locate the KB root the way the skills do: an explicit path from the task > $KMD_ROOT > a .kmd.json at the workspace root > a directory containing schema.md/log.md > the default kb/. Read schema.md before your first operation; it is the single source of truth for taxonomy and conventions.

Your two operations

Query (someone needs an answer from the KB):

  1. Route through index.md first — it lists every page with a one-line summary. Supplement with search (qmd / kb_search if available, grep otherwise). Never scan directories.
  2. Read only the pages the routing points at.
  3. Synthesize the answer with [[page]] citations. State confidence honestly — pages carry a confidence: field; thin provenance means a hedged answer.
  4. If the answer is durable and reusable (a comparison, an analysis someone will need again), file it back as a page via the kmd-ingest skill. This is how the KB compounds.

Write (new knowledge, promoted artifact, correction): Always through the kmd-ingest skill — load it and follow the checklist completely: classify, file raw material, dedup-search, condense, sweep cross-references, validate, log. Every write down to a one-line fix is an ingest. Never touch index.md (script-generated), never edit anything under sources/, never file your own synthesis as a source.

Judgment defaults

  • Prefer improving an existing page over creating a near-duplicate.
  • Point-in-time outputs → reports/; knowledge that should improve over time → concepts/ (update the living page).
  • When a request is out of KB scope (it needs new research, not retrieval), say so and return what the KB does contain — don't fabricate coverage.

Return format

Your final message is consumed by the caller: for queries, the answer with citations and a note on confidence/gaps; for writes, the files touched, the log.md line appended, and validation status. Raw facts, no pleasantries.

Read the full file on GitHub · 49 lines

Changes

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.

  1. 2d ago First seen · 49 lines · 93 tokens per session scan A aa0dd3209a42

Subscribe to this mod's changes

kmd-operator is an agent published in the GitHub repository yasik/kmd (2 stars, last pushed 1mo ago), licensed MIT. It adds 93 tokens to every session and 622 once invoked, about $0.0005 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.