kb-query

kb-query is a skill for Claude Code, Codex from hogu-dev/llmkb. It costs 50 tokens per session (384 once invoked), scanned A, original, Apache-2.0.

A method for answering questions from one or more llmkb knowledge bases, which are collections of searchable Markdown pages.

In plain words
What is it for?
It is for routing questions through a knowledge-base index, searching when needed, reading selected pages, citing them, and optionally saving durable new findings back into the knowledge base.
Why use it?
It helps find the relevant pages, use evidence from them, and show which pages support the answer instead of relying on memory alone.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for routing questions through a knowledge-base index, searching when needed, reading selected pages, citing them, and optionally saving durable new findings back into the knowledge base.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hogu-dev/llmkb/kb-query
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.

Any agent
npx skills add hogu-dev/llmkb --skill kb-query
Clone the repo
git clone --depth 1 https://github.com/hogu-dev/llmkb

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for kb-query

README.md
[![agentmods](https://agentmods.dev/badge/skills/hogu-dev/llmkb/kb-query/github.svg)](https://agentmods.dev/skills/hogu-dev/llmkb/kb-query)
Your own site
<a href="https://agentmods.dev/skills/hogu-dev/llmkb/kb-query"><img src="https://agentmods.dev/badge/skills/hogu-dev/llmkb/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.

agentmods 80×15 button for kb-query

Your own site · 80×15
<a href="https://agentmods.dev/skills/hogu-dev/llmkb/kb-query"><img src="https://agentmods.dev/badge/skills/hogu-dev/llmkb/kb-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 384 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00050 $0.00384
Opus 5.5 $0.00020 $0.00154
Sonnet 5.5 $0.00010 $0.00077
Haiku 4.5 $0.00005 $0.00038

Measured 1mo ago against content hash 714c8f1c0e02, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 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.

skills/kb-query/SKILL.md · 36 lines

What it actually says

kb-query

Answer a question from one or more llmkb knowledge bases, cite what you used, and — when the answer produced durable new knowledge — file it back.

When to use

A user asks a question that the KB(s) should be able to answer, or asks you to research within them.

Steps

  1. Route via the index first. Read wiki/index.md (each KB's) — one line per page — to find the pages most likely to hold the answer. For multiple KBs, read each index; results are tagged by KB name.
  2. Search at scale. If the index is large or routing is unclear, run llmkb search "<query>" --kb <dir> (repeat --kb for several KBs). Use the hits to pick pages.
  3. Read the pages you selected and compose the answer.
  4. Cite every page you drew on by its [[Title]].
  5. Compound (optional but encouraged). If answering produced durable new synthesis not already captured, write it as a concept page (empty sources = agent-authored), then run llmkb reindex, append a ## [YYYY-MM-DD] synthesis | <title> line to wiki/log.md, and run llmkb lint.

Done when

The question is answered with page citations, and any new synthesis is filed, indexed, logged, and lint-clean.

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. 1mo ago First seen · 36 lines · 50 tokens per session scan A 714c8f1c0e02

Subscribe to this mod's changes

kb-query is a skill published in the GitHub repository hogu-dev/llmkb (1 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 384 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

test-driven-development

Strict red-green-refactor TDD workflow for implementing features, fixing bugs, or changing behavior in Rails applications. Enforces the discipline of writing a failing test before any production code. Use whenever you want to implement with TDD — whether a new feature, a bugfix, a refactor, or any behavior change.

thoughtbot/rails-consultant · 68 tokens

git-commit

Turn the working changes into one or more atomic commits with well-written messages. Use whenever the user runs /git-commit or asks to commit their work, wrap up a feature, or "commit what I have.".

thoughtbot/rails-consultant · 47 tokens

recursive-decomposition

Decompose dense codebase-wide, multi-document, PDF, and aggregation work even when the input fits the context window, following Recursive Language Models (Zhang, Kraska, Khattab, 2025). Use when the user asks to analyse all files, a whole repo, all docs, large PDFs, or to aggregate or multi-hop across scattered…

massimodeluisa/recursive-decomposition-skill · 144 tokens

design-tokens

This skill should be used when a user wants to scaffold or refactor a design token system — e.g. "set up design tokens", "create a design system foundation", "extract these hardcoded colors into tokens", "add a type scale", "theming setup", or "dark mode tokens". It produces a single source of truth for color, type…

TimboGP/timbogp-marketplace · 98 tokens

slice

Turn a feature into well-defined, independently shippable slices — whether it's an epic that needs breaking apart or a single story that needs sharpening into a job story.

thoughtbot/rails-consultant · 34 tokens

standup

Write a client update — identify what was done, what's next, and surface risks before they become surprises. End of day, start of day, or end of week.

thoughtbot/rails-consultant · 37 tokens