← Back to archive

Repo of the Day

unclebob/ub-mode

Published: Nov 18, 2026

Open repository ↗

Contribute to unclebob/ub-mode development by creating an account on GitHub.

Summary

ub-mode is an agent skill for applying disciplined software-engineering practices while writing or changing code. It combines a staged workflow—make it work, make it right, then maintain disciplined practices—with separate tools for measuring complexity, duplication, and test thoroughness.

What it is useful for

The skill is useful when an engineer wants coding-agent work to follow a repeatable engineering process rather than jump directly to an implementation. Its “First Make it Work” phase emphasizes test-driven development, first-principles design, simplifying existing solutions, modeling the domain, respecting boundaries and types, and making operations idempotent.

The “Then Make it Right” phase focuses on root-cause fixes, breaking work into verifiable units, testing behavior rather than implementation details, and refactoring. The final “Practice” section covers keeping a log, protecting context-window capacity, cleaning up worktrees, and making small, ordered commits.

ub-mode also points to deterministic companion tools:

  • Crapper calculates cyclomatic complexity, coverage, and a CRAP score per function, with a target below 10.
  • Dryer identifies structurally duplicated blocks using a similarity threshold of 0.8 or higher.
  • Mutator performs mutation testing to find uncovered code and mutants that survive the test suite.
  • uml-viewer visualizes components, coverage, CRAP, mutation scores, and dependency directions.

For example, after adding a feature, an engineer could use Crapper to identify functions whose complexity and coverage produce a high CRAP score, use Dryer to find newly duplicated logic, and use Mutator to check whether tests detect incorrect changes in behavior.

How engineers can use it

Installation is a manual file copy rather than a package-manager command. Copy SKILL.md into the skills directory used by your agent, keeping the ub-mode directory structure. The README gives these examples:

~/.grok/skills/ub-mode/SKILL.md
~/.claude/skills/ub-mode/SKILL.md
~/.cursor/skills/ub-mode/SKILL.md

Then invoke:

/ub-mode

Use the skill during implementation and review so its engineering rules guide the change, and consult the companion repositories for their own setup and commands. A documented limitation is that this README does not provide installation, configuration, or invocation instructions for the companion tools; it identifies them and their roles, but engineers must follow each tool’s documentation. The quality gates are also metric-specific: they cover complexity, duplication, mutation resilience, and visualization rather than proving that a change is correct in every respect.