validate

validate is a command for Claude Code from lhl/realitycheck. It costs 7 tokens per session (577 once invoked), scanned A, original, Apache-2.0.

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 for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the reality plugin — 8 commands, 2 hooks shipped together

Good fit It is for validating database or YAML data, optionally treating warnings as errors and returning human-readable or JSON results.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add lhl/realitycheck
Claude Code
/plugin install reality

Made for: Claude Code.

Or install reality, the plugin that ships this one along with the rest of its 8 commands, 2 hooks.

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 validate

README.md
[![agentmods](https://agentmods.dev/badge/commands/lhl/realitycheck/validate/github.svg)](https://agentmods.dev/commands/lhl/realitycheck/validate)
Your own site
<a href="https://agentmods.dev/commands/lhl/realitycheck/validate"><img src="https://agentmods.dev/badge/commands/lhl/realitycheck/validate/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 validate

Your own site · 80×15
<a href="https://agentmods.dev/commands/lhl/realitycheck/validate"><img src="https://agentmods.dev/badge/commands/lhl/realitycheck/validate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00007 $0.00577
Opus 5.5 $0.00003 $0.00231
Sonnet 5.5 $0.00001 $0.00115
Haiku 4.5 $0.00001 $0.00058

Measured 1mo ago against content hash 7b19824f431a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

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. 1mo ago 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 (44 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 7 tokens to every session and 577 once invoked, about $0.0000 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-30.