talira

An agent skill that enforces disciplined software engineering principles when writing or changing code

open sourceMITself-hostablefree

ub-mode is Robert C. Martin's (Uncle Bob's) agent skill: one SKILL.md that sets the rules a coding agent follows on every change, in three stages. First make it work (failing test first, the smallest edit, data shape before logic, checking data where it enters), then make it right (fix root causes, test behaviour rather than implementation, refactor under pinned behaviour), then practice (keep a log of every action and why, guard the context window, small ordered commits). It is loosely based on parts of poteto's rules (poteto-mode and pstack), cut down and paired with deterministic quality gates from his companion tools crapper (every function under a CRAP score of 10), dryer (structural duplication) and mutator (mutation testing). You copy the file into an agent's skills folder and run /ub-mode; it was published in October 2026.

Problems it solves

  • make my coding agent write the failing test before it touches the code
  • the AI bolts every new requirement onto the old design instead of rethinking it
  • keep each function the agent writes simple enough to be well tested
  • agent-written tests pass even when the code returns nothing
  • get the agent to kill surviving mutants and delete dead code it leaves behind
  • I want an agent to follow clean code and TDD discipline without me reminding it every prompt
  • make the agent keep a log of what it did and why, and report it at the end
  • AI keeps adding guards that hide crashes instead of fixing the root cause
  • the agent's commits are huge and don't say how the change was proven

Features

  • single SKILL.md invoked as /ub-mode
  • three stages: First Make it Work, Then Make it Right, Practice
  • TDD, Attack the Premise, Subtract Before You Add, Build the Lever rules
  • architecture rules: model the domain, boundary discipline, type system discipline, idempotent operations
  • quality gates: CRAP under 10 (crapper), duplication under 0.8 (dryer), mutation testing (mutator)
  • practice rules: action log, context window guarding, worktree cleanup, small ordered commits

Limitations

  • Doesn't include its quality-gate tools: CRAP scores, duplication and mutation testing come from the separate crapper, dryer and mutator repositories1

Alternatives

The same job

These do what ub-mode does.

  1. Ponytail Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
  2. Superpowers An agentic skills framework & software development methodology that works.
  3. Initial Commit Club Skills for AI agents, tested on real products, plus a Discord for builders

Compare ub-mode with the top 3