Ethan has ~600 custom tools in ~/.local/bin and almost certainly rebuilds things he already wrote. This scans new Claude Code sessions for shell commands that duplicate an existing tool's purpose, and when a fresh script is written that overlaps an old one, it whispers the older tool's name to the tablet before the duplicate ossifies. It turns his tool sprawl from a liability into recall.
Create ~/.local/bin/tool-dupe-radar (bash+python). (1) Build a one-time index: for each executable in ~/.local/bin, extract the first comment block / --help line into ~/.cache/tool-index.jsonl, embedded via the existing embed-batch-submit + local ollama. (2) A systemd timer every 30m tails ~/.claude/projects/*/\*.jsonl for Write/Edit tool_use events whose file_path is under ~/.local/bin or ends in .sh, plus any new file created in the last 30m. (3) For each, embed its docstring and cosine-compare against the index; if top match >0.82 similarity and is a DIFFERENT file, emit a card. (4) Deliver via existing socratic-tablet-pipe to ~/Tablet/ as 'You just wrote X — you already have Y (last used N days ago, per tool-half-life). Merge or rename?' (5) Log to ~/.local/state/tool-dupe-radar.jsonl so tool-sprawl-sentinel can chart the dedupe rate.
**What it does**
- Indexes all 590 executables in `~/.local/bin` + `~/bin` by their docstring
- Every 30m, scans scripts written/edited in that window (from Claude session transcripts + fresh files in the tool dirs)
- Any that overlaps an **older** tool's purpose gets a card on the tablet: *"You just wrote X — you already have Y (last touched N days ago, 41% overlap). Merge or rename?"*
- Logs each hit to `~/.local/state/tool-dupe-radar.jsonl` for `tool-sprawl-sentinel` to chart
**Files created**
- `~/bin/tool-dupe-radar` — the scanner (python3, zero deps, ~165 lines)
- `~/bin/tool-dupe-radar.test.sh` — 10 tests, all green, sandboxed HOME
- `~/.config/systemd/user/tool-dupe-radar.{service,timer}` — enabled, capped 512M/50% CPU, reboot-persistent, next run 06:35
- Cards land in `~/Tablet/tool-dupe-radar/`
**One deviation from the plan, deliberate**
- Local ollama is **disabled** (`~/.local/bin/ollama`, 2026-07-15), so `embed-batch-submit` has no embedding runner. Used IDF-weighted token cosine in-process instead — deterministic, no network, no silent degradation. Threshold 0.35 (token cosine, not the 0.82 embedding figure).
**Verified live:** a real backfill run over 3 days of history surfaced 8 genuine overlaps (incl. an accidental `.bak` copy of `daily-digest-emailer-freshness-check`). Negative control passes — unrelated tools aren't flagged, and each pair only whispers once.