Index of every page on this site: llms.txt
All skills
Run it yourself

Follow the reduced principles when writing or changing code. Every change follows First Make it Work, then Then Make it Right, then Follow Practice. Use when the user runs /ub-mode or asks for the reduced principles.

Use this Skill: https://skilld.dev/gh/unclebob/ub-mode/ub-mode

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

README.md

≈549 tokens on demand. Your agent reads this file only when SKILL.md points to it.

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:

  1. 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).
  2. 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.
  3. 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.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alertstoday3 checks · Risk SAFE
  • Gen Agent Trust Hub1d

    The skill implements disciplined engineering principles and quality-gate tools. It presents a low-risk surface for indirect prompt injection because it processes and modifies project code without using specific delimiters or sanitization to prevent the agent from being influenced by content hidden in the code.

  • Sockettoday

    No alerts

  • Snyk1d

    Risk: LOW · No issues

Signed by skilld at 3da62bf. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated last week

README badge

README badge for unclebob/ub-mode