kb-answer

A project knowledge-base guide for answering questions from documented information. A knowledge base is a collection of project files organised for searching.

In plain words
What is it for?
Use it to answer questions about documented project knowledge with quoted citations. It checks the knowledge-base index, follows related links, and searches further when needed.
Why use it?
It reduces guesses and unsupported answers by requiring evidence from the project's documents. It also tells the agent how to find relevant files when information is spread across the project.

Skill for Claude CodeCodex

Part of the knowledge-base plugin — 4 skills shipped together

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 skills/techwolf-ai/ai-first-toolkit/kb-answer
Any agent
npx skills add techwolf-ai/ai-first-toolkit --skill kb-answer
Clone the repo
git clone --depth 1 https://github.com/techwolf-ai/ai-first-toolkit

Made for: Claude Code, Codex.

Or install knowledge-base, the plugin that ships this one along with the rest of its 4 skills.

Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,373 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.00046 $0.01373
Opus 5 $0.00023 $0.00687
Sonnet 5 $0.00009 $0.00275
Haiku 4.5 $0.00005 $0.00137

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

Security

Grade A, and why

kb-answer 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 3d 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.

plugins/knowledge-base/skills/kb-answer/SKILL.md · 156 lines

How it starts

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

KB Answer Workflow

Follow these steps in order for every question. For multiple independent questions, use parallel agents.

Prerequisites

Check that kb/ exists in the project root. If not, tell the user to run /setup-knowledge-base first.

Step 1: Navigate Using the Index

Always start by reading the KB index:

kb/index.md

The index provides:

  • Keyword Lookup: find the right file by keyword
  • Category overview: all files grouped by topic

If the index is empty or outdated, run the index script first:

python3 scripts/kb-index.py

Quick Navigation

  1. Check the keyword lookup table for matching terms
  2. Go to the matching file(s)
  3. If no keyword match, browse the category that best fits the question. Categories can be nested (e.g., security/access/) — drill down into sub-groups when a broad category has them.

Step 2: Read Relevant Files

Based on the index navigation:

  1. Read the most relevant file first
  2. Check related: links in the frontmatter if the file references other entries
  3. Read additional files if the first doesn't fully cover the question

Step 3: Search (if needed)

If the index doesn't point to the right file, run the search script to rank entries by keyword across title, tags, description, category, and body:

python3 scripts/kb-search.py "your keyword"

Options worth knowing:

  • --category security restricts to a category (matches nested children like security/access too).
  • --tag mfa filters by frontmatter tag (repeatable).
  • --limit 5 caps results.
  • --json for a machine-readable list (useful when chaining into another step).

Fall back to the Grep tool with path kb/ only if the search script misses a term (e.g., regex-only patterns).

Step 4: Check Active Scope

If kb/scopes/ contains scope files beyond _default.yaml:

  1. Ask the user which scope applies (if not already established in this conversation)
  2. Read the active scope file
  3. Apply in_scope, out_of_scope, and notes to shape your answer

Read the full file on GitHub · 156 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. 3d ago First seen · 156 lines · 46 tokens per session scan A 9a212887ac23

Subscribe to this mod's changes

kb-answer is a skill published in the GitHub repository techwolf-ai/ai-first-toolkit (96 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 1,373 once invoked, about $0.0002 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-30.