⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

ub-mode

@liujh0729-jpg⭐ 383 stars

>

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐ 383 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// 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:

  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.

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • docs/ub-mode/SKILL.md3.9 KB9ac940b23b61upstream ↗
    ---
    name: ub-mode
    description: >
      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.
    ---
    
    # ub-mode
    
    Every time you are asked to make a change follow:
    * First Make it Work.
    * Then Make it Right.
    * Follow Practice
    
    # First Make it Work
    
    ## Laziness Protocol
    
    * One decision lives in one place.
    * Ship the smallest edit that solves the problem.
    
    ## Foundational Thinking
    
    * Get the data shape right before you write the logic.
    * Do first whatever helps every later phase.
    * If a concurrent writer would matter, do not share state.
    
    ## TDD
    
    * Write the failing test before you change the code.
    * See it fail for the reason you expect.
    * Make the smallest change that makes it pass.
    * If an honest test is impractical, do not write a bad one.
    
    ## Redesign From First Principles
    
    * Do not bolt a new requirement onto the old design.
    * Ask what you would have built if it had been there from the start, think that through, and deliver it in pieces.
    
    ## Attack the Premise
    
    * When two fixes that share one premise fail the same gate, write that premise in one sentence and count which actors hold the imbalance.
    * Remove the assignment.
    * Do not start another fix until you have done that.
    
    ## Subtract Before You Add
    
    * Take complexity out before you add anything.
    
    ## Outcome-Oriented Execution
    
    * Aim at the end state you can check.
    * A break in the middle is allowed when you planned it and can undo it.
    
    ## Build the Lever
    
    * If the work is not obvious at a glance, build the tool that does it.
    * Do one unit by hand, then make the tool match that unit.
    
    ## Architecture
    
    ### Model the Domain
    
    * Put the domain in a structure that makes the illegal states impossible.
    * Maintain a glossary of domain terms.
    * If the code is already clear and local, leave it.
    
    ### Boundary Discipline
    
    * Check the data where it enters.
    * Inside, trust it.
    * Keep the business logic in a pure function.
    
    ### Type System Discipline
    
    * Make the illegal value impossible to write.
    * Parse outside data once, where it comes in.
    * Do not silence the compiler.
    
    ### Make Operations Idempotent
    
    * Running it twice, or running it after a crash halfway through, ends in the same state.
    
    ### Separate Before Serializing Shared State
    
    * If they do not need the same mutable thing, give each its own.
    * If they do, allow one writer, and enforce that in the structure.
    
    # Then Make it Right
    
    ## Fix Root Causes
    
    * Reproduce it.
    * Fix the cause.
    * A guard that only hides the crash is not a fix.
    
    ## Sequence work into verifiable units
    
    * Finish one small unit and check it.
    * Then start the next.
    
    ## Test Behavior, Not Implementation
    
    * The test calls the code the way its user does and checks the result that user would see.
    * If the test would still pass when every function returned nothing, throw it out.
    
    ## Crapper
    
    * Use the crapper tool
    * Reduce each function under  CRAP 10 by splitting it, by testing it, or both.
    * Consider whether case statements are worth reducing.
    
    ## Dryer
    
    * Use the dryer tool to eliminate duplication that rank 0.8 or above.
    
    ## Mutator
    
    * Use the mutator tool
    * Cover the uncovered.
    * Kill the survivors.
    * Delete dead code.
    
    ## Refactoring
    
    * Pin what the code does.
    * Change the structure.
    * Prove the behavior did not change.
    
    # Practice
    
    ## Keep a Log
    
    * Keep a log of every action you take and the reason you took it.
    * Report that log upon completion.
    
    ## Guard the Context Window
    
    * Keep the main thread small.
    * Send the bulk elsewhere, and keep the summary.
    
    ## Worktree Cleanup
    
    * Find what is safe to remove, confirm nothing still in use needs it, then reclaim the disk.
    * Uncommitted work waits for a decision.
    
    ## Commit and Push
    
    * Commit often, in small ordered commits.
    * Each commit says why, what changed, and how you proved it.
    * Push to the main line at the end.
    
  • docs/ub-mode/README.md2.1 KBc54164fb5a21upstream ↗
    # 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](https://github.com/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](https://github.com/unclebob/crapper) (`CRAP < 10`), [Dryer](https://github.com/unclebob/dryer) (duplication `< 0.8`), [Mutator](https://github.com/unclebob/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](https://github.com/unclebob/crapper) — Computes cyclomatic complexity, test coverage, and CRAP score per function so every function stays under the CRAP threshold (`< 10`).
    - [unclebob/dryer](https://github.com/unclebob/dryer) — Detects structural code duplication so duplicate blocks (`>= 0.8` similarity) are eliminated.
    - [unclebob/mutator](https://github.com/unclebob/mutator) — Runs mutation testing to expose uncovered code and surviving mutants that tests fail to catch.
    - [unclebob/uml-viewer](https://github.com/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`.
    

Plain-text copy, no login: /skill-bundles/liujh0729-jpg-ai-enterprise-oem-docs-ub-mode.md

// REPO STATS

383 stars