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.
git clone --depth 1 https://github.com/Ethics03/kgskillWrote 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/commands/ethics03/kgskill/kg-query)<a href="https://agentmods.dev/commands/ethics03/kgskill/kg-query"><img src="https://agentmods.dev/badge/commands/ethics03/kgskill/kg-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/commands/ethics03/kgskill/kg-query"><img src="https://agentmods.dev/badge/commands/ethics03/kgskill/kg-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.00021 | $0.00559 |
| Opus 5.5 | $0.00008 | $0.00224 |
| Sonnet 5.5 | $0.00004 | $0.00112 |
| Haiku 4.5 | $0.00002 | $0.00056 |
Grade A, and why
kg-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 1mo 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.
What it actually says
Answer the user's question by searching and synthesizing knowledge from the wiki. This is not a grep — read pages, follow links, and produce a synthesized answer with wikilink citations.
Steps
1. Resolve KG path
Check in order: $MYKG_PATH env var → ~/.config/mykg/config → ~/.mykgrc → common locations (~/MyKG, ~/Dev/Obsidian/MyKG). If not found, tell the user to run /kg-setup first.
2. Handle utility subcommands
If the query is one of these, handle it directly and stop:
active— read and displayActive.mdrecent— readlog.mdand show the last 10 entriesdecisions <project>— read<project>/Decisions/README.mdand list ADRs; offer to read any in fullplan <project>— list files in<project>/Plans/and offer to read any
3. For all other queries — synthesize from the wiki
This is the main path.
3a. Find relevant pages
Read index.md. Scan the catalog for pages relevant to the query — entities, concepts, synthesis, comparisons, source summaries. Pick the most relevant ones.
3b. Read and follow
Read the selected pages. Follow [[wikilinks]] to related pages where they add depth. Keep reading until you have enough to answer well — typically 3–8 pages.
3c. Synthesize an answer
Write a real answer, not a list of file contents. Integrate what you found across pages. Use [[Page Name]] citations inline so the user knows where claims come from.
3d. Note conflicts
If pages contradict each other on a relevant point, surface the contradiction explicitly rather than picking one silently.
4. Offer to file the answer back
After answering, ask: "Should I save this as a wiki page?" Good candidates:
- A comparison or analysis that took multiple pages to synthesize
- A connection between concepts that isn't captured anywhere yet
- An answer that would save time on a future query
If yes, write it to the appropriate location (wiki/synthesis/, wiki/comparisons/, etc.), update index.md, and append to log.md:
## [YYYY-MM-DD] query | <Question>
- Synthesized: [[wiki/synthesis/<slug>]]
- Sources: [[wiki/X]], [[concepts/Y]]
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.
- 1mo ago First seen · 55 lines · 0 tokens per session scan A bb55674915c3
kg-query is a command published in the GitHub repository Ethics03/kgskill (3 stars, last pushed 6mo ago), licensed MIT. It adds 21 tokens to every session and 559 once invoked, about $0.0001 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.
Other commands, from other repositories
stash
Stash session context [name].
remember
Consolidate stashes + friction into project memory.
plannotator-review
Open interactive code review for current changes, another directory, or a PR URL; --base / --diff-type pin the session's opening diff (session-only, git-only).
kb-ingest
Ingest external material into Sources/ inside the bound project KB, then update registry, index, and daily note as needed.
setup-context
Set up your Skill Memory — a pm-context.md every skill reads so outputs come back tailored to you.
wiki-query
Ask questions against the wiki. Synthesizes answers from wiki pages with cross-reference citations.