/knowledge-base:kb-importfrom knowledge-base
Imports knowledge from existing documents (Markdown, PDF, DOCX, plain text) into structured KB entries with YAML frontmatter. Supports single-document and bulk modes.
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.
Import knowledge from existing documents into your knowledge base.
Read the KB config to understand available categories:
kb/.kb-config.yaml
Read the index to see what already exists:
kb/index.md
Read the source file provided by the user. Supported formats:
Analyze the document and propose a plan to the user:
Present this as a table:
| # | Title | Category | Source Section |
|---|-------|----------|---------------|
| 1 | ... | ... | ... |
Wait for user confirmation before proceeding.
For each planned entry, create a markdown file with YAML frontmatter:
---
title: "Entry Title"
description: "Brief one-liner for index lookup"
category: {category}
tags: [{tag1}, {tag2}]
sources: ["{source_filename}"]
last_updated: "{today's date}"
related:
- {category}/{related-file}.md
---
## Section Title
Content here. Write clear, quotable statements.
Each fact should be a self-contained sentence that can be cited as evidence.
data-encryption.md, product-overview.mdAfter creating entries, regenerate the index and validate:
python3 scripts/kb-index.py --write # rewrite kb/index.md's "All Files by Category"
python3 scripts/kb-validate.py # check frontmatter, categories, related links
Review the stdout output to verify all new entries appear correctly. Resolve any validate errors before continuing.
Report to the user:
related: links between themUse this when the user wants to ingest many documents in one go (e.g., "import everything in ~/docs/policies/", or a list of 5+ files).
.md, .pdf, .txt, .docx). Skip obvious noise (.DS_Store, node_modules, hidden files).Read the frontmatter / first page of each file to get a title guess. Produce a single combined plan:
| # | Source file | Proposed KB entry | Category |
|---|-------------|-------------------|----------|
| 1 | policies/acceptable-use.pdf | security/acceptable-use.md | security |
| 2 | policies/retention.pdf | security/data-retention.md | security |
| ...
Rules:
security/access) when the batch is large enough that a flat category would become unwieldy (> ~10 entries in one category).Wait for user confirmation on the full plan before proceeding.
After all files are processed:
python3 scripts/kb-index.py --write
python3 scripts/kb-validate.py
python3 scripts/kb-search.py "sanity-check-term" # spot-check a term that should appear
Report: X created, Y updated, Z skipped (with reason per skip). Flag any validate warnings or errors.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub techwolf-ai/ai-first-toolkit --plugin knowledge-base4 skills in this plugin
/kb-answerAnswer 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.
/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.
Other plugins' skills for the same job