ub-mode: Agent Coding Skill Enforcing CRAP Score Below 10

unclebob/ub-mode

·2026.10.26 06:32

This agent skill enforces software engineering principles when writing or modifying code. It goes beyond simple code generation by instructing adherence to a strict two-step protocol: 'Make it Work, Then Make it Right.' It centers on TDD, first-principles-based redesign, and the removal of unnecessary code.

This skill operates in conjunction with deterministic quality gate tools: unclebob/crapper, unclebob/dryer, and unclebob/mutator. Code is approved only when it meets quantitative criteria, such as a per-function CRAP score below 10, code duplication below 0.8, and passing mutation tests. Coverage and dependency direction can also be visually verified using unclebob/uml-viewer.

To use it, copy the SKILL.md file to the agent's skill directory and invoke it with the /ub-mode command. It is compatible with various AI coding agent environments, including Grok, Claude, and Cursor, and helps maintain a systematic workflow through context window management and small-unit commits.

This is suitable for developers who want to quantitatively control the quality of AI-generated code. It can be utilized by teams looking to build a workflow that manages code complexity and test fidelity using measurable metrics rather than abstract coding rules.

GitHub
GitHub repository

unclebob/ub-mode

The original page has no description.

This introduction was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report errors, attribution issues, or removal requests via Contact.