kicad-tools: Command for Claude Code

.claude/commands/repo/orphans.md

orphans is a command for Claude Code from rjwalters/kicad-tools. It costs 18 tokens per session (518 once invoked), scanned A, original, MIT.

A repository checker that finds files which appear to have no users, including unused scripts, stale data files, and generated outputs without their source files.

In plain words
What is it for?
Use it to scan a repository or folder for unreferenced scripts, data files, and source/output mismatches.
Why use it?
It helps uncover dead code and leftover files that make a project harder to understand and maintain.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/rjwalters/kicad-tools/orphans.svg)](https://agentmods.dev/commands/rjwalters/kicad-tools/orphans)
Your own site
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/orphans"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/orphans.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 518 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.00018 $0.00518
Opus 5 $0.00009 $0.00259
Sonnet 5 $0.00004 $0.00104
Haiku 4.5 $0.00002 $0.00052

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

Security

Grade A, and why

orphans 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/orphans.md · 62 lines

What it actually says

/repo:orphans — Orphan Finder

Find files that appear to have no consumers — scripts nobody calls, data files nothing reads, build outputs without sources.

Usage

/repo:orphans                    # Full repo
/repo:orphans tools/             # Scope to subtree
/repo:orphans --type scripts     # Only check scripts

What It Checks

1. Orphaned Scripts

Python/shell scripts in scripts/, tools/, or bin/ directories that are not referenced by:

  • Any other script, Makefile, package.json script, or CI config
  • Any README or documentation
  • Any skill/command file

Search for the script's basename across the repo. If zero references exist outside the file itself, it's likely orphaned.

2. Orphaned Data Files

YAML, JSON, CSV files that are not:

  • Imported or read by any code
  • Referenced in any README or documentation
  • A recognized tool config (.eslintrc, pyproject.toml, CI workflows, etc. — many configs are consumed by convention, not by reference)

3. Source/Output Mismatches

  • Generated outputs (.pdf, .html, compiled binaries) without a corresponding source (.tex, .md, .py, …)
  • Sources whose expected output is missing (may indicate a broken build)
  • .example / .sample files where the real file now exists

4. Empty Directories

Directories that contain no files (only subdirs or nothing at all).

Interaction

Present findings grouped by type. For each orphan, show:

  • The file path and size
  • What was searched for (e.g., "grepped for extract.py — 0 references")
  • Suggested action: delete, move, or add a reference

Deleting an orphan is destructive and a judgment call — an "orphan" is often a legitimate standalone file the user keeps deliberately — so unlike the safe-fix commands this one never auto-acts. It reports and waits for your decision (delete, move, or add a reference), with no --ask needed: report-and-wait is the only mode.

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 · 62 lines · 18 tokens per session scan A 4a40e9aaa570

Subscribe to this mod's changes

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

Related

Other commands, from other repositories

qa-changes

This skill should be used when the user asks to "QA a pull request", "test PR changes", "verify a PR works", "functionally test changes", or when an automated workflow triggers QA validation of code changes. Provides a structured methodology for setting up the environment, exercising changed behavior, and reporting…

OpenHands/extensions · 63 tokens

doctor

Diagnosticar y reparar problemas del framework Don Cheli, git y entorno. Usa cuando el usuario dice "doctor", "problemas del framework", "don cheli no funciona", "repair Don Cheli", "debug setup", "setup broken", "framework broken", "reparar entorno". Detecta y repara issues de configuración, git y dependencias…

doncheli/don-cheli-sdd · 76 tokens

fix

Universal debugging and fix application with semantic code analysis.

stefan-jansen/claude-code-toolkit · 9 tokens

gh-issue-use-cypress

Like /gh-issue-use-browser, but pinned to the Cypress MCP — use when your project runs the Cypress MCP for browser automation. Example — /gh-issue-use-cypress "Composer > Save" saving toasts failure but the record persists.

skyfox675/agents-skills · 49 tokens

http-service

Build, review or debug a Bun HTTP service. Loads the http-service skill, then works the task through its workflow.

MadAppGang/magus · 27 tokens

auditar-cascading

Invoca cascading-failures-auditor — audita serviço para 5 triggers de cascade (sem timeout, retry sem jitter, sem circuit breaker, sem deadline, queue unbounded) e gera CASCADING-AUDIT.md.

luanpdd/kit-mcp · 54 tokens