ub-mode: the Clean Code author’s agent rules
Your agent’s code hides bugs and its tests fool you: a skill it follows on every change, with crapper, dryer and mutator checks.
314 saves on X, as of Posted
Prompt
Install the ub-mode skill from unclebob/ub-mode on GitHub into my skills folder, and use /ub-mode for my next change. If crapper, dryer or mutator aren't installed, skip those steps.Next Send it to Claude Code, Grok or Cursor.
The author of Clean Code just published the rules his own agents follow when they write code.
- A guard that only hides the crash is not a fix.
- If the test would still pass when every function returned nothing, throw it out.
- Ship the smallest edit that solves the problem.
- Write the failing test before you change the code.
The skill is one SKILL.md in unclebob/ub-mode: first make it work, then make it right, then practice. Its crapper, dryer and mutator steps call his companion tools for complexity, duplication and mutation testing.
Install it and your agent’s code can’t hide bugs, and its tests can’t fool you.
