kb-setup

kb-setup is a skill for Claude Code, Codex from BlackBeltTechnology/pi-agent-dashboard. It costs 89 tokens per session (809 once invoked), scanned A, original, MIT.

A setup tool for a local Markdown knowledge base that can be searched by an agent. It creates a SQLite and FTS5 index, which is a local database designed for fast text search.

In plain words
What is it for?
Use it to initialize the knowledge base, configure document sources, index project files, and run a smoke test to confirm searching works.
Why use it?
It makes project documentation searchable before the agent answers questions or needs to retrieve past decisions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/blackbelttechnology/pi-agent-dashboard/kb-setup
Any agent
npx skills add BlackBeltTechnology/pi-agent-dashboard --skill kb-setup
Clone the repo
git clone --depth 1 https://github.com/BlackBeltTechnology/pi-agent-dashboard

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kb-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/kb-setup.svg)](https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/kb-setup)
Your own site
<a href="https://agentmods.dev/skills/blackbelttechnology/pi-agent-dashboard/kb-setup"><img src="https://agentmods.dev/badge/skills/blackbelttechnology/pi-agent-dashboard/kb-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 809 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00089 $0.00809
Opus 5 $0.00044 $0.00404
Sonnet 5 $0.00018 $0.00162
Haiku 4.5 $0.00009 $0.00081

Measured 2d ago against content hash 90298c243170, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

kb-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/kb/skill/kb-setup/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

kb-setup — bring up the project knowledge base

@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.

When to Use

  • User asks to set up / init / configure the knowledge base.
  • No .pi/dashboard/knowledge_base.json exists yet and the project has docs.
  • User wants to add a doc source (local dir, npm package docs, git handbook).

Procedure

  1. Detect existing config. Check .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.
  2. Choose scope + sources. Ask (if unclear) whether to write project or global config. Pick sources[]:
    • local doc dir: { "kind": "filesystem", "ref": "docs", "priority": 10 } (higher priority = preferred when the same content appears in two roots)
    • AGENTS.md / CLAUDE.md: covered by indexAgentsFiles: true (default on)
    • source-tree *.md: covered by includeSourceMarkdown: true (default on)
    • remote sources (npm/git/https) require trust-on-first-use — defer unless the user explicitly asks; remote resolvers land in a later phase.
  3. Scaffold. 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.
  4. Index. kb index → reports files scanned / changed / chunks. First run is the cold index; later runs are incremental (mtime → sha256).
  5. Smoke search. kb search "<a real term from the docs>" --limit 5 and confirm ranked {path, headingPath, score, snippet} come back. If empty, check kb config shows the right sources and that the dir has .md files.
  6. Point the user at the kb-search SKILL for everyday retrieval.

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 57 lines · 89 tokens per session scan A 90298c243170

Subscribe to this mod's changes

kb-setup is a skill published in the GitHub repository BlackBeltTechnology/pi-agent-dashboard (274 stars, last pushed today), licensed MIT. It adds 89 tokens to every session and 809 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.