kicad-tools: Command for Claude Code

.claude/commands/repo/scrub.md

scrub is a command for Claude Code from rjwalters/kicad-tools. It costs 33 tokens per session (4,068 once invoked), scanned A, original, MIT.

A read-only checker that looks across a repository's code, history, issues, pull requests, and forks for sensitive identifiers such as account IDs, internal hostnames, and email addresses.

In plain words
What is it for?
Use it to scan current files or perform a deeper review of Git history and public collaboration records.
Why use it?
It shows what sensitive information is publicly visible and which findings can actually be removed, without changing the repository.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths.

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 →

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/repo/scrub.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 scrub

README.md
[![agentmods](https://agentmods.dev/badge/commands/rjwalters/kicad-tools/scrub.svg)](https://agentmods.dev/commands/rjwalters/kicad-tools/scrub)
Your own site
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/scrub"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/scrub.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,068 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.00033 $0.04068
Opus 5 $0.00016 $0.02034
Sonnet 5 $0.00007 $0.00814
Haiku 4.5 $0.00003 $0.00407

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

Security

Grade A, and why

scrub 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 3d 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/repo/scrub.md · 350 lines

How it starts

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

/repo:scrub — Public-Surface Scrub

Answer one question the other hygiene commands don't: is there anything here that should not be public?

That gap matters most where agents author content continuously. An agent writing an issue, a runbook, or an incident write-up has no instinct for which identifiers are sensitive, and those artifacts are exactly the genre where account IDs, resource IDs, internal hostnames, and email addresses accumulate. None of it is a credential; all of it is useful to an attacker. The drift is slow and invisible, which is why it needs a check on a routine cadence rather than a person remembering to look.

This command reports. It never edits. Same posture as [[orphans]]: name the file, commit, issue, or PR and the class, and stop. Deleting an issue or rewriting history is irreversible and is an operator decision — and, as the removability section below explains, usually a less complete fix than the operator assumes.

Usage

/repo:scrub                      # This repo, default verbosity — credentials and live-at-HEAD findings
/repo:scrub --deep               # Add history-only and network-topology classes
/repo:scrub --owner <owner>      # Every public repo for an owner/org, enumerated from the forge
/repo:scrub --forks              # Also sweep the fork network (delegates to repo-scrub-forks.sh)
/repo:scrub --json               # Machine-readable findings

/repo:all runs the default form only — this repo, quiet verbosity, no forge enumeration and no fork sweep. The wide forms cost API calls and minutes, and belong in a deliberate invocation.

Exit codes

Code Meaning
0 Clean — no findings at or above the reporting threshold
1 Findings at HEAD
2 Could not check — no gh, not authenticated, API failure, scan aborted

History-only findings never set exit 1 on their own. Nearly every repo with any history has some, none of them fixable without a rewrite nobody is going to perform, so failing on them means every repo fails forever and the signal is worth nothing. Code 2 is inconclusive and must never be reported as clean.

Read the full file on GitHub · 350 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. 3d ago First seen · 350 lines · 33 tokens per session scan A 889f291cd766

Subscribe to this mod's changes

scrub is a command published in the GitHub repository rjwalters/kicad-tools (56 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 4,068 once invoked, about $0.0002 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-03.