specpilot-validate

specpilot-validate is a command for Claude Code from girishr/SpecPilot. It costs 22 tokens per session (734 once invoked), scanned A, original, MIT.

A command that checks a project's .specs/ files for the required structure, metadata fields, and links between files.

In plain words
What is it for?
Use it to validate project specifications, including requirements, architecture, tests, plans, development context, and security documents.
Why use it?
It finds missing files and documentation errors before they cause confusion, and suggests fixes without applying them automatically.

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/girishr/specpilot/specpilot-validate
Clone the repo
git clone --depth 1 https://github.com/girishr/SpecPilot

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/girishr/specpilot/specpilot-validate.svg)](https://agentmods.dev/commands/girishr/specpilot/specpilot-validate)
Your own site
<a href="https://agentmods.dev/commands/girishr/specpilot/specpilot-validate"><img src="https://agentmods.dev/badge/commands/girishr/specpilot/specpilot-validate.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 734 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.00022 $0.00734
Opus 5 $0.00011 $0.00367
Sonnet 5 $0.00004 $0.00147
Haiku 4.5 $0.00002 $0.00073

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

Security

Grade A, and why

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

.claude/commands/specpilot-validate.md · 71 lines

What it actually says

Validate the project's .specs/ files. Run the script below, then summarize the results in plain language.

cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"

REQUIRED_FILES=(
  ".specs/project/project.yaml"
  ".specs/architecture/architecture.md"
  ".specs/project/requirements.md"
  ".specs/architecture/api.yaml"
  ".specs/quality/tests.md"
  ".specs/planning/tasks.md"
  ".specs/development/context.md"
  ".specs/development/prompts.md"
  ".specs/security/threat-model.md"
  ".specs/security/security-decisions.md"
)

echo "== Missing required files =="
missing=0
for f in "${REQUIRED_FILES[@]}"; do
  if [ ! -f "$f" ]; then echo "MISSING: $f"; missing=1; fi
done
[ "$missing" -eq 0 ] && echo "none"

echo
echo "== Front-matter field checks (fileID, lastUpdated, version, contributors, relatedFiles) =="
clean=1
for f in "${REQUIRED_FILES[@]}"; do
  [[ "$f" == *.md ]] || continue
  [ -f "$f" ] || continue
  fm=$(sed -n '2,/^---$/p' "$f")
  for field in fileID lastUpdated version contributors relatedFiles; do
    if ! echo "$fm" | grep -q "^${field}:"; then
      echo "MISSING $field in $f"
      clean=0
    fi
  done
done
[ "$clean" -eq 1 ] && echo "all fields present"

echo
echo "== relatedFiles cross-reference check =="
clean=1
for f in "${REQUIRED_FILES[@]}"; do
  [[ "$f" == *.md ]] || continue
  [ -f "$f" ] || continue
  refs=$(sed -n '2,/^---$/p' "$f" | sed -n '/^relatedFiles:/,/^[a-zA-Z]/p' | grep -oE '[A-Za-z0-9_.-]+\.(md|yaml)')
  for ref in $refs; do
    if ! find .specs -name "$ref" | grep -q .; then
      echo "BROKEN REF in $f -> $ref (not found anywhere under .specs/)"
      clean=0
    fi
  done
done
[ "$clean" -eq 1 ] && echo "all cross-references resolve"

Never eyeball line counts or fingerprints by hand where this script already computes them exactly.

After running it:

  1. Summarize each of the three sections in plain language (what's missing, what's wrong, what's broken).
  2. For every issue found, suggest a specific fix — but never apply it automatically. Wait for the user to ask before editing any file.
  3. If everything passes, say so plainly; do not manufacture issues.

Known platform limitation: GitHub Copilot only executes terminal commands in "agent mode." Outside agent mode, this command degrades to prose-only — read the files yourself and reason about the same three checks without the script, which carries a higher error rate than the scripted version.

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 · 71 lines · 22 tokens per session scan A c4bc7798f2ee

Subscribe to this mod's changes

specpilot-validate is a command published in the GitHub repository girishr/SpecPilot (37 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 734 once invoked, about $0.0001 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.