kb-lint

kb-lint is a command for Claude Code from eddiebelaval/squire. It costs 0 tokens per session (762 once invoked), scanned A, original, MIT.

A consistency and completeness checker for knowledge bases. It checks their folders, source files, notes, links, and required health information.

In plain words
What is it for?
Use it to audit one knowledge base or all registered knowledge bases.
Why use it?
It finds missing files, unprocessed source material, broken links, and other data-integrity problems before they cause unreliable results.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths.

Good fit Use it to audit one knowledge base or all registered knowledge bases.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/eddiebelaval/squire/kb-lint
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/eddiebelaval/squire

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/eddiebelaval/squire/kb-lint.svg)](https://agentmods.dev/commands/eddiebelaval/squire/kb-lint)
Your own site
<a href="https://agentmods.dev/commands/eddiebelaval/squire/kb-lint"><img src="https://agentmods.dev/badge/commands/eddiebelaval/squire/kb-lint.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 762 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.00000 $0.00762
Opus 5 $0.00000 $0.00381
Sonnet 5 $0.00000 $0.00152
Haiku 4.5 $0.00000 $0.00076

Measured 5d ago against content hash 841ea6c46818, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

kb-lint 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 5d 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.

commands/kb-lint.md · 117 lines

How it starts

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

/kb-lint -- Knowledge Base Health Check

You audit id8Labs knowledge bases for consistency, completeness, and data integrity.

Arguments: $ARGUMENTS


Route by Arguments

Parse $ARGUMENTS:

Input Action
<kb-name> Lint a specific KB
--all Lint all KBs in the manifest
(empty) Lint all KBs

Setup

  1. Read ~/Development/id8/knowledge/manifest.json
  2. Read ~/.claude/skills/knowledge/SKILL.md for lint rules

Lint Checks

For each target KB, run these checks in order:

1. Structure Check

  • raw/ directory exists
  • wiki/ directory exists with _index.md
  • wiki/concepts/, wiki/sources/, wiki/connections/ exist
  • output/ directory exists
  • health.md exists
  • For extended KBs: ext/ directory and expected extensions exist

2. Orphaned Raw Files (ERROR)

Scan raw/ for files with processed: false or no wiki article:

  • List each orphaned file with its ingest date
  • Older orphans are higher severity

3. Broken Wikilinks (ERROR)

Scan all .md files in wiki/ for [[wikilinks]]:

  • Resolve each link target
  • Report any that point to non-existent files
  • Suggest corrections (fuzzy match on filename)

4. Index Drift (WARNING)

Compare _index.md entries against actual files in wiki/:

  • Articles in wiki/ not listed in _index.md
  • Entries in _index.md pointing to missing articles
  • Report count and list

5. Missing Backlinks (WARNING)

For each wikilink A -> B, check if B -> A exists:

  • Only check within wiki/concepts/ and wiki/connections/
  • Source files don't need backlinks to concepts (one-directional is fine)

6. Stale Articles (WARNING)

Check updated date in article frontmatter against raw source modification time:

  • If raw source is newer than article: stale
  • Suggest recompile

7. Empty Directories (INFO)

Report any wiki subdirectories with no files.

8. Suggested Connections (INFO)

Look for concepts mentioned in 2+ source summaries that don't have a connection article:

  • Suggest potential new connection articles
  • Limit to top 3 suggestions

Read the full file on GitHub · 117 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. 5d ago First seen · 117 lines · 0 tokens per session scan A 841ea6c46818

Subscribe to this mod's changes

kb-lint is a command published in the GitHub repository eddiebelaval/squire (21 stars, last pushed 23d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 762 tokens. 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.