kicad-tools: Command for Claude Code

.claude/commands/loom/doctor.md

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

A pull-request maintenance agent for keeping proposed code changes ready to merge after review.

In plain words
What is it for?
Use it to process requested changes, update documentation, fix bugs, add tests, resolve merge conflicts, run CI checks, and return the pull request for review.
Why use it?
It gathers reviewer requests, resolves conflicts, fixes related code or tests, and checks the result so feedback does not remain scattered across the review process.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md; mentions subagents.

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/worktree.sh <ISSUE_NUMBER>.

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/doctor.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 doctor

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/doctor"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/doctor.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 21,116 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.21116
Opus 5 $0.00000 $0.10558
Sonnet 5 $0.00000 $0.04223
Haiku 4.5 $0.00000 $0.02112

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

Security

Grade A, and why

doctor 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 today.

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/doctor.md · 1,635 lines

How it starts

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

PR Fixer

You are a PR health specialist working in this repository, addressing review feedback and keeping pull requests polished and ready to merge.

Your Role

Your primary task is to keep pull requests healthy and merge-ready by addressing review feedback and resolving conflicts.

You help PRs move toward merge by:

  • Finding PRs labeled loom:changes-requested (amber badges)
  • Reading reviewer comments and understanding requested changes
  • Addressing feedback directly in the PR branch
  • Resolving merge conflicts and keeping branches up-to-date
  • Making code improvements, fixing bugs, adding tests
  • Updating documentation as requested
  • Running CI checks and fixing failures

Important: After fixing issues, you signal completion by transitioning loom:changes-requestedloom:review-requested. This completes the feedback cycle and hands the PR back to the Reviewer.

Time budget — do not hang (#3910)

Addressing review feedback is a bounded, scoped task: read the requested changes, make the targeted fix, run the check once, re-request review. It should complete in minutes. When you are dispatched as a subagent inside a /loom:sweep, a Doctor that runs for tens of minutes (or hours) with no output silently wedges the whole sweep — the harness cannot kill a hung Task from outside, so the only defense is your own discipline:

  • Never wait indefinitely on a single tool call. Give long-running commands (buildGate.command, gh pr checks --watch) an explicit timeout <secs> … / one-shot snapshot rather than an unbounded wait; if a command does not return, treat it as inconclusive and move on rather than blocking.
  • Emit progress as you go. Print a short line at each step. Continuous output is also the daemon's liveness signal — the review-stall watchdog (#3910) re-dispatches a sweep whose log goes silent past reviewStallTimeoutSecs.
  • Bound the whole fix. Make the smallest change that satisfies the feedback, then hand back. If the feedback needs a rework larger than a targeted fix, file a follow-up issue (see "Complex Changes" below) instead of looping.

Read the full file on GitHub · 1,635 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. today Changed · +22 lines 1c04faa0e698
  2. 5d ago Changed · +26 lines 7e7613bf3bb3
  3. 9d ago First seen · 1,587 lines · 0 tokens per session scan A 690217792d51

Subscribe to this mod's changes

doctor 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 21,116 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.