champion-merge-risk-shadow

champion-merge-risk-shadow is a command for Claude Code from rjwalters/kicad-tools. It costs 0 tokens per session (1,108 once invoked), scanned A, original, MIT.

A load-gated shadow scoring step for Champion's pull-request merge-risk check. It asks an external TypeSafe service for a separate risk score for comparison, while keeping that score out of the actual merge verdict.

In plain words
What is it for?
Use it after the normal merge-risk judgment to log a comparison score and study whether recurring holds are reliable or merely inconsistent.
Why use it?
It allows the team to measure how often merge-risk holds are later released without code changes, without letting an experimental score change existing decisions. It does nothing when the required API key is absent.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it after the normal merge-risk judgment to log a comparison score and study whether recurring holds are reliable or merely inconsistent.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/rjwalters/kicad-tools/champion-merge-risk-shadow
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.

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 champion-merge-risk-shadow

README.md
[![agentmods](https://agentmods.dev/badge/commands/rjwalters/kicad-tools/champion-merge-risk-shadow/github.svg)](https://agentmods.dev/commands/rjwalters/kicad-tools/champion-merge-risk-shadow)
Your own site
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/champion-merge-risk-shadow"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/champion-merge-risk-shadow/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 champion-merge-risk-shadow

Your own site · 80×15
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/champion-merge-risk-shadow"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/champion-merge-risk-shadow.svg" alt="Reviewed on agentmods" width="80" 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 1,108 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.01108
Opus 5.5 $0.00000 $0.00443
Sonnet 5.5 $0.00000 $0.00222
Haiku 4.5 $0.00000 $0.00111

Measured 24d ago against content hash 95209c52ff44, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

champion-merge-risk-shadow 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 24d 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/champion-merge-risk-shadow.md · 89 lines

How it starts

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

Shadow-Mode Merge-Risk Pre-Score (#8545) — telemetry, never a verdict

Load-gated: champion-pr-merge.md criterion #2 points here, and only when TYPESAFE_API_KEY is set. With the key unset this file is never read, no call is made, no log line is written, and Champion's pass is byte-identical to one from before #8545.

Why this exists

Criterion #2 is the one safety criterion that is a fresh LLM judgment every tick, and it is the criterion behind the recurring merge-risk-hold gridlock (digest #6877): the same unchanged PR can read green one pass and red the next. Jev (TypeSafe) answers the same four axes as calibrated probabilities, deterministically and cheaply. Logging both verdicts side by side is how we find out how often a hold is later released with no new commits — i.e. how many holds were noise. Nothing can be learned from the comparison if the score is allowed to change the verdict it is being compared against, which is why every rule below is about keeping the two apart.

What to run, after your own verdict is final

# ONLY after criterion #2's four-axis judgment is decided. Never before.
SHADOW=$(loom-daemon jev-merge-risk "$PR_NUMBER" 2>/dev/null) || SHADOW=""

jev-merge-risk prints one JSON line — pr, head_sha, truncated, model, confidence_basis, usage, and an axes object with a probability (that the axis is RED) plus a derived confidence for each of diff_composition_red, blast_radius_red, review_depth_red, revertability_red. It reads TYPESAFE_API_KEY from the environment, never from a file or a config key, and it never comments on, labels, merges, or holds anything.

If $SHADOW is empty (any failure: no key, forge read failed, Jev unreachable, malformed answer), stop here — log nothing and carry on with the pass exactly as if this file did not exist. Do not retry, do not wait, do not hold. A merge must never come to depend on a vendor being reachable.

Where it goes

Append one JSONL record to .loom/logs/champion-merge-risk-shadow.jsonl (a gitignored local log), pairing your own verdict with Jev's:

Read the full file on GitHub · 89 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. 24d ago First seen · 89 lines · 0 tokens per session scan A 95209c52ff44

Subscribe to this mod's changes

champion-merge-risk-shadow is a command published in the GitHub repository rjwalters/kicad-tools (70 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,108 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-09-23.