Methods¶
Most useful tricks never become projects. They sit in a script, solving one annoying problem well. This section pulls them out, one page each: the problem, why the approach works, a short sample, and where it stops working.
Each method has a small generic version with a test in the methods repository, under the MIT licence.
| Method | What it solves |
|---|---|
| derive | Convert a file once, cache the text beside it, reuse until the source changes. |
| unit | Mark a folder with a .unit file, call it by name, move it anywhere and nothing breaks. |
| key | Hand a secret to one command's environment; never printed, typed or logged. |
| heartbeat | Wake an AI agent every N minutes; it remembers nothing, so the task folder remembers for it. |
| logtrim | Shrink a log the running program holds open: gzip it beside itself, empty it in place, no restart. |
| harvest | All the text in a folder in one file; quoted replies, signatures and copies appear once. |
| addguard | Refuse "stage everything" before an AI agent runs it, and tell it to name its files. |
| githooks | One hooks folder runs your checks in every repo, then each repo's own hook, so nothing breaks. |
| pwned | Check a password against known breaches by sending 5 characters of its hash, never the password. |
| deadrefs | List every dead path in your notes; rewrite one only when exactly one place could be its new home. |
| shrink | Recompress images in place and replace one only after both versions decode to identical pixels. |
| gate | Start a background job only while a number read from a command is under a limit; unknown never means go. |
| progress | One local page for every background job: wakes, commits, pictures, what is ready and what is next. |
| pyfix | Find Python packages with files missing or changed from the list pip keeps; reinstall them at the same version. |
| unshare | Give every hardlinked file its own file again, as a clone that costs no disk until edited. |
| remarks | Talk over a screen recording; get every remark with a still of the screen while you said it. |
| gitfix | Restore tracked files a cleanup tool deleted or hardlinked; leave moved files and your edits alone. |
| credit | Refuse a push that would publish a name you did not allow; old public history never blocks it. |
| agenthist | Put the commands your coding agent runs into your shell history, byte for byte as the shell writes it. |
| revive | Start the launch agents macOS skipped at login from one allowed agent; anything switched off stays off. |
| assetsignore | Keep .DS_Store off a Cloudflare Workers static site, written where the build cannot wipe it. |
| sift | Search the words inside every file under your folders in a fraction of a second; one SQLite file, rebuilds read only what changed. |
| recent | The files you actually opened, newest first: Spotlight's last-opened date, not what sync and builds wrote to. |
| wt | One git worktree per agent task, with the ignored .env files copied and dependencies installed, and a guarded merge back. |
| servers | Every TCP server on this machine, split into reachable-from-the-network and this-machine-only, with its folder; stop one or rebind it to 127.0.0.1. |
| redact | Swaps API keys, tokens, passwords and private keys for [REDACTED:kind] as text is logged; commit ids, checksums and variable names pass untouched. |
| phonehome | Lists what a document fetches from the network the moment it is opened: Office, OpenDocument, PDF (through compressed object streams), SVG, HTML. |