kb

kb is a command for coding agents from wlfghdr/agentic-kb. It costs 20 tokens per session (2,167 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

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 commands/wlfghdr/agentic-kb/kb
Clone the repo
git clone --depth 1 https://github.com/wlfghdr/agentic-kb
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 2,167 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 $0.00020 $0.02167
Opus 5 $0.00010 $0.01084
Sonnet 5 $0.00004 $0.00433
Haiku 4.5 $0.00002 $0.00217

Measured 3d ago against content hash ac515deb7c5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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 · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 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 /kbroadmap (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 · 99 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. 3d 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 18d ago), licensed Apache-2.0. It adds 20 tokens to every session and 2,167 once invoked, about $0.0001 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-08-31.