Clean Code Author Robert Martin Publishes ub-mode Skill for AI Agents
Robert Martin, aka Uncle Bob and author of Clean Code, has posted the rules for his AI agents on GitHub. Everything is bundled into a single ub-mode skill, meaning an instruction file that the agent loads. The rules are simple: don't copy code, write tests, look for the root cause of a bug instead of a patch, and refactor regularly. The skill installs in Claude Code, Cursor, and Grok. If your agent produces duplicates and hides errors, the skill is a cheap way to check whether your code gets cleaner.
AI-processed from TG: @notboring_tech (Not Boring Tech); edited by Hamidun News
Anyone who has seriously worked with AI programming agents knows the typical picture. The code seems to work, but it contains three copies of the same function, a couple of unnecessary wrappers, and a "temporary" patch that hides the error instead of fixing it. Now this problem has an unusual attempt at a solution. Robert Martin, whom the community calls Uncle Bob and who wrote the book "Clean Code," has published a set of rules that his own agents follow. He bundled them into a single skill called ub-mode: a pre-written instruction that the agent loads and takes into account in every task.
What Robert Martin Actually Published
The skill lives in the open unclebob/ub-mode repository on GitHub. In tools like Claude Code, the skill works as a memo for the neural network. You don't need to explain to the model each time what code you want: the rules are already written down and applied automatically.
The description shows that the set includes four groups of requirements:
- write code without duplication and junk;
- run tests;
- fix the root cause of a bug rather than masking the error;
- refactor regularly, that is, tidy up code that already works.
According to the description, the skill can be installed in Claude Code, Cursor, and Grok. So it is not tied to a single vendor: the same principles can be connected to different environments where agents operate.
How This Looks in Practice
Imagine an agent is asked to fix a crashing function. Without strict rules, the model often picks the shortest path: it wraps the call in try/except, adds a condition for the specific test case, or simply adjusts the test to match the result. Formally the task is closed, but in reality the error remains and surfaces later, in production.
Rules like "look for the root cause" and "don't mask the error" target exactly this behavior. The requirement to refactor regularly resembles the habit of an experienced developer: after each working step, tidy up a little, remove duplicates, rename poor names, split overly long functions. In this scheme, tests serve as insurance: without them, refactoring becomes a lottery.
All of this is consistent with what Martin has preached for decades: small functions, clear names, no duplication, tests as the basis for confident changes. What is new here is the audience. These principles have been rewritten for an AI agent that starts from scratch each time and knows nothing about your team's culture.
What to Do With This and Where the Limits Are
For teams already working with agents, ub-mode is a low-cost experiment. You can connect the skill in one project and compare results on several typical tasks: how many duplicates appeared in the diff, how many times the agent "plugged" an error instead of fixing it, how clear the resulting tests are. Even if you disagree with some of Martin's rules, the skill remains a good template: you can open it, read it, and adjust it to your own style.
But the news has honest limitations. The original announcement contains no measurements: no benchmarks, no before-and-after comparison, no data on how much less often the agent makes mistakes. The claim that code becomes cleaner and more reliable remains the author's statement and a retelling from the channel, not a verified fact. In addition, any agent instructions compete with others: if the project already has its own rules, they may conflict with the skill. A long set of requirements also takes up space in the model's context, and the model may still ignore some of the rules.
Therefore the reasonable conclusion is this: treat ub-mode as a strong starting point, not a magic button. Test it on your own code, keep what works, and don't drop human review. An agent with good rules still needs a careful reader of the diff, even if it now has less junk to clean up.
- Nov 21, 2026FDE job postings grew 4.6x in a year: what a forward deployed engineer actually does at the client's site
- Nov 21, 2026Anthropic cuts Claude Fable 5.2 price by 20%, and on the coding test it nearly matches Opus 5.5
- Nov 21, 2026Dreamteam Raises $53M for a CRM That Fills Itself from Email and Calls
- Nov 21, 2026Claude Opus 5.5 Builds Out Dimension 9 Horror Game From the Author's 15 Rooms
Key Questions Answered
What Robert Martin Actually Published?
The skill lives in the open unclebob/ub-mode repository on GitHub. In tools like Claude Code, the skill works as a memo for the neural network. You don't need to explain to the model each time what code you want: the rules are already written down and applied automatically.
How This Looks in Practice?
Imagine an agent is asked to fix a crashing function. Without strict rules, the model often picks the shortest path: it wraps the call in try/except, adds a condition for the specific test case, or simply adjusts the test to match the result. Formally the task is closed, but in reality the error remains and surfaces later, in production. Rules like "look for the root cause" and "don't mask the error" target exactly this behavior.
What to Do With This and Where the Limits Are?
For teams already working with agents, ub-mode is a low-cost experiment. You can connect the skill in one project and compare results on several typical tasks: how many duplicates appeared in the diff, how many times the agent "plugged" an error instead of fixing it, how clear the resulting tests are. Even if you disagree with some of Martin's rules, the skill remains a good template: you can open it, read it, and adjust it to your own style. But the news has honest limitations.
Build & Ship Production AI Agents Without Boilerplate Code
Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.