# Kb Query

> Use when answering a question from one or more `llmkb` knowledge bases — route via the index, search at scale, cite the pages used, and optionally file valuable new synthesis back as a page (the compounding loop).

- Skill: `hogu-dev/kb-query` (Agent Skill)
- Install (CLI): `npx skillmds@latest add hogu-dev/kb-query`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hogu-dev/kb-query/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: hogu-dev (https://skillmd.com/u/hogu-dev)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/hogu-dev/kb-query

---


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

