What Is ub-mode? Uncle Bob's Single-File Skill for AI Coding Agents, 5,787 Stars in 7 Days
Uncle Bob's single-file coding skill: make it work, then gate it; no license, keep push-to-main human-approved.
1. What it is: a one-page rule set, 5,787 stars in 7 days
2. The three phases: make it work, make it right, practice
3. The three tools: turning suggestions into gates
4. Two caveats: no license, and two rules that overreach
5. Who it fits, how to adopt it, and sources
The three deterministic tools: what each measures, and the gate
| Tool | Measures | Gate | Note |
|---|---|---|---|
| Crapper | CRAP score: CC² × (1 − coverage)³ + CC | Under 10 per function | Complex, untested functions score high; works as a CI gate |
| Dryer | Code duplication rate | Under 0.8 | Flags duplication without judging whether it is intentional |
| Mutator | Mutation testing: flip operators and see if tests notice | No surviving mutants | Flips <, &&, true, and more; full runs are slow, use --changed |
ub-mode star growth (stars; GitHub API measurement plus third-party milestones)
数据来源: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.