Kb Answer logo

Kb Answer

Organization
techwolf-ai
kb-answer

Answer questions using your project's knowledge base with evidence-backed citations. Every answer must cite literal quotes from KB files to prevent hallucinations. Use this for any question that should be answered from documented knowledge rather than general knowledge.

Overview

Publishertechwolf-ai
Repositoryai-first-toolkit
Skill namekb-answer
Stars
138
Forks
7
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by techwolf-ai on GitHub. Read the source before you install it.

Installation

Install the Kb Answer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/techwolf-ai/ai-first-toolkit/tree/main/plugins/knowledge-base/skills/kb-answer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/techwolf-ai/ai-first-toolkit.git /tmp/ai-first-toolkit
mkdir -p .claude/skills
cp -r /tmp/ai-first-toolkit/plugins/knowledge-base/skills/kb-answer .claude/skills/kb-answer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Kb Answer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Kb Answer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Kb Answer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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:

bash
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:

bash
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

If only _default.yaml exists, skip this step.

Step 5: Formulate Answer

Answer Format

Yes/No questions: Start with "Yes" or "No", followed by 1 sentence.

Other questions: Answer directly in 1-3 sentences. Add detail only if needed.

If format requirements are provided: Follow them exactly.

Citation Requirements

Every claim in your answer MUST be backed by a literal quote from a KB file.

Format each citation as:

> "exact quote copied from the KB file"
> Source: kb/category/filename.md

Rules:

  • Copy the quote character-for-character. Do not paraphrase, summarize, or rephrase.
  • If you cannot find a literal quote supporting a claim, do not make that claim.
  • Include markdown formatting verbatim. If the source says **Confidential**: ..., your quote must be **Confidential**: ..., not Confidential: .... If the source uses bullet list dashes, include them. Missing markdown is the #1 reason kb-verify.py flags citations. The script has a normalized-match fallback that will PASS with a warning, but strict mode will FAIL, so always copy formatting literally.
  • For long passages, prefer quoting a single self-contained sentence. When a multi-line quote is unavoidable (e.g., a bulleted list that must be cited as one block), use the multi-line form:
    > "first line of the quote
    > second line
    > last line"
    > Source: kb/category/filename.md
    The verifier joins the > lines back into one quote and checks the whole block. Single-line blocks are still preferred for robustness.

What to Avoid

  • Don't over-elaborate. Match answer depth to question depth.
  • Don't pad with "more details available upon request".
  • Don't start with summary phrases like "Based on our documentation...". Go straight to the answer.
  • Be honest about limitations. If something isn't in the KB, say so.

If Information is Missing

  1. State clearly what information is not in the KB
  2. Provide what can be answered from available info
  3. Do not make up or infer information not in the KB
  4. Suggest which KB entry should be created to cover the gap

Step 6: Verify Citations

After formulating your answer, verify all citations are accurate by running:

bash
python3 scripts/kb-verify.py <<'EOF'
{your answer with citations}
EOF

The script checks that every quoted string exists in the referenced KB file. It runs two passes:

  1. Strict: the quote is byte-exact (including markdown markers and whitespace).
  2. Normalized (fallback): markdown markers (**, *, _, `) and whitespace are stripped from both sides before comparison. Reported as PASS (normalized).

Target strict passes. If the script reports PASS (normalized), re-copy the quote with its original markdown so the next verify run is clean.

  • All citations PASS (strict or normalized): present the answer.
  • Any citation FAIL: re-read the source file, copy the exact text (including markdown), and verify again.
  • Use python3 scripts/kb-verify.py --strict answer.md when you want to guarantee byte-exact citations (e.g., before publishing to a customer).

Do not present an answer with any FAIL citations.

Handling Multiple Questions

Related questions (same topic): Group together, share file reads.

Independent questions: Use parallel agents, each following this workflow.

Example:

Q1: "What encryption do we use?"     -> security
Q2: "Who are our customers?"         -> general
Q3: "What's our SLA?"                -> security

Group 1 (security): Q1 + Q3
Group 2 (general): Q2

Frequently asked questions

What does the Kb Answer AI skill do?

Answer questions using your project's knowledge base with evidence-backed citations. Every answer must cite literal quotes from KB files to prevent hallucinations. Use this for any question that should be answered from documented knowledge rather than general knowledge.

Why use Kb Answer on TypingMind?

Because you install it once and use it with any model. Kb Answer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Kb Answer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/techwolf-ai/ai-first-toolkit/tree/main/plugins/knowledge-base/skills/kb-answer. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Kb Answer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Kb Answer?

As many as you like. As long as a model supports skills, you can use Kb Answer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Kb Answer AI skill free?

Yes. It is published on GitHub by techwolf-ai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇