kb

kb is a command for Claude Code from wlfghdr/agentic-kb. It costs 20 tokens per session (1,712 once invoked), scanned A, original, Apache-2.0.

A command for managing a project knowledge base, which is an organized collection of notes, decisions, tasks, reports, and planning records.

In plain words
What is it for?
Use it to capture information, create decisions or tasks, publish reports, review records, manage roadmaps, and run planning rituals.
Why use it?
It provides one entry point for common knowledge-base work instead of requiring separate commands for each type of record.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the kb plugin — 5 skills, 1 command, 1 agent shipped together

Good fit Use it to capture information, create decisions or tasks, publish reports, review records, manage roadmaps, and run planning rituals.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/wlfghdr/agentic-kb/kb
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.

Clone the repo
git clone --depth 1 https://github.com/wlfghdr/agentic-kb

Made for: Claude Code.

Or install kb, the plugin that ships this one along with the rest of its 5 skills, 1 command, 1 agent.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/wlfghdr/agentic-kb/kb/github.svg)](https://agentmods.dev/commands/wlfghdr/agentic-kb/kb)
Your own site
<a href="https://agentmods.dev/commands/wlfghdr/agentic-kb/kb"><img src="https://agentmods.dev/badge/commands/wlfghdr/agentic-kb/kb/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kb

Your own site · 80×15
<a href="https://agentmods.dev/commands/wlfghdr/agentic-kb/kb"><img src="https://agentmods.dev/badge/commands/wlfghdr/agentic-kb/kb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,712 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00020 $0.01712
Opus 5.5 $0.00008 $0.00685
Sonnet 5.5 $0.00004 $0.00342
Haiku 4.5 $0.00002 $0.00171

Measured 6d ago against content hash b3805c023a9e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kb 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 6d 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.

plugins/kb/commands/kb.md · 89 lines

How it starts

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

/kb — Knowledge Base

The user invokes /kb from any harness. Route to the kb-management skill.

Tool requirement. This prompt needs file + terminal tools (declared in the frontmatter tools: list) to run file scaffolding, ritual scans, and git operations. On recent VS Code builds they are auto-selected from the frontmatter. If the chat session reports "no tools available" when this prompt runs, open the Chat view → gear/Configure Chat → Tools, enable the 13 built-in tools listed in the frontmatter above, and rerun /kb. This is a one-time per-session action.

Routing precedence

Evaluate in order and stop at the first match:

  1. No .kb-config/layers.yaml anywhere in the workspace → hand off to the kb-setup skill (even if the user typed only /kb with no args). Announce: "No KB detected — running setup." Then run the onboarding interview.
  2. Explicit subcommand after /kb (review, promote, publish, digest, todo, task, idea, develop, decide, note, brief, spec, release, incident, migrate, sync, diff, start-day, end-day, start-week, end-week, present, report, audit, status, setup) → route to that action per references/command-reference.md.
  3. Product-management subcommand after /kb — roadmap (or roadmaps) hands off to the kb-roadmap skill; journeys (or journey) hands off to the kb-journeys skill. If the active layer has not declared the matching roadmap: / journeys: config block in .kb-config/layers.yaml, refuse with a clear message that names the missing block, points the user at the skill's references/config-schema.md, and offers /kb setup as the normal path for deciding which layer should own the artifact.
  4. URL or pasted text → capture per the routing-mode rule (kb-management SKILL.md rule 12 + references/capture-routing.md):
    • Default: no target named and no strong reflection signal → capture into the active layer (the anchor unless context already selected a different contributor-capable layer). Apply the five-question evaluation gate.
    • Explicit: the user named a target layer in the invocation (e.g. /kb team-observability <input>), OR a capture-routing: rule in .kb-config/layers.yaml matches the input. Capture lands directly in the named layer; cite the matching rule (path + line or rule index) in the response.
    • Reflection-driven: no explicit target was named, but the input's content/source/context matches the strong-signal rubric in references/capture-routing.md for a non-default contributor-capable layer. Propose the target, name the reason, and wait for human confirmation before mutating. Weak or ambiguous signals fall through to default. Do not soft-write to a staging area as a fallback; always offer the default as a one-word fallback.
  5. File path inside a known KB layer → layer-appropriate operation (review/update-topic/decide) on that file.
  6. Bare /kb (no input) → run the triage scan below and present the result.

Read the full file on GitHub · 89 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. 6d ago Changed · -10 lines b3805c023a9e
  2. 1mo ago First seen · 99 lines · 20 tokens per session scan A ac515deb7c5a

Subscribe to this mod's changes

kb is a command published in the GitHub repository wlfghdr/agentic-kb (10 stars, last pushed 6d ago), licensed Apache-2.0. It adds 20 tokens to every session and 1,712 once invoked, about $0.0001 per session on Opus 5.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-08-31.