validate

A database-integrity command checks whether stored records follow the required schema and refer to existing records.

In plain words
What is it for?
It is for validating database or YAML data, optionally treating warnings as errors and returning human-readable or JSON results.
Why use it?
It finds malformed claims, broken references, inconsistent links, and logical problems before they spread through the dataset.

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/lhl/realitycheck/validate
Clone the repo
git clone --depth 1 https://github.com/lhl/realitycheck
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 577 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.00007 $0.00577
Opus 5 $0.00003 $0.00289
Sonnet 5 $0.00001 $0.00115
Haiku 4.5 $0.00001 $0.00058

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

Security

Grade A, and why

validate 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.

integrations/claude/plugin/commands/validate.md · 90 lines

What it actually says

/reality:validate - Data Integrity Check

Check database integrity and referential consistency.

Usage

/reality:validate [--strict] [--json]

CLI Invocation

Run validation using the shell wrapper:

"${CLAUDE_PLUGIN_ROOT}/scripts/run-validate.sh" [OPTIONS]

Or directly via the Python script:

uv run python scripts/validate.py [OPTIONS]

Options

  • --strict: Treat warnings as errors
  • --json: Output results as JSON
  • --mode {db,yaml}: Validation mode (default: db)
  • --db-path PATH: Database path (for db mode)
  • --repo-root PATH: Repository root (for yaml mode)

Checks Performed

Schema Validation

  • Claim ID format: [DOMAIN]-[YYYY]-[NNN]
  • Chain ID format: CHAIN-[YYYY]-[NNN]
  • Valid claim types: [F]/[T]/[H]/[P]/[A]/[C]/[S]/[X]
  • Valid evidence levels: E1-E6
  • Credence in range [0.0, 1.0]
  • Valid domains

Referential Integrity

  • Claims reference existing sources
  • Sources list extracted claims (backlinks)
  • Chains reference existing claims
  • Predictions reference existing claims

Logical Consistency

  • Domain in ID matches domain field
  • Chain credence ≤ MIN(claim credences)
  • All [P] claims have prediction records

Data Quality

  • No empty claim text
  • Embeddings present (warning if missing)

Output

OK: 0 error(s), 2 warning(s)
WARN [CLAIM_NO_EMBEDDING] TECH-2026-001: Missing embedding
WARN [CHAIN_CREDENCE_EXCEEDS_MIN] CHAIN-2026-001: Chain credence 0.8 > min claim credence 0.75

Exit Codes

  • 0: All checks passed (warnings allowed)
  • 1: Errors found

Examples

/reality:validate
/reality:validate --strict
/reality:validate --json
/reality:validate --mode yaml --repo-root /path/to/data-repo
  • /reality:export - Export data
  • /reality:stats - Database statistics
  • /reality:check - Full analysis workflow
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 · 90 lines · 7 tokens per session scan A 7b19824f431a

Subscribe to this mod's changes

validate is a command published in the GitHub repository lhl/realitycheck (41 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 7 tokens to every session and 577 once invoked, about $0.0000 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-30.