From b79c6c20e261ae2329c5357a6ec44445a403c0a9 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Sun, 20 Sep 2026 18:04:25 +0200 Subject: [PATCH] feat(claude): search for an existing tool before writing one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Twice now a script has been written and thrown away because an equivalent already existed. Today: a GitHub Actions runner setup script, written from scratch and reviewed twice, when `setup-gha-runner.sh` was already in ~mt on the host that runs it and on main in thompsonson/dev. The existing one was better — it runs installdependencies.sh, waits for "Listening for Jobs" rather than trusting systemctl is-active, and preflights that the runner user cannot read ~mt. The searches that missed it looked in dotfiles and in the host's PATH. The ones that would have found it: the home directory of the machine that runs it, and `gh search code --owner`. Claude-Session: https://claude.ai/code/session_01VUd2Wv3nkSBpWgYBK6yhfh --- dot_claude/CLAUDE.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dot_claude/CLAUDE.md b/dot_claude/CLAUDE.md index cc4956a..836ff71 100644 --- a/dot_claude/CLAUDE.md +++ b/dot_claude/CLAUDE.md @@ -15,6 +15,14 @@ How I want every session on my machines to write, ask and act. - Never hand me a step you could have done yourself. - Report failures plainly, with the output that shows them. +## Before you build + +- Search for an existing script or tool before writing a new one. +- Look in the repository, in my other repositories, and in the home directory of the machine that will run it. +- `gh search code --owner thompsonson ""` finds it when a local search does not. +- Improve what exists rather than writing a second one beside it. +- Say what you searched, so I can point you at what you missed. + ## Questions - Read the documentation, code, config and git history before asking.