agentspec: Command for Claude Code

.claude/commands/review/judge.md

judge is a command for Claude Code from luanmorenommaciel/agentspec. It costs 18 tokens per session (1,034 once invoked), scanned A, original, MIT.

A command that sends a file and optional task context to another AI model for a structured second opinion. The review returns a pass-or-fail verdict, confidence, concerns, evidence, and suggested fixes.

In plain words
What is it for?
Use it to review code, content, database changes, security policies, or other high-risk technical work before proceeding.
Why use it?
It can expose serious mistakes or unsupported claims that the original AI review missed.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

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 →

Runs only inside a plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else, and the catalogue could not identify which plugin ships it.

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/review/judge.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 judge

README.md
[![agentmods](https://agentmods.dev/badge/commands/luanmorenommaciel/agentspec/judge.svg)](https://agentmods.dev/commands/luanmorenommaciel/agentspec/judge)
Your own site
<a href="https://agentmods.dev/commands/luanmorenommaciel/agentspec/judge"><img src="https://agentmods.dev/badge/commands/luanmorenommaciel/agentspec/judge.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 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,034 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.00018 $0.01034
Opus 5 $0.00009 $0.00517
Sonnet 5 $0.00004 $0.00207
Haiku 4.5 $0.00002 $0.00103

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

Security

Grade A, and why

judge 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/review/judge.md · 144 lines

How it starts

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

Judge Command (V0)

Get a second opinion from a non-Claude model on code or content Claude just produced.

Usage

/judge <file>                              # Judge a file with default model
/judge <file> --context "building DLT CDC" # Add context about the task
/judge <file> --model anthropic/claude-3.5-sonnet  # Override model (still via OpenRouter)
/judge --ledger                             # Show today's budget usage

What This Command Does

Sends the target file + optional task context to a non-Claude model via OpenRouter. That model returns a structured verdict:

Field Meaning
Verdict PASS (no high-severity issues, confidence ≥ 0.70) or FAIL
Confidence 0.0 – 1.0, judge's own self-assessment
Summary One-sentence gist
Concerns Table of issues (severity + evidence citing line numbers or quoted strings)
Suggested fixes Concrete repairs

The verdict renders as markdown in the chat. A ledger entry goes to .claude/storage/judge-ledger.jsonl.


When to Use

Good fits:

  • Schema migrations or DDL you're about to run
  • IAM / RLS policies — security-sensitive
  • Complex SQL that touches production data
  • Terraform / CloudFormation before apply
  • Any output where "confidently wrong" would be expensive

Skip it for:

  • Trivial edits, renames, formatting
  • Documentation prose (judge is tuned for code/config correctness)
  • Anything under ~20 lines (not enough signal)

The judge is advisory. Claude is the author; you make the final call.


Setup

# One-time: get an OpenRouter key at https://openrouter.ai/keys
export OPENROUTER_API_KEY=sk-or-v1-...

# Optional: change default model (default is openai/gpt-4o-mini — cheap + capable)
export JUDGE_MODEL=openai/gpt-4o

# Optional: change daily budget ceiling (default 10 calls/day)
export JUDGE_BUDGET=25

Full setup guide: docs/getting-started/judge-setup.md


Examples

Example 1: Judge a schema migration

Read the full file on GitHub · 144 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 · 144 lines · 18 tokens per session scan A 693d0f54ce08

Subscribe to this mod's changes

judge is a command published in the GitHub repository luanmorenommaciel/agentspec (245 stars, last pushed 4d ago), licensed MIT. It adds 18 tokens to every session and 1,034 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-09-01.