Uncle Bob: Clean Code & Architecture for Openclaw

A powerful tool for applying Uncle Bob principles like clean code, SOLID design, and clean architecture to your AI-assisted development workflow.

agentsleader
v1.0.0
Mar 11, 2026
0
1.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install uncle-bob

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install uncle-bob using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Uncle Bob: Clean Code & Architecture?

This Openclaw Skills extension empowers AI agents to follow the rigorous engineering standards defined by Robert C. Martin (Uncle Bob). It focuses on creating maintainable, readable, and robust software by enforcing the Boy Scout Rule—always leaving code cleaner than it was found.

The skill provides a framework for evaluating code quality through the lens of SOLID principles and Clean Architecture. By integrating these workflows, developers can ensure that their AI-generated code avoids common pitfalls like high coupling, low cohesion, and opaque naming. It serves as an architectural compass for AI coding assistants, guiding them to prioritize long-term codebase health over quick, messy fixes.

Uncle Bob: Clean Code & Architecture Use Cases

  • Refactoring legacy code to improve readability and maintainability.
  • Designing new modules, classes, or functions using SOLID principles.
  • Identifying and fixing code smells such as long functions or high complexity.
  • Evaluating and enforcing architectural boundaries in complex systems.
  • Automating code reviews to ensure naming conventions reveal intent.

How Uncle Bob: Clean Code & Architecture Works

  1. The AI agent detects triggers such as clean code or SOLID within the user prompt.
  2. It analyzes the current codebase against Uncle Bob fundamentals, including function size and naming clarity.
  3. The skill applies the Dependency Rule, ensuring source code dependencies point inward toward higher-level policies.
  4. It refactors code using Test Driven Development (TDD) principles to ensure behavior remains consistent.
  5. The final output is verified against the Clean Architecture layers to maintain strict separation of concerns.

Uncle Bob: Clean Code & Architecture Setup

To install this skill, use the following command:

openclaw install uncle-bob

Ensure your agent configuration includes the uncle-bob skill within your workspace settings to enable automatic clean code reviews during the development lifecycle.

Uncle Bob: Clean Code & Architecture Data Schema & Taxonomy

The skill organizes its architectural evaluation and refactoring logic based on the following taxonomy:

Layer Responsibility
Entities Enterprise business rules and pure domain objects.
Use Cases Application-specific business rules that orchestrate entities.
Interface Adapters Converters between use case formats and external formats (controllers/presenters).
Frameworks & Drivers Outermost layer containing DB, UI, and external tools.
SOLID Metadata Tracking of Single Responsibility and Dependency Inversion compliance.

Uncle Bob: Clean Code & Architecture Advanced Features

  • Automated code smell detection for rigidity, fragility, and immobility.
  • Support for Command-Query Separation (CQS) enforcement in function design.
  • Intelligent extraction of sub-functions to maintain the "one thing" rule.
  • Dependency analysis to ensure compliance with the Stable Dependencies Principle.
  • TDD workflow integration following the Three Laws of TDD to ensure code reliability.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*