kicad-tools: Command for Claude Code

.claude/commands/repo/sudo.md

sudo is a command for Claude Code from rjwalters/kicad-tools. It costs 48 tokens per session (5,493 once invoked), scanned D, original, MIT.

A command that can install a password-free sudo rule for the current user on a development machine.

In plain words
What is it for?
Inspecting, installing, or removing a sudoers rule, either for all commands or for a specified command list.
Why use it?
It prevents remote agent sessions from stopping at an unreadable password prompt when root access is needed, while requiring confirmation because the rule grants broad system access.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/rjwalters/kicad-tools/sudo.svg)](https://agentmods.dev/commands/rjwalters/kicad-tools/sudo)
Your own site
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/sudo"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/sudo.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,493 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 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.00048 $0.05493
Opus 5 $0.00024 $0.02746
Sonnet 5 $0.00010 $0.01099
Haiku 4.5 $0.00005 $0.00549

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

Security

Grade D, and why

sudo scanned grade D with 2 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

description: "Opt-in passwordless sudo for a dev machine — install a visudo-validated /etc/sudoers.d drop-in (ALL or a scoped command list) so an agent over SSH isn't blocked on password prompts, always confirmed first"

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

commands (`rm -rf /`, force-push to `main`, cloud destruction, …). Granting
.claude/commands/repo/sudo.md · 416 lines

How it starts

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

/repo:sudo — Passwordless-sudo setup for dev machines

Install (or inspect, or remove) a NOPASSWD: sudoers drop-in for the current user on this machine, so an agent driving the box over SSH isn't stopped dead by a sudo password prompt it can't answer. A non-interactive SSH session has no TTY to type a password into, so every root-level remediation — launchctl bootout, killing a runaway root process, spctl, renice — stalls until a human runs the command by hand. This command installs the standard fix once, safely, so agent-driven remote sessions can finish end-to-end.

This is machine-global, consequential setup: the drop-in grants anyone holding the user's SSH key effective root on this box. It is therefore in the same always-confirm-first class as /repo:remote, /repo:followups, and /repo:update-tools — it shows the exact file contents it will write and never applies silently, even without --ask. There is nothing to opt into; confirmation is the only mode. The reasonable trade this makes — passwordless root for personal dev machines on a private tailnet — is a deliberate operator choice, so the operator makes it explicitly every time a scope changes.

Touch ID is the better answer for local, interactive use — enabling pam_tid.so in /etc/pam.d/sudo lets a Mac authorize sudo with a fingerprint. But Touch ID does not work over SSH (there is no local fingerprint reader on the remote end), which is exactly why a NOPASSWD: drop-in is the right tool for agent sessions and this command exists.

The destructive-command guard still applies on top. Passwordless sudo removes the password gate, not the guard's ask/block gates on risky commands (rm -rf /, force-push to main, cloud destruction, …). Granting passwordless root does not weaken any of those checks.

Run this from a host session, not from inside a Loom-managed repo session. /repo:sudo configures the machine, not this repository's contents, and its write step (step 5) is deliberately built around mktemp — a path this repo's worktree-write-confinement guard can never resolve, so it is denied fail-closed whenever a managed worktree exists here. That denial is expected and must not be worked around: invoke /repo:sudo from a session outside a Loom-managed checkout, or have the operator run step 5's commands by hand in a plain shell/SSH login. Full explanation, and why the temp file must stay mktemp-created, is in the guard note in step 5.

Read the full file on GitHub · 416 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 · 416 lines · 48 tokens per session scan D 2053993121c5

Subscribe to this mod's changes

sudo is a command published in the GitHub repository rjwalters/kicad-tools (56 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 5,493 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.