/mistake-proof:mistake-prooffrom mistake-proof
Designs or audits code so a mistake cannot be expressed instead of documenting it, ranking each hazard on a control, warning, detection or docs-only ladder. Use when designing an interface, schema or state machine to be hard to misuse, auditing for footguns, or closing a recurring bug class after an incident. Also known as poka-yoke. Not for module and interface shape (codebase-design).
Ships in mistake-proof. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Not for finding bugs already on the page (second-opinion or /code-review), language idiom (typescript, python, if installed), or schema constraints alone (db-schema-design, if installed).
A mistake is not the problem worth solving. The problem is letting a mistake become a defect. The remedy is a device that makes the wrong action impossible or immediately visible, not a reminder to be careful.
A comment, docstring, wiki page, review checklist, or "don't do X" line in an instructions file is not a device. It is training, and training decays as the file grows and the team changes. A check that fails the build does not decay. If a proposed fix depends on someone remembering something, keep looking for the device behind it.
Axis 1: what happens when the mistake occurs. Say which rung the code sits on today and which rung your fix reaches.
| Rung | Name | Meaning |
|---|---|---|
| 1 | Control | The wrong action cannot be performed: a type error, a database constraint, a missing permission |
| 2 | Warning | It is possible but announces itself as it happens: a lint error, a runtime assertion, a confirmation that cannot be skipped |
| 3 | Detection | It happens and you find out afterward: tests, logs, monitoring, review |
| 0 | Docs only | Telling people to be careful |
Detection is sometimes all that exists. A plan that stops there should say it limits cost, not likelihood, so the likelihood gets its own item.
Axis 2: how the device notices. Three lenses find hazards.
Catch the mistake where it is made. A check three layers below the input has already let the bad value travel, and the stack trace points at the wrong module. Put validation at the boundary the value crosses.
hazard-catalog.md lists the recurring shapes by lens, each with its signal and device. Read it when you need vocabulary or when scanning code for hazards.
A device is free before the code has callers and a migration afterward. Work from the call site, because a signature that reads well alone often reads badly where it is used.
# the mistake is expressible: nothing stops refunding an unpaid order
def refund(order: dict) -> Refund: ...
# the mistake has no spelling
def refund(order: PaidOrder) -> Refund: ...
Apply these moves in roughly this order.
Close by naming what the design now makes impossible, and what you left possible on purpose and why. A design with unstated limits gets trusted past them.
Language mechanics (branded types, typestate, exhaustiveness helpers) belong to the language skills, if installed: typescript, python, golang, rust, and db-schema-design for constraints.
You are not hunting bugs, which are mistakes that already happened. You are hunting mistakes that are available: easy, silent, and correct-looking.
rg for the signals in the hazard catalog, then read the surrounding code. Text search finds shapes. Only reading finds the ones that matter.path:line with a symbol, the available mistake, its consequence, the device that exists today, the device that would close it, and the rung that device reaches.Report three findings that matter in preference to eleven padded ones. Make no edits until the user picks items.
Keep three things apart, because the fix belongs to the third.
Fixing the mistake fixes one case. Fixing the hazard fixes the class. Then sweep: search the repo for the same shape, and report the second and third instances. That is the difference between a patch and a lesson.
Attribute the cause to the system. "Someone made a mistake" sounds complete, predicts nothing, and ends the investigation early.
--no-verify and needs CI behind it to be a gate. Say which one you propose.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin mistake-proof