agentspec: Command for Claude Code

.claude/commands/visual-explainer/fact-check.md

fact-check is a command for Claude Code from luanmorenommaciel/agentspec. It costs 17 tokens per session (1,005 once invoked), scanned A, a copy of fact-check, MIT.

A codebase fact-checking command that checks a document's claims against the actual source code and Git history.

In plain words
What is it for?
Use it to verify Markdown or HTML documents and correct incorrect file, function, type, behaviour, or architecture claims.
Why use it?
It helps prevent plans, reports, and diagrams from describing code inaccurately or becoming outdated.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

This is luanmorenommaciel/agentspec's own configuration. It tells Claude Code how to work on agentspec itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentspec configures →

Reuse

Borrowing it

Nothing to install: this file belongs to luanmorenommaciel/agentspec. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/luanmorenommaciel/agentspec/main/.claude/commands/visual-explainer/fact-check.md
Clone the repo
git clone --depth 1 https://github.com/luanmorenommaciel/agentspec

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 fact-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/luanmorenommaciel/agentspec/fact-check.svg)](https://agentmods.dev/commands/luanmorenommaciel/agentspec/fact-check)
Your own site
<a href="https://agentmods.dev/commands/luanmorenommaciel/agentspec/fact-check"><img src="https://agentmods.dev/badge/commands/luanmorenommaciel/agentspec/fact-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 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,005 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 100% copy Near-identical to another mod 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.00017 $0.01005
Opus 5 $0.00009 $0.00502
Sonnet 5 $0.00003 $0.00201
Haiku 4.5 $0.00002 $0.00101

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

Security

Grade A, and why

fact-check 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.

Origin

This is a copy

100% identical to fact-check — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/visual-explainer/fact-check.md · 64 lines

How it starts

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

Load the visual-explainer skill, then verify the factual accuracy of a document that makes claims about a codebase. Read the file, extract every verifiable claim, check each against the actual code and git history, correct inaccuracies in place, and add a verification summary.

For HTML files: read ./references/css-patterns.md to match the existing page's styling when inserting the verification summary.

Target file — determine what to verify from $1:

  • Explicit path: verify that specific file (.html, .md, or any text document)
  • No argument: verify the most recently modified .html file in ~/.agent/diagrams/ (ls -t ~/.agent/diagrams/*.html | head -1)

Auto-detect the document type and adjust the verification strategy:

  • HTML review pages (diff-review, plan-review, project-recap): detect from page content, verify against the git ref or plan file the review was based on
  • Plan/spec documents (markdown): verify file references, function/type names, behavior descriptions, and architecture claims against the current codebase
  • Any other document: extract and verify whatever factual claims about code it contains

Phase 1: Extract claims. Read the file. Extract every verifiable factual claim:

  • Quantitative: line counts, file counts, function counts, module counts, test counts, any numeric metrics
  • Naming: function names, type names, module names, file paths referenced in the document
  • Behavioral: descriptions of what code does, how things work, before/after comparisons
  • Structural: architecture claims, dependency relationships, import chains, module boundaries
  • Temporal: git history claims, commit attributions, timeline entries

Skip subjective analysis (opinions, design judgments, readability assessments) — these aren't verifiable facts.

Phase 2: Verify against source. For each extracted claim, go to the source:

  • Re-read every file referenced in the document — check function signatures, type definitions, behavior descriptions against the actual code
  • For claims about git history: re-run git commands (git diff --stat, git log, git diff --name-status, etc.) and compare output against the document's numbers
  • For diff-reviews: read both the ref version (git show <ref>:file) and working tree version to verify before/after claims aren't swapped or fabricated
  • For plan docs: verify that files, functions, and types the plan references actually exist and behave as described
  • For project-recaps: re-run git log commands to verify activity narrative and timeline

Classify each claim:

  • Confirmed: claim matches the code/output exactly
  • Corrected: claim was inaccurate — note what was wrong and what the correct value is
  • Unverifiable: claim can't be checked (e.g., references a file that doesn't exist, or a behavior that requires runtime testing)

Phase 3: Correct in place. Edit the file directly using surgical text replacements:

  • Fix incorrect numbers, function names, file paths, behavior descriptions
  • Fix before/after swaps (a common error class in review pages)
  • If a section is fundamentally wrong (not just a detail error), rewrite that section's content while preserving the surrounding structure
  • For HTML: preserve layout, CSS, animations, Mermaid diagrams (unless they contain factual errors in node labels or edge descriptions)
  • For markdown: preserve heading structure, formatting, and document organization

Phase 4: Add verification summary.

  • HTML files: insert a verification section as a banner at the top or final section, matching the page's existing styling. Use a subtle card with muted colors.
  • Markdown files: append a ## Verification Summary section at the end of the document.

Include in the summary:

  • Total claims checked
  • Claims confirmed (with count)
  • Corrections made (with brief list of what was fixed: "Changed processCleanup to runCleanup to match actual function name in worker.ts:45")
  • Unverifiable claims flagged (if any)

Read the full file on GitHub · 64 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 · 64 lines · 17 tokens per session scan A 3e70b47ef210

Subscribe to this mod's changes

fact-check is a command published in the GitHub repository luanmorenommaciel/agentspec (246 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 1,005 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to fact-check, differing in 12 lines, and is treated as a copy.