Uncle Bob Releases ub-mode Agent Skill Enforcing Clean Code and TDD Discipline

Clean Code author Robert C. Martin released ub-mode, an open-source agent skill that enforces disciplined software engineering principles when writing or changing code. The skill structures every change into three stages: First Make it Work, Then Make it Right, and Practice, pairing classic Clean Code and TDD rules with deterministic quality-gate tools including crapper, dryer, and mutator.
Event version 1.
Key insights
Three-stage workflow
ub-mode divides every code change into First Make it Work, Then Make it Right, and Practice. The first stage covers the Laziness Protocol, data shapes, failing tests first, redesign from first principles, and architecture discipline.
Machine-measured quality gates
The second stage applies deterministic tools: crapper keeps the CRAP score under 10, dryer flags structural duplication at 0.8 or above, and mutator covers uncovered code, kills surviving mutants, and deletes dead code.
Practice and commit hygiene
The Practice stage requires logging actions with reasons, keeping the main-thread context small, cleaning up worktrees, and committing in small ordered commits that state why, what changed, and how it was proven.
Companion tool repositories
ub-mode relies on companion repositories unclebob/crapper and unclebob/dryer, and an uml-viewer shows components, coverage, CRAP scores, mutation scores, and dependency direction.
Derived from poteto rules
The skill is loosely based on portions of poteto's rules (poteto-mode / pstack), reduced and paired with deterministic quality-gate tools.