tidy

tidy is a command for Claude Code from rjwalters/kicad-tools. It costs 19 tokens per session (13,439 once invoked), scanned A, original, MIT.

A repository cleanup command that finds junk, temporary files, empty folders, build output, and caches.

In plain words
What is it for?
Cleaning the whole repository or one folder, optionally removing rebuildable caches, reviewing every item interactively, and measuring folder sizes.
Why use it?
It removes safe clutter while leaving caches and anything that might contain real work for explicit review.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; positional $N argument; mentions Codex.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is # repo root (`../repo-wt-fix123`, `/private/tmp/…`, `/private/var/folders/…`),.

Good fit Cleaning the whole repository or one folder, optionally removing rebuildable caches, reviewing every item interactively, and measuring folder sizes.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/rjwalters/kicad-tools
agentmods
npx agentmods add commands/rjwalters/kicad-tools/tidy

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 tidy

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/tidy"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/tidy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 13,439 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.00019 $0.13439
Opus 5.5 $0.00008 $0.05376
Sonnet 5.5 $0.00004 $0.02688
Haiku 4.5 $0.00002 $0.01344

Measured 2mo ago against content hash 749a2976fa37, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tidy 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 2mo 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/tidy.md · 857 lines

How it starts

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

/repo:tidy — Tidy Up

Sweep the working tree for clutter and clean it up. Inventory everything, categorize by confidence, then by default delete the SAFE category (pure junk that holds no unique work) and report what was freed. Regenerable caches (compilation/tool/build output) are kept by default and only cleared when you pass --caches — deleting them is harmless but forces a costly rebuild, so it is opt-in. Items that could be real work (ASK) are always presented for a human call, never auto-deleted.

Usage

/repo:tidy                    # Inventory, delete SAFE junk (caches kept), report; ASK items presented
/repo:tidy --caches           # Also clear regenerable caches (__pycache__/, dist/, .mypy_cache/, …)
/repo:tidy --ask              # Walk every category interactively before deleting anything
/repo:tidy --sizes            # Also measure worktree root sizes (slow: du has no prune)
/repo:tidy --fast             # Skip the reference scans entirely; unscanned candidates land in ASK, not SAFE
/repo:tidy --deep             # One reference scan per candidate instead of one batched pass (audit only)
/repo:tidy packages/core      # Scope to one subtree

(--apply is accepted as a synonym for the default, for muscle memory. --caches composes with --ask: --ask still walks every category, --caches just moves the cache tier into the auto-delete set for the non-interactive default. --sizes only adds the per-worktree size column described in step 1 — it never changes what is deleted.)

--fast / --deep are the two ends of the reference-scan cost dial, and neither is the default. The default is one batched reference pass over the whole candidate set, described in step 2 — that is what every run does unless one of these flags is passed:

  • --fast skips the reference scans entirely. Candidates that would have been scanned are still inventoried and reported, but they are routed to ASK rather than SAFE/CACHE, because a check that was not run is not a check that passed (safety rule 11).
  • --deep restores the pre-batching behaviour: one scan per candidate. It exists to audit the batched pass, not to get a different answer — batching is a traversal optimization, so if --deep and the default ever disagree, that is a bug in the batched pass and not a feature of --deep.
  • They are mutually exclusive. If both are passed, --fast wins: skipping is both the cheaper option and the one that cannot delete more than the default would.

Read the full file on GitHub · 857 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. 2mo ago Changed · +224 lines 749a2976fa37
  2. 3mo ago First seen · 633 lines · 19 tokens per session scan A 963e671140ad

Subscribe to this mod's changes

tidy is a command published in the GitHub repository rjwalters/kicad-tools (77 stars, last pushed 15d ago), licensed MIT. It adds 19 tokens to every session and 13,439 once invoked, about $0.0001 per session on Opus 5.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

tidy compared with commands from other repositories

tidy next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tidyrjwalters/kicad-toolsCommand7715d agoMITA19Claude Code
cancel-ralphanthropics/claude-plugins-officialCommand49ktodayApache-2.0A4Claude Code
wsdanielmiessler/LifeOSCommand21k14d agoMITA0Claude Code
engage.actionshypnguyen1209/offensive-claudeCommand4341mo agoMITA11Claude Code
promote-lessonskumaran-is/claude-code-onboardingCommand37yesterdayMITA25Claude Code
focusData-Wise/claude-pluginsCommand7todayMITA0Claude Code
stuckData-Wise/claude-pluginsCommand7todayMITA0Claude Code