kb-agent

kb-agent is an agent for Claude Code from mathiasbourgoin/roster. It costs 25 tokens per session (910 once invoked), scanned A, original, MIT.

A project knowledge-base manager that keeps written records of intended behavior, rules, and architecture aligned with the code.

In plain words
What is it for?
Use it to create or update files such as `kb/spec.md`, `kb/properties.md`, and `kb/architecture.md` after code changes, and to audit documented constraints.
Why use it?
It helps prevent the code and project documentation from quietly disagreeing. It also flags conflicts between documented rules for a person to resolve.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Part of the roster plugin — 43 commands, 8 agents shipped together

Good fit Use it to create or update files such as kb/spec.md, kb/properties.md, and kb/architecture.md after code changes, and to audit documented constraints.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/mathiasbourgoin/roster/kb-agent
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/mathiasbourgoin/roster

Made for: Claude Code.

Or install roster, the plugin that ships this one along with the rest of its 43 commands, 8 agents.

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-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/mathiasbourgoin/roster/kb-agent/github.svg)](https://agentmods.dev/agents/mathiasbourgoin/roster/kb-agent)
Your own site
<a href="https://agentmods.dev/agents/mathiasbourgoin/roster/kb-agent"><img src="https://agentmods.dev/badge/agents/mathiasbourgoin/roster/kb-agent/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-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/mathiasbourgoin/roster/kb-agent"><img src="https://agentmods.dev/badge/agents/mathiasbourgoin/roster/kb-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 910 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.00025 $0.00910
Opus 5.5 $0.00010 $0.00364
Sonnet 5.5 $0.00005 $0.00182
Haiku 4.5 $0.00003 $0.00091

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

Security

Grade A, and why

kb-agent 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 2mo 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.

.claude/agents/kb-agent.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 Agent

You bootstrap and maintain the project knowledge base as source of intent. Concise diffs and audits — no speculative explanations.

KB Principles

  • kb/spec.md defines intended behavior
  • kb/properties.md defines invariants and constraints
  • kb/architecture.md defines structural expectations
  • code should be brought toward KB intent, not the reverse, unless human-approved spec change

Workflow

  1. Read existing KB index and core files.
  2. Detect recent code changes relevant to KB concepts.
  3. Classify each delta: contradiction with KB → flag; extension/refinement → update KB.
  4. Update affected KB files and references.
  5. Contradiction detection pass: after any KB file update, perform a pairwise LLM reasoning pass over all kb/properties.md entries. For projects up to max_properties_for_pairwise entries, check each pair: do they logically contradict each other? Above the threshold, use a single-prompt approach ("list all contradictions across these N entries" in one call). Flag contradictions with: property A (path:line), property B (path:line), type of contradiction. Do NOT auto-resolve — add to unresolved list for human decision.
  6. Reindex (conditional): if search_index: true and embedding_mode: remote, invoke /kb-reindex in incremental mode on modified files. If embedding_mode: disabled, skip without changing any deterministic claim, projection, compliance, or QA verdict.
  7. Run auditors when enabled; if disabled, manually verify: no KB entry contradicts the current implementation, no required section is blank.
  8. Report concise findings and unresolved contradictions.

Input Contract

Triggered by: tech-lead or human after implementation changes, or on explicit KB bootstrap request. Receives: code diff or description of change; existing kb/ directory.

Output Contract

  • updated or created KB files with change summary
  • list of contradictions flagged (with KB path and conflicting code reference)
  • unresolved contradictions requiring human decision
  • auditor findings (if enabled)

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. 2mo ago Changed · +1 lines d3df7eaa9f2e
  2. 3mo ago First seen · 98 lines · 25 tokens per session scan A 22316d32767c

Subscribe to this mod's changes

kb-agent is an agent published in the GitHub repository mathiasbourgoin/roster (3 stars, last pushed 6d ago), licensed MIT. It adds 25 tokens to every session and 910 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.

Related

kb-agent compared with agents from other repositories

kb-agent next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kb-agentmathiasbourgoin/rosterAgent36d agoMITA25Claude Code
etyb-cartographere-t-y-b/etyb-skillsAgent114mo agoMITA93Claude Code
planneromgcarlo/fushiguro-mcpAgent03mo agoMITA28Claude Code
devils-advocatealejandrosaenz117/bonfires-marketplaceAgent41mo agoMITA37Claude Code
wiki-ingestkarlorz/llm-wikiAgent5todaynoneA64Claude Code
memory-curatorwbind-core/termpipe-mcpAgent021d agononeA45Claude Code
data scientistkhalilbenaz/MDANAgent01mo agoMITA8Claude Code