Neo-Olympia / Toolbox

A Toolbox of
Scar Tissue

One file of pitfalls and local tools. Almost every rule comes from a real incident and carries its date and what was measured. It is loaded in every session, so the same mistake is not made twice.

115rules
104with a dated source
8groups

Eight Groups

What Is In There

166 lines. A rule is a pitfall that holds everywhere; a lesson for one project stays in that project's guide.

GroupRulesWhat it holds
Claude Code: web, browser, agents54Browser automation, fetching from the web, agents and workflows: what a tool does against what it claims to do.
WordPress, ACF and WP-CLI13Importing field groups, revisions, feature flags, running scripts on a server without leaving files behind.
WSL, Git Bash and git11Which shell runs what, line endings, archives, ssh, paths that change on the way.
Responsive building and checking11Measuring at every width, why a count of zero is not the same as having looked.
Tools8Installed tools and when they are worth using.
Machine and tools6Memory, Python, what the laptop can carry in parallel.
Files and paths7Backslashes, carriage returns, folders with hundreds of thousands of files.
Images, Figma to web5Blend modes, transparency, gradients that look the same in the design and in the browser.

Eight Lessons

Each One Cost Something

A selection, in the words of the entry, with the date it was learned.

A flag that switched itself off

A database export with a bare --no-create-info failed on production. WP-CLI turns --no-x into x=false and mysqldump stopped with exit code 7. Every dump flag now takes an explicit value.

A grey photo that was transparent

An image looked like a grey studio photo. It was a transparent PNG, and the file reader shows transparent pixels as grey. Now the alpha is measured before anything is concluded.

Not enough memory

With 2.8 GB free, two background jobs were stopped and a snapshot zip broke. After memory was freed, the same jobs ran green. Free memory is now measured before a long job; under about 4 GB, the owner is asked.

Reading a field before an import

A script read one field before importing a field group. The import then deleted 38 fields and two pages stood empty for about nine minutes. Now: a fresh process, filters off first, nothing read before the import.

A glow that was too bright

A Figma gradient with a different colour and alpha at each stop was copied into CSS with the same stops, and glowed brighter and further. Figma mixes colour and alpha separately; CSS premultiplies. Now Figma's curve is computed and added as in-between stops.

Centred, but 287 px off

A word-mark centred with a margin in vw sat 287 px too far left at 1280, and went live that way. vw counts the scrollbar. Now: calc(50% - N/2 vw).

A wait that never ended

A loop waited for the word “done” in a log that PowerShell had written in UTF-16, so grep never found it. It ran from 22:24 to 23:21. Now the script writes a done-file and the loop waits for that.

Thirteen of fourteen downloads failed

jq -r puts a hidden carriage return at the end of every line on Windows, so the URLs read “null”. Always pipe it through tr -d '\r'.

On The Shelf

Scripts We Wrote

Small tools that exist because a general-purpose one failed once. Each lives in the toolbox folder.

ScriptWhat it doesWhy it exists
imgdiff.shCompares two PNGs exactly: pixels changed, percentage, bounding box.ImageMagick's own compare gave 0 on a grey PNG and two thirds of the real count on another.
verlies_check.pyLooks for every old line of a rewritten guide in the new files.A rewrite can silently drop a lesson. See Shield.
compact_resume.pyPuts the right brain and resume card back after a compaction.Without it a compaction depends on whether the session remembers to look. See Shield.
print_wf.pyReads the journal of a workflow run: which agents finished, with what result.A script to read a journal had been written from scratch at least 65 times.
agentcheck.pyCounts which model each agent really ran on.Four of fifteen runs asked for “opus” ran on an older Opus, and the log only said “opus”.
png-paletteTurns a transparent PNG into a 256-colour PNG that keeps its partial transparency.A 848 × 1264 render went from 2.3 MB to 94 KB, visually the same.

Also installed and used when they help: tesseract (OCR), Lighthouse and pa11y, Playwright, PHP, jq, ImageMagick, FFmpeg. Using one is an option, never a fixed step.

How A Lesson Gets In

Dated, Sourced, Honest

Real incident

Almost every rule comes from something that happened. The date, the project and how it was tested are in brackets at the end of the line.

Several projects

It goes in the toolbox only if it holds for more than one project. Otherwise it goes in that project's guide, or in the guide of its domain.

Not measured says so

When a cause is a guess, the entry says that it is a guess and how to check it. A rule that turns out to be wrong is corrected in the open, with the date of the correction.

NextSkills → Back to the start