validate-context

validate-context is a command for Claude Code from albertomarturelo/sii. It costs 0 tokens per session (466 once invoked), scanned A, original, MIT.

A checklist for checking whether a project’s working context and documentation are current and internally consistent. It reviews guidance files, status updates, architecture decisions, and coding conventions.

In plain words
What is it for?
Reviewing documentation freshness, checking that architecture-decision files and indexes agree, checking required ADR sections, and spotting convention mismatches in source files.
Why use it?
Outdated instructions and missing decision records can mislead future coding sessions. The checks reveal stale, oversized, incomplete, or conflicting project documentation.

Command for Claude Code

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/albertomarturelo/sii/validate-context
Clone the repo
git clone --depth 1 https://github.com/albertomarturelo/sii

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/albertomarturelo/sii/validate-context.svg)](https://agentmods.dev/commands/albertomarturelo/sii/validate-context)
Your own site
<a href="https://agentmods.dev/commands/albertomarturelo/sii/validate-context"><img src="https://agentmods.dev/badge/commands/albertomarturelo/sii/validate-context.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 466 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.00000 $0.00466
Opus 5 $0.00000 $0.00233
Sonnet 5 $0.00000 $0.00093
Haiku 4.5 $0.00000 $0.00047

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

Security

Grade A, and why

validate-context 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 3d 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.

.claude/commands/validate-context.md · 34 lines

What it actually says

Validate the CFD context in this project. Check, in order, and output a checklist with PASS / WARN / FAIL per item:

  1. CLAUDE.md size: WARN if >150 lines, FAIL if >300.
  2. CLAUDE.md content shape: should be mostly @references, not paragraphs of prose. FAIL if any section has >10 lines of inlined content where an @docs/... reference would do.
  3. docs/CURRENT_STATUS.md freshness: run git log -1 --format=%ar -- docs/CURRENT_STATUS.md. WARN if older than 2 working days; FAIL if older than 1 week.
  4. ADR index integrity: every file matching docs/decisions/[0-9]*.md must be listed in docs/decisions/_index.md, and every row in _index.md must point to a file that exists. FAIL on mismatch.
  5. ADR completeness: every ADR has Status, Context, Decision, Alternatives Considered, Consequences sections. FAIL on any ADR missing one.
  6. Convention coverage: spot-check 3 random source files. Do their patterns match docs/CONVENTIONS.md? If not, propose updates to CONVENTIONS.md (do not auto-apply).
  7. Surface boundary (ADR-003): spot-check that packages/cli and packages/mcp import only @albertomarturelo/sii-core's task layer (+ port interfaces), never a portal/dte/auth/storage facade directly. Flag any reach-past — it bypasses the throttling / audit / credential rails.
  8. Language check: any docs/**/*.md file written in a non-English language? WARN per file.

Output the checklist and propose concrete fixes for any failures. Do NOT auto-apply fixes — the user reviews first.

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. 3d ago First seen · 34 lines · 0 tokens per session scan A f721c2b784fa

Subscribe to this mod's changes

validate-context is a command published in the GitHub repository albertomarturelo/sii (5 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 466 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-08-31.