/knowledge-base:setup-knowledge-basefrom knowledge-base
Interactive onboarding that creates a structured knowledge base with categories, directory scaffolding, index, and optional content import. Run before using /kb-answer or /kb-import.
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.
Interactive setup that creates a structured, evidence-backed knowledge base in your project.
Ask the user (one question at a time, use AskUserQuestion):
Example category suggestions by domain:
Before creating anything, present the plan to the user:
I'll create this structure in your project:
kb/
.kb-config.yaml
index.md
scopes/
_default.yaml
README.md
{category1}/
{category2}/
{category3}/
scripts/
kb-index.py
kb-verify.py
kb-validate.py
kb-search.py
CLAUDE.md (or append to existing)
Ready to proceed?
Wait for user confirmation.
Read the template files from this plugin and adapt them for the user's project:
Read templates/kb/.kb-config.yaml from this plugin. Create kb/.kb-config.yaml in the user's project, replacing the placeholder categories with the ones chosen in Step 1. Replace {{today}} with today's date.
Read templates/kb/index.md from this plugin. Create kb/index.md, adding seed keywords for each chosen category. For example, if the user chose "security" and "technical", add initial keyword entries:
| encryption, certificates, access | security/ |
| API, architecture, deployment | technical/ |
Read templates/kb/scopes/_default.yaml from this plugin. Copy to kb/scopes/_default.yaml.
Read templates/kb/scopes/README.md from this plugin. Copy to kb/scopes/README.md.
Create empty directories for each chosen category: kb/{category1}/, kb/{category2}/, etc.
Read scripts/kb-index.py from this plugin. Copy to scripts/kb-index.py in the user's project.
Read scripts/kb-verify.py from this plugin. Copy to scripts/kb-verify.py in the user's project.
Read scripts/kb-validate.py from this plugin. Copy to scripts/kb-validate.py in the user's project.
Read scripts/kb-search.py from this plugin. Copy to scripts/kb-search.py in the user's project.
Read templates/CLAUDE.md from this plugin. Create (or append to existing) CLAUDE.md in the user's project root. Replace {{category}} placeholders with the actual categories chosen in Step 1.
The KB structure is ready, but empty. Ask the user:
"Do you have existing knowledge sources you'd like to import? (Notion pages, Slack channels, Confluence, local files)"
/kb-refresh to populate the KB from those sources. It handles source discovery, scraping, and entry creation.templates/kb/example/sample-entry.md from this plugin for the format, but write an entry relevant to the user's domain rather than copying the sample.Run the index script to confirm everything is wired up:
python3 scripts/kb-index.py
Regenerate the "All Files by Category" section of kb/index.md from the current entries:
python3 scripts/kb-index.py --write
Validate KB health (frontmatter, categories, related links):
python3 scripts/kb-validate.py
If kb-index.py lists the entries and kb-validate.py reports "All entries valid", setup is complete.
Tell the user:
kb/{category}/ folder; nested sub-folders like kb/security/access/ are supported)/kb-answer)/kb-import)/kb-refresh)python3 scripts/kb-index.py)python3 scripts/kb-search.py "keyword")What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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-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.
Other plugins' skills for the same job