Skip to content
←Back to Skills

AGENT SKILL

Development

ub-mode: A Discipline Layer for Coding Agents

unclebob/ub-mode

A behavior-only agent skill that imposes a three-phase engineering loop: make the change work, then make it right, then keep the process auditable with logs, context control, and small commits.

Editor's takeThe discipline is compact, but its quality gates depend on external tools such as Crapper, Dryer, and Mutator.
Copy SKILL.md into ~/.claude/skills/ub-mode/SKILL.md, then invoke /ub-mode
Claude CodeCursor
Agent SkillsSoftware EngineeringTDDCode Quality
unclebob/ub-mode4k219unclebob6 min read

What ub-mode actually is

ub-mode is not a framework with a runtime, and it does not take over the coding task. It is a single instruction file that constrains an agent while code is being written or changed. The rule set imposes one explicit sequence: make the change work, then make it right, and then follow a practice loop that preserves the reasoning, protects the context window, and keeps commits reviewable. The upstream file states that order as a requirement rather than a recommendation.

The important boundary is that the skill does not pretend to replace engineering judgment. It tells the agent to write a failing test first, get the shape of the data right, and reduce shared mutable state, but the deterministic checks for complexity, duplication, and mutation survival live in separate companion repositories. The most useful mental model is a loadable behavioral contract. The contract is concrete; its outcome still depends on whether the agent follows it and whether the team connects the companion tools.

First make it work

The first phase is not about speed. It is about avoiding invented work. One decision must live in one place, and the agent ships the smallest edit that actually solves the problem. The “laziness protocol” is not permission to skip understanding; it is a guard against premature abstraction and scope growth. Before the logic spreads, the agent has to establish the data shape and do whatever helps every later phase. That places modeling, boundaries, and ownership of state ahead of implementation details.

Test-driven development is stated concretely: write the failing test first, see it fail for the expected reason, and make the smallest change that makes it pass. If an honest test is impractical, the rules forbid writing a bad one to preserve the ritual. That distinction matters because the test is treated as evidence of behavior, not as a formality attached to the end of a change.

When a requirement cannot fit the existing design, the skill asks for first-principles redesign instead of bolting another condition onto the old shape. The agent asks what it would have built if the requirement had existed from the start, works that design through, and delivers it in pieces. There is also an explicit rule for failed hypotheses: when two fixes sharing one premise fail the same gate, the agent must write that premise in one sentence, count which actors hold the imbalance, remove the bad assignment, and do that before starting another fix. Before adding anything, the agent removes complexity, aims at a checkable end state, and only allows a planned intermediate break when it can be undone.

Architecture as constraints

The architecture section reads like five review questions. Model the domain so illegal states are impossible to represent and maintain a glossary of domain terms; if the existing code is already clear and local, do not rewrite it for ceremony. Check data where it enters, trust it inside the boundary, and keep business logic in pure functions.

Use the type system as a design tool so illegal values cannot be written. Parse outside data once at the entry point, and do not silence the compiler. Make operations idempotent so running twice, or retrying after a halfway crash, converges to the same state. Finally, if workers do not need the same mutable thing, give each its own state; if they truly do, allow one writer and enforce that constraint in the structure. None of this is tied to a language or framework, but the direction is consistent: make invalid programs harder to write and concurrent outcomes easier to reason about.

Then make it right

Once the change works, a rough implementation is not considered done. The agent must reproduce the problem and fix its cause; a guard that merely hides the crash is not a fix. Work is sequenced into small verifiable units: finish one, check it, then start the next. Tests must call the code the way its user does and assert the result that user would see. If a test would still pass when every function returned nothing, it is testing implementation details and should be discarded.

The quality gates give this phase its distinctive force. Crapper computes cyclomatic complexity, test coverage, and CRAP score per function, with the target below 10; splitting the function, testing it, or both can get it there. Dryer detects structural duplication and targets blocks with similarity of 0.8 or higher. Mutator runs mutation testing, covers the uncovered code, kills surviving mutants, and removes dead code. The companion uml-viewer visualizes components, coverage, CRAP, mutation scores, and dependency directions, so the quality data is not just a set of disconnected numbers.

Refactoring has a strict safety order: pin what the code does, change the structure, then prove that the behavior did not change. Together, these gates push toward small functions, tested behavior, low duplication, and structural changes that can be traced rather than merely described.

Practice makes the run auditable

The final section addresses what agent workflows most often lose. The agent keeps a log of every action and the reason for it, then reports that log on completion. The final patch therefore arrives with a traceable path instead of appearing as an unexplained result.

Context management is treated as real work: keep the main thread small, send bulk work elsewhere, and retain a summary. Worktree cleanup requires identifying what is safe to remove, confirming that nothing still in use needs it, and only then reclaiming disk; uncommitted work waits for a decision. Commits are small, ordered, and frequent. Each one explains why the change was made, what changed, and how the behavior was proven, and the work is pushed to the main line at the end.

Fit and limitations

ub-mode is most valuable in an agent workflow that already values tests and review. It gives the model a disciplined order of operations: do not immediately polish an exploratory change into a “done” state, do not let tests become mirrors of implementation details, and do not reduce quality to a subjective impression.

The limitations are equally clear. Installation copies the instruction file into the agent’s skills directory and invokes the slash command; the upstream README gives Claude and Cursor directories as examples and also mentions Grok. The skill contains no executable code, and the repository metadata does not provide license information, so no license can be assumed. Crapper, Dryer, Mutator, and uml-viewer are separate repositories that must be evaluated and installed on their own. Teams expecting one command to guarantee code quality will not get that; ub-mode is better understood as a discipline layer that works alongside external gates and human review.

Related skills

Developmentmattpocock/skillsFeatured

The 38 skills Matt Pocock uses every day for real engineering

Editor's takeSells parts, not a process: 38 SKILL.md behind a strict user/model-invoked contract, a SCOPE.md admission bar and a shared GLOSSARY.md; the spec-to-tickets-to-implement-spec pipeline is the most complete agentic engineering loop in this channel.

Daily-working set of the Total TypeScript author: 38 SKILL.md files (engineering 20, productivity 7, misc 4 frozen, in-progress 7) behind a user-invoked/model-invoked contract, a SCOPE.md admission bar and a shared GLOSSARY.md; installs as a Claude Code, Codex, Copilot or Gemini plugin, or an editable skills.sh copy.

Claude CodeCodexGemini CLI+2
claude plugin install mattpocock-skills@claude-plugins-official
Shellmattpocock289.9k
The 38 skills Matt Pocock uses every day for real engineering
Developmentobra/superpowersFeatured

Fifteen skills that give a coding agent a full development process

Editor's takeIts premise is that models lack process discipline, not coding ability. The single best idea to steal is 'Rulings, not stalls': decide by default, and stop for a human only when an action is irreversible, touches a security-sensitive surface, leaks outside the worktree, or the plan is already too broken to continue.

v6.4.1 (2026-09-18), MIT, 289k stars — the largest single skill repository of its kind. It chains brainstorming, spec writing, git-worktree isolation, planning, subagent execution, red-green TDD, two-way code review and verification-before-completion into one trunk workflow, and the README lists 16+ harnesses: Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Kimi Code, Devin CLI and more.

Claude CodeCodexCursor
/plugin install superpowers@claude-plugins-official
Shellobra289.2k
Fifteen skills that give a coding agent a full development process
Official & Collectionsanthropics/skillsFeatured

The official repo from the format's author: 19 skills plus spec and template

Editor's takeIf you want to know how a SKILL.md is actually supposed to be written, read this instead of any second-hand tutorial. Two things to know first: docx, pdf, pptx and xlsx are source-available rather than open source (the other 15 are Apache-2.0), and the repo carries its own disclaimer — these skills are demos, so test them in your environment before trusting them with anything critical.

Anthropic's own implementation, 177k stars: 19 skills under ./skills plus ./spec (the Agent Skills specification, now at agentskills.io) and ./template as a scaffold. Its definition of a skill is folders of instructions, scripts and resources loaded dynamically, and progressive disclosure comes straight from here.

Claude Code
/plugin marketplace add anthropics/skills
Pythonanthropics177.3k
The official repo from the format's author: 19 skills plus spec and template
Design & FrontendLeonxlnx/taste-skillFeatured

Taste Skill: 13 anti-slop frontend skills that turn AI tells into countable rules

Editor's takeThe lesson worth stealing is rules expressed as countable mechanical tests: eyebrow count ≤ ceil(sections/3), bento cells equal to content items, zero em-dashes on the page, palette families rotated across projects. Each one aims straight at the model repeating itself instead of stopping at an adjective. The repo is equally honest about its edges: v2 self-declares experimental and is still moving, §13 explicitly excludes dashboards, data tables, multi-step wizards, code editors and native mobile, and the only test in the repo guards the source-invocation semantics of the skill.sh shell helper rather than the design rules.

One MIT repo holding 13 skills: ten that output code and three that output reference images only, all installed into Claude Code / Codex / Cursor with a single npx skills add. The default design-taste-frontend v2 (experimental) is a 1,228-line SKILL.md: first the model must emit a one-line "design read", then it sets three dials (DESIGN_VARIANCE / MOTION_INTENSITY / VISUAL_DENSITY), then it implements against 14 chapters of hard rules - install the official package for corporate briefs, label aesthetic borrowings in comments, zero em-dashes anywhere on the page, eyebrow quota computed from section count, bento cells equal to content items, and finally a 50-plus box pre-flight check. The repo also ships research/laziness, a literature directory using controlled studies to explain why models cut output short.

Claude CodeCodexCursor
npx skills add https://github.com/Leonxlnx/taste-skill
JavaScriptLeonxlnx94.8k
Taste Skill: 13 anti-slop frontend skills that turn AI tells into countable rules

As an Amazon Associate, we earn from qualifying purchases.