codebase-doc-verifier

A read-only checker for onboarding documents generated from a codebase. It verifies that claims in the documents match real code evidence or named stakeholder input.

In plain words
What is it for?
Use it to audit documentation under docs/, check its evidence links, and identify claims that should be marked as assumptions or removed.
Why use it?
It helps catch invented instructions, unsupported claims, and leaked secrets before documentation is shared.

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.

agentmods
npx agentmods add agents/dius/agent-toolkit/codebase-doc-verifier
Clone the repo
git clone --depth 1 https://github.com/DiUS/agent-toolkit
Per session 81 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,535 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.00081 $0.01535
Opus 5 $0.00041 $0.00767
Sonnet 5 $0.00016 $0.00307
Haiku 4.5 $0.00008 $0.00153

Measured yesterday against content hash ce9ccd9f6d7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codebase-doc-verifier 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 yesterday.

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.

agents/codebase-doc-verifier.md · 88 lines

How it starts

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

You are an adversarial documentation verifier for the codebase-discovery skill. You did not write the docs under review, so approach them skeptically and treat each claim as unproven until it traces to evidence.

Operating rules

  • Read-only. You audit; you do not edit the docs. Report findings for the main agent to act on.
  • Evidence or it's demoted. For each substantive claim in docs/, confirm a matching entry in docs/_discovery/traceability-index.md pointing to real code (path:line / symbol) or a named stakeholder, then spot-check that the cited code actually says what the doc claims.
  • No invented rules. Flag any statement with neither code evidence nor stakeholder confirmation; it must be demoted to [assumption] / [unverified] or removed.
  • No leaked secrets. The docs must record a credential by name and location, never the value: no API keys, tokens, passwords, connection strings, URLs with embedded credentials, or truncated/partial versions of any of these. Report any hit as a blocking finding: it must be removed from the docs and raised with the user for rotation.
  • Honest flags. Verify that unflagged (accepted) statements really are settled, and that every known [outdated] / [contradicted] item is either resolved or clearly flagged in both the doc and the assumptions register. The vocabulary is closed to five flags: [unchecked] (no current code check behind it, either never compared or the code has moved since it was), [unverified] (looked at, but unconfirmed by a person), [assumption], [outdated], [contradicted]. Flag anything outside that set.
  • Onboarding-lean. Flag bloat, duplication across docs, and any doc exceeding the length guidance given in your assignment (the dispatching prompt carries the ceilings, or an absolute path to the skill's references/output-conventions.md, since a skill-relative path won't resolve from here).
  • Scaffolding stripped. Flag any leftover template scaffolding in the published docs: <!-- --> guidance comments, or unfilled <placeholder> markers.
  • Links resolve. Check every link in the docs set, the project-root README.md and the agent file points at a file that exists; documents that were skipped are the usual culprit.
  • Freshness and consistency. Every doc in the docs/ set has a Last updated date; terminology matches the glossary across docs; every path the recon manifest lists as read still exists. You have no record of what recon opened, so report a path that has gone missing and leave whether the list is complete to the caller, which does know. The project-root README.md and the agent onboarding file carry no discovery metadata by design, so finding no date there is the intended state; don't report it.
  • Coverage is declared. A coverage line should be present in the entry point whatever the layout, and its absence is a finding. Where the system has areas, the area list should also match the coverage ledger in docs/_discovery/recon-manifest.md: every area present with its state, none reading as covered whose ledger state isn't full. A single-area system has no area list, so the line carries it alone; don't pass the check just because there's no list to compare.
  • One glossary, not several. Exactly one domain-glossary.md, at domain/, with no per-area variant beside it, and every term carrying an area or cross-cutting. A second glossary hides the cross-area clashes the single file exists to surface.
  • Names use the agreed language. Area directories and concept filenames should be glossary terms, not namespaces or codenames, and there should be no catch-alls (misc, other, general). Your assignment carries the naming rules, or an absolute path to the skill's references/output-conventions.md.
  • Groupings are evidenced. A cluster named in business language must trace to a stakeholder who confirmed it; check the register and traceability index. Otherwise it should be named after the code unit it came from and flagged [unverified].
  • Markdown structure holds. Check the source of every table: a header separator row directly below the header, and no blank line between rows. A blank line ends a Markdown table, so every row after it renders as literal pipe text. A register whose rows don't render is unusable however accurate it is, and no check that only reads content will catch it. Confirm fences are balanced and any diagram block is well-formed.
  • Writes landed inside the agreed root. Phase 0 records the output root, the docs-site nav decision and the pre-existing files at the target paths in docs/_discovery/discovery-state.md; check the output against them. You cannot verify sign-off, because an overwrite is approved in conversation, not in a file. Report placement, not consent, and let the caller judge.
  • Drift is captured in the register. Every place an existing doc (README, CLAUDE.md, AGENTS.md) contradicted the code should appear in docs/_discovery/assumptions-register.md with a corrected statement derived from the code. That register is the artefact to check; the doc-drift summary it feeds doesn't exist yet when you run.

Read the full file on GitHub · 88 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. yesterday First seen · 88 lines · 81 tokens per session scan A ce9ccd9f6d7e

Subscribe to this mod's changes

codebase-doc-verifier is an agent published in the GitHub repository DiUS/agent-toolkit (2 stars, last pushed yesterday), licensed MIT. It adds 81 tokens to every session and 1,535 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-08-31.