The AI writes the tool. The tool does the work.
In short: I don't want Claude to do the same chore every day. I want Claude to write a small program that does the chore, keep it in git, and let a timer or CI run it. Claude comes back only when the tool breaks or needs to grow. The test: could an engineer with no AI run everything from the README, the Makefile and the logs?

Context
I am a software engineer by habit. The things I trust are repeatable: a script with a usage line, a make target, a CI job, a systemd timer. They do the same thing every time, they leave logs, and they don't have opinions.
When I started using Claude Code seriously at home, I noticed I was asking it to do the same jobs over and over. Rebuild the intranet pages. Check which backups ran. Count the hours my robot simulation had logged this week. Each time it worked, and each time it cost a conversation, a context window and my attention. And each time it was done slightly differently, because a model is not a script.

So I set a rule: anything I do twice becomes a program. Not a snippet in a scratch folder: a file in a repo, with a usage line, an entry in the tools index, and ideally a test.
There is a second reason that matters more to me than cost. I want my setup to keep working if the AI is not around: if I hit a usage limit, if the service is down, or if I decide to stop using it. The model is where judgment lives. The tools are where routine lives. I want the routine to run on its own.

Photo: Theoprakt, CC BY-SA 3.0, via Wikimedia Commons (resized)
Detail
What "a kept program" looks like
Every tool has the same small shape. The top of the file says what it is and how to call it:
#!/usr/bin/env python3
"""Rebuild every drawing PNG from its checked-in source, without AI.
drawings build [NAME...] rebuild all, or the named ones
drawings check exit 1 if a PNG no longer matches its source
drawings list each drawing: name, PNG, source
"""
The picture at the top of this post was made by that tool. It reads a small YAML file of boxes and arrows and writes a PNG. No model is involved when it runs. Claude wrote it, and Claude adds a feature when I ask for one, but a timer could rebuild every drawing tonight with nobody watching.
The other common shape is a make target, so the entry points are discoverable:
make build # drafts -> HTML
make check # front matter, length, privacy word list
make test
Where they run
- On a timer: systemd user timers on the laptop, or cron on a small always-on box at home. Backups, nightly copies, weekly usage reports.
- In CI: a self-hosted code forge with runners at home. Sites and internal pages are built and deployed by the pipeline, only after the gates pass, and only when the content actually changed.
- By hand: some tools are just commands I or an agent run. They still live in git and still have a usage line.

Deterministic first, model where judgment is needed
Some jobs really do need a model: summarizing, writing, deciding what matters. The pattern there is to keep the model's part as small as possible and wrap it in code that checks the result. For example, a script asks a model for a short text, then code checks its length and shape and refuses anything that doesn't fit. The model does the part only a model can do; everything around it is ordinary code.

Lessons
- Promote useful one-offs the same day. A script in a scratch folder can be cleaned up at any time. If a job depends on it, it belongs in a repo, with a usage line, or it should be deleted.
- The first lines of a tool are its manual. What it does, how to call it, what it touches. Without that, a tool found three weeks later is a tool nobody dares to run.
- Many tools need an index. Turning everything into a program means many programs. A short index file, one line per tool, keeps them findable. The agent updates it in the same commit as the tool.
- Watch the watchers with code, not with chat. A daily job of mine once went stale for more than a week before I noticed. The answer was not to ask an agent to keep checking. It was a small freshness script that runs twice a day and sends a push message to my phone when something is overdue.
The test I use
When a job is done, I ask: if Claude vanished tomorrow, could someone with only the repo run this? README tells them what it is. Makefile tells them how. Logs tell them what happened. If the answer is no, the job isn't done.
That has quietly changed how I use AI. Less "do this for me". More "build me the thing that does this, and make it boring".
Drafted with Claude.