Set up, initialize, or configure the local markdown knowledge base for a project. Use when the user says "set up the knowledge base", "init the KB", "configure the markdown KB", "index my docs", "add a doc source to the KB", or wants the project''s markdown searchable by `kb search`. Wraps `kb init` end-to-end through `kb index` and a smoke `kb search`.
npx skills add https://github.com/BlackBeltTechnology/pi-agent-dashboard --skill kb-setup
@blackbelt-technology/pi-dashboard-kb builds a zero-token, local SQLite/FTS5
index over this project's markdown so kb-search can retrieve before answering.
This SKILL does the one-time bring-up. Retrieval is pull (the agent calls
kb); nothing is auto-injected.
.pi/dashboard/knowledge_base.json exists yet and the project has docs..pi/dashboard/knowledge_base.json(project) and ~/.pi/dashboard/knowledge_base.json (global). Run
kb config to see the resolved layering. If a project config already exists
and is healthy, skip to step 5 (smoke search) unless the user wants changes.
global config. Pick sources[]:
{ "kind": "filesystem", "ref": "docs", "priority": 10 }(higher priority = preferred when the same content appears in two roots)
indexAgentsFiles: true (default on)*.md: covered by includeSourceMarkdown: true (default on)the user explicitly asks; remote resolvers land in a later phase.
kb init [--global] [--source <ref>]... [--dry-run].Review the --dry-run output with the user, then run for real. kb init
refuses to clobber an existing config without --force, and gitignores the
dbPath.
kb index → reports files scanned / changed / chunks. First runis the cold index; later runs are incremental (mtime → sha256).
kb search "<a real term from the docs>" --limit 5 andconfirm ranked {path, headingPath, score, snippet} come back. If empty,
check kb config shows the right sources and that the dir has .md files.
kb-search SKILL for everyday retrieval.--force onlyafter the user agrees.
dbPath must be gitignored; kb init does this for project configs. For acustom dbPath outside the project, add the gitignore entry yourself.
sources[] → kb index exits 2. Always seed at least one filesystem source.kb config prints origin, dbAbsPath, and the resolved sources list.kb index reports N files … M chunks and store.counts() JSON.kb search "<term>" returns ranked hits with snippets.Take blackbelttechnology/kb-setup from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.