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.

SKILL.md

≈56 tokens for metadata: the name and description. ≈924 when used: this file. ≈549 more on demand in 1 file.

Description uses 2.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈226 characters, or 2.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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.

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