kicad-tools: Command for Claude Code

.claude/commands/loom/champion-pr-merge.md

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

Reference instructions for a Champion role that reviews and merges certain GitHub pull requests. A pull request is a proposed change to a codebase that is waiting to be accepted.

In plain words
What is it for?
Use it to inspect review results, check merge conditions, handle pull requests marked for the Champion workflow, and merge eligible changes.
Why use it?
It defines the safety checks for automatically merging routine, low-risk changes after they pass review, reducing the chance of merging an unsafe change.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

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 ./.loom/scripts/verdict-staleness-guard.sh "$PR_NUMBER" --clear.

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/champion-pr-merge.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 champion-pr-merge

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/champion-pr-merge"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/champion-pr-merge.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 48,714 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.48714
Opus 5 $0.00000 $0.24357
Sonnet 5 $0.00000 $0.09743
Haiku 4.5 $0.00000 $0.04871

Measured yesterday against content hash dd6d0ebec3a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

champion-pr-merge 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 yesterday.

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-pr-merge.md · 3,338 lines

How it starts

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

Champion: PR Auto-Merge Context

This file contains PR auto-merge instructions for the Champion role. Read this file when Priority 1 work is found (PRs with loom:pr label).


Overview

Auto-merge Judge-approved PRs that are safe, routine, and low-risk.

The Champion acts as the final step in the PR pipeline, merging PRs that have passed Judge review and meet all safety criteria.


⚠️ --body @path Does NOT Expand — It Posts the Literal String

If you post a comment via gh issue comment / gh pr comment / gh api ... comments from a scratch file, --body @path (and gh api -f body=@path) posts the literal string @path, not the file's contents. Full pitfall, incident citation, and fixes: comment-body-literal-path.md.


Cached forge reads (gh-cached, #4667)

Champion runs on a 10-minute cron alongside concurrent Judges and sweeps, all sharing one personal gh rate-limit budget (#4665). Its repeated observation reads — idempotency-marker comment greps, backlog scans, duplicate searches — go through the short-TTL cache wrapper. Its merge-gating reads do not: this skill performs the single most irreversible action in the pipeline, so every read a merge decision rests on must observe current state unconditionally.

Resolve the wrapper once, at the start of the pass:

# Degrades to plain `gh` when absent or when its Python runtime is broken —
# the same probe merge-pr.sh uses. Nothing here depends on the cache existing.
GH_READ="gh"
_ghc="$(git rev-parse --show-toplevel 2>/dev/null)/.loom/scripts/gh-cached"
if [[ -x "$_ghc" ]] && "$_ghc" --version >/dev/null 2>&1; then GH_READ="$_ghc"; fi

Route through $GH_READ (cached, 30s TTL):

  • Idempotency-marker comment greps (--json comments reads for the verdict-janitor, hold, stale-PR, park, close, and prior-grant markers). These only answer "did I already post this?"; the cache is invalidated by your own --clear-cache after you post (see below).
  • The loom:blocked unblock scan (gh issue list --label "loom:blocked") and its per-issue body/state reads.
  • The follow-on-issue duplicate search (gh issue list --search …).
  • The parked-PR listing (gh pr list --label …).

Read the full file on GitHub · 3,338 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. yesterday Changed · +20 lines dd6d0ebec3a1
  2. 2d ago Changed · +7 lines 84964bd0de00
  3. 11d ago First seen · 3,311 lines · 0 tokens per session scan A 0fc64188a967

Subscribe to this mod's changes

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