/knowledge-base:kb-answerfrom knowledge-base
Answers questions using a project's knowledge base (kb/) with evidence-backed citations. Useful when documented knowledge should override general knowledge.
Ships in knowledge-base. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Follow these steps in order for every question. For multiple independent questions, use parallel agents.
Check that kb/ exists in the project root. If not, tell the user to run /setup-knowledge-base first.
Always start by reading the KB index:
kb/index.md
The index provides:
If the index is empty or outdated, run the index script first:
python3 scripts/kb-index.py
security/access/) — drill down into sub-groups when a broad category has them.Based on the index navigation:
related: links in the frontmatter if the file references other entriesIf 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).
If kb/scopes/ contains scope files beyond _default.yaml:
in_scope, out_of_scope, and notes to shape your answerIf only _default.yaml exists, skip this step.
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.
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:
**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.> "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.After formulating your answer, verify all citations are accurate by running:
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:
**, *, _, `) 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.
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.
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
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/kb-importImport knowledge from existing documents into structured KB entries.
Reads source documents (Markdown, PDF, DOCX, plain text), extracts key information,
and creates properly formatted KB entries with YAML frontmatter.
/kb-refreshAdd new sources to your knowledge base or re-scrape existing ones to pick up changes.
Supports Notion, Slack, Confluence, and local files. Can be run anytime after /setup-knowledge-base.
/setup-knowledge-baseInteractive onboarding to create a structured knowledge base. Defines categories,
scaffolds the directory structure, creates the index, and optionally imports initial content.
Run this first before using /kb-answer or /kb-import.
npx claudepluginhub techwolf-ai/ai-first-toolkit --plugin knowledge-baseOther plugins' skills for the same job