kicad-tools: Command for Claude Code

.claude/commands/loom/judge-reference.md

judge-reference is a command for Claude Code from rjwalters/kicad-tools. It costs 0 tokens per session (2,552 once invoked), scanned A, original, MIT.

Reference instructions for a Judge role that checks code changes and runs tests relevant to the files changed. A pull request is a proposed code change submitted for review.

In plain words
What is it for?
Use them to identify changed files, decide whether tests can be scoped, and check configuration changes that affect the whole project.
Why use it?
Running focused tests can shorten checks while still examining the affected parts; broader project changes still require the full test suite.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is rjwalters/kicad-tools's own configuration. It tells Claude Code how to work on kicad-tools 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 kicad-tools configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is if ./.loom/scripts/run-tests.sh --co --testmon 2>/dev/null; then.

Reuse

Borrowing it

Nothing to install: this file belongs to rjwalters/kicad-tools. 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/rjwalters/kicad-tools/main/.claude/commands/loom/judge-reference.md
Clone the repo
git clone --depth 1 https://github.com/rjwalters/kicad-tools

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-reference

README.md
[![agentmods](https://agentmods.dev/badge/commands/rjwalters/kicad-tools/judge-reference.svg)](https://agentmods.dev/commands/rjwalters/kicad-tools/judge-reference)
Your own site
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/judge-reference"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/judge-reference.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 2,552 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.00000 $0.02552
Opus 5 $0.00000 $0.01276
Sonnet 5 $0.00000 $0.00510
Haiku 4.5 $0.00000 $0.00255

Measured 7d ago against content hash 2bbdb40b74ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

judge-reference 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 7d 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/loom/judge-reference.md · 252 lines

How it starts

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

Judge Reference

Detailed reference material for the Judge role, split out of judge.md (the largest prompt in the repo) to keep the main workflow scannable — mirroring how champion.md references champion-reference.md / champion-common.md.

Read the relevant section when judge.md points you here.


Scoped Test Execution

When running quality checks (step 7), use scoped test execution to run only the tests relevant to changed files. This reduces evaluation time while maintaining confidence that changed code is correct.

Step 1: Detect Changed Files

# Use gh API to list changed files — avoids local git dependency and
# exit-128 errors when the branch is checked out in a worktree or when
# concurrent builder operations hold a git lock. (issue #2828)
CHANGED_FILES=$(gh pr diff $PR_NUMBER --name-only 2>/dev/null)
if [ -z "$CHANGED_FILES" ]; then
    echo "Warning: Could not detect changed files via gh pr diff — running full test suite"
    # Fall through to full suite
fi
echo "$CHANGED_FILES"

Step 2: Check for Config File Changes

If the PR touches configuration files that affect the entire project, skip scoping and run the full test suite:

# Config files that should trigger full suite
CONFIG_PATTERNS="pyproject.toml|setup.cfg|setup.py|package.json|pnpm-lock.yaml|yarn.lock|Cargo.toml|Cargo.lock|tsconfig.json|jest.config|vitest.config|.eslintrc|Makefile|CMakeLists"

if echo "$CHANGED_FILES" | grep -qE "($CONFIG_PATTERNS)"; then
    echo "Config files changed — running full test suite"
    # Run full suite (skip to Fallback section below)
fi

Step 3: Classify Changed Files by Language

Classify the changed files to determine which scoped test strategies to apply:

Extension/Path Language Scoped Strategy
.py, .pyi Python pytest --testmon or full pytest
.ts, .tsx TypeScript jest --changedSince or vitest --changed
.js, .jsx, .mjs, .cjs JavaScript jest --changedSince or vitest --changed
.rs Rust cargo test -p <crate>
Other Unknown Full test suite

Read the full file on GitHub · 252 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. 7d ago First seen · 252 lines · 0 tokens per session scan A 2bbdb40b74ef

Subscribe to this mod's changes

judge-reference is a command published in the GitHub repository rjwalters/kicad-tools (56 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,552 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-30.