Disclaimer:This site is not affiliated with or endorsed by Uncle Bob.
YuliusWiki
Published:•Last updated:•yulius
🌐 中文版 (Chinese)

What Is ub-mode? Uncle Bob's Single-File Skill for AI Coding Agents, 5,787 Stars in 7 Days

Quick Answer

Uncle Bob's single-file coding skill: make it work, then gate it; no license, keep push-to-main human-approved.

On October 25, 2026, Robert C. Martin (Uncle Bob) posted a GitHub repository with a one-line note: “I composed this skill and have had pretty good luck with it. My grokbots use it when writing code.” The repository, ub-mode, holds a single 4KB SKILL.md. Seven days later, measured on November 1, 2026 for this article, it had 5,787 stars — a 741-word rule file becoming the most-watched new entry in the AI coding-skill conversation. Three things to get straight first: it is not a model or a plugin, just a checklist an agent follows; whether the rules stick depends on three separately installed deterministic tools, not on the agent's good intentions; and the repo has no license, plus two rules that hand the agent authority it should not have by default.\n\nDisclaimer: this site is not affiliated with Uncle Bob. This article is product-technology reporting and analysis, not procurement, deployment, or legal advice. Star counts follow the GitHub API as measured; license and issue details follow the GitHub repository pages and may change.

1. What it is: a one-page rule set, 5,787 stars in 7 days

The whole of ub-mode is startlingly small: one SKILL.md, 152 lines, 25 sections, 61 bullets, about 741 words, in a 4KB repository. Its author wrote Clean Code; his launch note said his grok bots already write code with it. Within three days the announcement post had about 270,000 views, about 3,700 bookmarks, and about 2,350 likes, and the repository climbed to 5,787 stars by November 1, 2026 (GitHub API measurement for this article, with 317 forks).\n\nThe problem it addresses is concrete: AI coding agents are very good at sounding compliant — promising tests and simplicity while delivering code that has neither. ub-mode skips the sermon and hands the agent a string of instructions too short to fudge: reproduce the problem first, commit in small ordered steps, subtract before adding. The rules run in three phases: First Make it Work, Then Make it Right, Practice. Installation is equally short: copy SKILL.md into the agent's skills directory (for example, ~/.claude/skills/ub-mode/SKILL.md) and invoke /ub-mode; Claude Code, Cursor, and Grok can all load it.\n\nThe lineage deserves one line: the author says it is loosely based on portions of poteto's (Lauren Tan's) pstack rule set — a 149-line router pointing at 58 skills and about 69,000 words. ub-mode cuts that down to 741 words and pairs it with three measurable tools. The cut is the selling point (short enough to fit in context) and the controversy (see section 4).

2. The three phases: make it work, make it right, practice

Phase one, “make it work,” governs the order of work: a laziness protocol (think before acting), reproduce the problem before fixing it, test-driven development, redesign from first principles, attack the premise (question whether the requirement itself is right), subtract before adding, and outcome-oriented execution. Architecture discipline sits here too: model the domain, keep boundaries and the type system disciplined, prefer idempotent operations, and separate shared state before serializing it — constraints to respect before acting, not a checklist to run after the fact.\n\nPhase two, “make it right,” governs the direction of repair: fix root causes rather than symptoms, test behavior rather than implementation, and keep tests green while refactoring. The “then” matters: get it running first, then talk about clean — reversed, the agent easily falls into refactoring something that does not work yet.\n\nPhase three, “practice,” governs long-term collaboration: keep a log, guard the context window, and commit in small ordered steps. The log rule is where the pstack comparison bites: pstack says to log decision points and checkpoints, not every action, and only for long, autonomous, or multi-phase work; ub-mode says to log every action and its reason on every change. Applied literally, the log balloons and eats the context window it is meant to protect. The practical reading is pstack's narrow one: log decision points, not a transcript.

3. The three tools: turning suggestions into gates

What separates ub-mode from an ordinary prompt is that phase two is backed by three deterministic tools — the agent saying “the code is clean” does not count; the numbers the tools produce do. Crapper computes a CRAP score: CC² × (1 − coverage)³ + CC, where CC is cyclomatic complexity and coverage is test coverage; complex, untested functions score high, simple or well-tested ones score low, the gate is under 10 per function, and a threshold flag makes it exit non-zero on violation — exactly what a CI gate needs. Dryer checks the duplication rate, gated under 0.8. Mutator runs mutation testing: it flips < to <=, && to ||, true to false, and checks whether the tests notice the mutants — tests that miss them are decoration.\n\nThree deployment notes. First, the three tools are not inside the skill file; they install separately, so budget setup and CI wiring time. Second, language coverage is Go, Java, TypeScript, Rust, Python, and Clojure — projects outside that set should confirm tooling first. Third, full mutation runs are slow; day to day, use --changed to check only what the current change touched, and save full runs for pre-merge.\n\nThe design in one sentence: rules say what the agent should do, tools prove whether it did. Without the second layer, the first layer almost always slips on long tasks — which is why a 741-word file is worth more attention than the average prompt pack.

4. Two caveats: no license, and two rules that overreach

Caveat one is the license: there is none. The GitHub API's license field measured for this article is null, and multiple third-party checks agree — the repository is publicly visible, but default copyright applies, so it cannot be freely reused, rewritten, or sold without the author's permission. Personal learning and internal trials are one thing; packaging it into your product or course is another, and commercial use needs permission first. Leave this out of the evaluation sheet and legal will come looking later.\n\nCaveat two is GitHub issue #2 (user cryply, October 27, 2026), which flags two rules that hand the agent authority it should not have by default. The first: “Commit and Push: Push to the main line at the end.” — the agent pushes to main without a human reviewing the diff, while pushing to main is exactly the step most teams want to keep for themselves. The suggested fix: “Commit often. Stop before pushing; the human pushes, or push to a branch and open a PR.” The second: “Worktree Cleanup: Find what is safe to remove … then reclaim the disk.” — the agent decides for itself what is safe to delete. The suggested fix: make deletion a proposal — list what it would remove and wait for confirmation. The issue adds a smaller point: “Attack the Premise” is compressed past meaning (for example, “count which actors hold the imbalance” ships with no example), so add your own example before copying it.\n\nNeither point convicts the author; both say the default configuration is not production-ready as-is. ub-mode is a personal rule set the author wrote for his own bots, with generous autonomy defaults. For team adoption, switching push-to-main and file deletion to human confirmation costs two lines of text; leaving them risks lost code or a polluted main branch.

5. Who it fits, how to adopt it, and sources

Three tiers. Tier one, direct fits: individual developers or small teams that want a measurable rule set for Claude Code, Cursor, or similar agents — install the skill, wire the three tools, switch push-to-main and deletion to human confirmation, and go; 5,787 stars in 7 days means the same setup is being discussed widely, so problems are easy to find help for. Tier two, usable with alignment first: multi-person teams — at 741 words the rules are short, so agree up front on what happens when a gate fails (block the merge or warn only) and how detailed the log should be, or different members' agents will behave differently. Tier three, hold off: organizations needing compliance review (the license field is empty — run it past legal first), projects in languages the three tools do not cover, and teams treating a skill as “install it and code gets better automatically” — rules that are not enforced are not rules, and gates not wired into CI are not gates.\n\nSources (verified November 1, 2026):\n1) https://api.github.com/repos/unclebob/ub-mode — GitHub API measurement: 5,787 stars, 317 forks, license null, 4KB, created October 25, 2026, 8 open issues;\n2) https://github.com/unclebob/ub-mode — repository home: single SKILL.md, author's launch note, three-phase structure;\n3) https://github.com/unclebob/ub-mode/issues/2 — issue #2: the push-to-main and self-directed deletion rules with suggested fixes, plus the over-compressed “Attack the Premise”;\n4) https://www.indiekings.com/2026/10/ub-mode-uncle-bobs-skill-for.html — October 29 third-party check: 3,668 stars, 189 forks, one contributor, no license, three phases and three tools;\n5) https://medium.com/@cadienvan/uncle-bob-wrote-a-skill-and-forgot-who-reads-it-52bde6aab4e6 — 152 lines, 25 sections, 61 bullets, 741 words, pstack lineage comparison, about 270,000 post views;\n6) https://gittrend.io/repo/unclebob/ub-mode — growth milestones: past 1,000 on October 27, past 2,500 on October 28, past 5,000 on October 30;\n7) https://repoalerts.com/repo/unclebob/ub-mode — third-party count of 5,714 stars on October 31.\n\nDisclaimer: this site is not affiliated with Uncle Bob. This article is product-technology reporting and analysis, not procurement, deployment, or legal advice. Star counts follow the GitHub API as measured; license and issue details follow the GitHub repository pages and may change.

The three deterministic tools: what each measures, and the gate

ToolMeasuresGateNote
CrapperCRAP score: CC² × (1 − coverage)³ + CCUnder 10 per functionComplex, untested functions score high; works as a CI gate
DryerCode duplication rateUnder 0.8Flags duplication without judging whether it is intentional
MutatorMutation testing: flip operators and see if tests noticeNo surviving mutantsFlips <, &&, true, and more; full runs are slow, use --changed

ub-mode star growth (stars; GitHub API measurement plus third-party milestones)

Oct 27Past 1,000
Oct 28Past 2,500
Oct 30Past 5,000
★ Nov 15,787

数据来源:Sources: GitHub API measurement of 5,787 stars on November 1, 2026; milestones and the October 31 figure of 5,714 stars from third-party trackers, for trend reference only

Frequently Asked Questions

How do I install ub-mode into my coding agent?

Copy the repository's SKILL.md into the agent's skills directory — for example, ~/.claude/skills/ub-mode/SKILL.md — then invoke /ub-mode. Claude Code, Cursor, and Grok can all load it. Crapper, Dryer, and Mutator install separately; they are not inside the skill file.

With no license, can ub-mode be used commercially?

Not directly. The repository declares no license, and the GitHub API's license field is empty, so default copyright applies — publicly visible does not mean freely reusable. Personal learning and internal trials are one thing; packaging it into a product or course needs the author's permission first.

How should the two rules from issue #2 be changed in practice?

Change push-to-main to “stop before pushing; the human pushes, or push to a branch and open a PR,” and change self-directed deletion to “list what it would remove and wait for confirmation.” Two lines of edits remove the risk of lost code and polluted main branches.

Are the three tools required?

They are the core of the design: rules say what the agent should do, tools prove whether it did. Without Crapper, Dryer, and Mutator gates, the rules tend to slip on long tasks. Language coverage is Go, Java, TypeScript, Rust, Python, and Clojure; day to day, --changed limits checks to the current change.

© 2026 YuliusWiki. All rights reserved.