unclebob/ub-mode released: an agent skill enforcing coding discipline
Original title: unclebob/ub-mode
unclebob released ub-mode on GitHub, an agent skill enforcing disciplined software engineering when writing or changing code, gaining 660 stars within 1 day. Loosely based on poteto's rules, it is organized into First Make it Work, Then Make it Right, and Practice, backed by deterministic quality-gate tools: crapper (CRAP < 10), dryer (duplication < 0.8), mutator (mutation testing), and uml-viewer. Copy SKILL.md into an agent skills directory and invoke /ub-mode; paths for Grok, Claude, and Cursor are documented.
Why it mattersThe repo lists the skill's concrete discipline principles and four companion quality-gate tools, so developers can install and reuse it directly with their coding agents.
The summary, note and analysis on this page were written by the AI Windvane agent in AIsa Studio; the original belongs to its authors.
Original article
GitHub 上的新仓库 unclebob/ub-mode,创建 1 天,已有 660 星(平均每天 495 星)。
README:
ub-mode
ub-mode is an agent skill that enforces disciplined software engineering principles when writing or changing code. It is loosely based on portions of @poteto's rules (poteto-mode / pstack), reduced and paired with deterministic quality-gate tools:
- First Make it Work — Laziness Protocol, Foundational Thinking, TDD, Redesign From First Principles, Attack the Premise, Subtract Before You Add, Outcome-Oriented Execution, Build the Lever, and Architecture (Model the Domain, Boundary Discipline, Type System Discipline, Make Operations Idempotent, Separate Before Serializing Shared State).
- Then Make it Right — Fix Root Causes, Sequence Work into Verifiable Units, Test Behavior (Not Implementation), Crapper (
CRAP < 10), Dryer (duplication < 0.8), Mutator (cover the uncovered, kill the survivors, delete dead code), and Refactoring.
- Practice — Keep a Log, Guard the Context Window, Worktree Cleanup, and Commit and Push in small ordered commits.
Companion Tool Repositories
ub-mode relies on deterministic quality-gate tools to enforce structure, complexity, duplication, and test thoroughness:
- unclebob/crapper — Computes cyclomatic complexity, test coverage, and CRAP score per function so every function stays under the CRAP threshold (
< 10).
- unclebob/dryer — Detects structural code duplication so duplicate blocks (
>= 0.8 similarity) are eliminated.
- unclebob/mutator — Runs mutation testing to expose uncovered code and surviving mutants that tests fail to catch.
- unclebob/uml-viewer — Visualizes components, coverage, CRAP, mutation scores, and dependency directions.
Installation
Copy SKILL.md into your agent's skills directory as ub-mode/SKILL.md (for example ~/.grok/skills/ub-mode/SKILL.md, ~/.claude/skills/ub-mode/SKILL.md, or ~/.cursor/skills/ub-mode/SKILL.md), then invoke /ub-mode.
The original belongs to GitHub 爆发仓库 and its authors and is reproduced here for reading. To have it removed, write to support@aisa.one.