Borrowing it
Nothing to install: this file belongs to swarm-ai-research/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.skills/kb-query/SKILL.mdgit clone --depth 1 https://github.com/swarm-ai-research/swarmWrote 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/swarm-ai-research/swarm/kb-query)<a href="https://agentmods.dev/skills/swarm-ai-research/swarm/kb-query"><img src="https://agentmods.dev/badge/skills/swarm-ai-research/swarm/kb-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/swarm-ai-research/swarm/kb-query"><img src="https://agentmods.dev/badge/skills/swarm-ai-research/swarm/kb-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00076 | $0.01097 |
| Opus 5 | $0.00038 | $0.00549 |
| Sonnet 5 | $0.00015 | $0.00219 |
| Haiku 4.5 | $0.00008 | $0.00110 |
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 6d 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 — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.
EXECUTE NOW
Query: $ARGUMENTS
Parse the query type and run the matching subcommand. The script lives at
scripts/kb_graph_query.py and reads docs/assets/kb_graph.json (it will
rebuild the graph automatically if the JSON is missing).
| Query shape | Subcommand | Example |
|---|---|---|
| "find X", "search X" | find <terms> |
find soft labels |
| "info on X", "describe X" | info <id-or-title> |
info concepts/soft-labels.md |
| "what links to X", "who uses X" | backlinks <X> |
backlinks concepts/governance.md |
| "what does X link to" | outbound <X> |
outbound cmd/ship |
| "X is related to what" | related <X> |
related agent/auditor |
| "how does X reach Y", "connect X and Y" | path <X> <Y> |
path concepts/soft-labels.md papers/delegation_games.md |
| "what's dead/unused/disconnected" | orphans [--kind K] |
orphans --kind command |
| "key/central pages", "where do I start", "what's load-bearing" | central [--kind K] [-n N] |
central -n 10 |
| "broken/stale links", "dead code refs" | stale |
stale |
For free-text questions ("what is X about", "what's similar to X"), prefer
info followed by related — info gives the description, related gives the
neighborhood across all edge kinds including TF-IDF semantic suggestions.
Execution
Run the relevant subcommand as a single Bash invocation and return its output verbatim. Do not synthesize or summarize unless the user asked you to — the caller usually wants the raw structure.
python scripts/kb_graph_query.py <subcommand> <args>
If the user gave a free-text query ("tell me about delegation games"):
python scripts/kb_graph_query.py info delegation_games
python scripts/kb_graph_query.py related delegation_games
If the query is ambiguous (multiple title matches), the script prints the candidates and exits non-zero. Ask the user which one they meant, or pick the clearest exact match by id.
When to use this skill (and when not to)
Use kb-query when:
- You need to know what links to a doc/scenario/command/agent before renaming or deleting it.
- You want the shortest conceptual path between two ideas (introductions, related-work sections, onboarding paths).
- You're looking for semantically related pages that aren't explicitly linked yet (densification candidates, duplicate-content candidates).
- You want orphan pages for triage — by kind, by section.
- You want to navigate the corpus structurally instead of by full-text grep.
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.
- 6d ago First seen · 101 lines · 76 tokens per session scan A 1e72b43f8195
kb-query is a skill published in the GitHub repository swarm-ai-research/swarm (42 stars, last pushed today), licensed MIT. It adds 76 tokens to every session and 1,097 once invoked, about $0.0004 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-09-03.
Other skills, from other repositories
tmux
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
summarize
Summarize or extract text/transcripts from URLs, podcasts, and local files (great fallback for “transcribe this YouTube/video”).
officecli-word-form
Use this skill to create fillable Word forms (.docx) with real Content Controls (SDT) + legacy FormField checkboxes + MERGEFIELD mail-merge placeholders + document protection. Trigger on: 'fillable form', 'form fields', 'content controls', 'SDT', 'word form', 'fill in', 'only editable fields', 'protect document'…
add-matrix
Add Matrix channel integration via Chat SDK. Works with any Matrix homeserver.
add-resend
Add Resend (email) channel integration via Chat SDK.
add-macos-statusbar
Add a macOS menu bar status indicator for NanoClaw. Shows a bolt icon with a green/red dot indicating whether NanoClaw is running, with Start, Stop, and Restart controls. macOS only.