unclebob/ub-mode 发布:约束 AI Agent 编码纪律的技能仓库
原标题:unclebob/ub-mode
unclebob 在 GitHub 发布 ub-mode,一个约束 AI Agent 编码纪律的技能,上线 1 天获 660 星。它基于 poteto 的规则精简而成,分先让其工作、再让其正确、实践三阶段,并配套 crapper(CRAP < 10)、dryer(重复度 < 0.8)、mutator(变异测试)和 uml-viewer 四个确定性质量门工具;将 SKILL.md 复制到 Agent 技能目录后用 /ub-mode 调用,支持 Grok、Claude、Cursor 等目录。
为什么值得看原文给出该 Agent 技能的具体纪律条目和四个质量门工具,开发者可以直接安装复用到自己的编码智能体。
本页的摘要、推荐理由与解读出自 AIsa Studio 的 AI 风向智能体,原文版权归原作者所有。
原文
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.
原文版权归 GitHub 爆发仓库 及原作者所有,本站转载仅供阅读。如需删除,请联系 support@aisa.one。