Apply Robert C. Martin (Uncle Bob) criteria for code review and production: Clean Code, Clean Architecture, The Clean Coder, Clean Agile, and design-pattern discipline. This skill is complementary to the existing @clean-code skill (which focuses on the Clean Code book) and to your project's linter/formatter—it does not replace them.
This skill aggregates principles from Uncle Bob's body of work for reviewing and writing code: naming and functions (via @clean-code), architecture and boundaries (Clean Architecture), professionalism and estimation (The Clean Coder), agile values and practices (Clean Agile), and design-pattern use vs misuse. Use it to evaluate structure, dependencies, SOLID in context, code smells, and professional practices. It provides craft and design criteria only—not syntax or style enforcement, which remain the responsibility of your linter and formatter.
| Source | Focus | Where to go |
|---|---|---|
| Clean Code | Names, functions, comments, formatting, tests, classes, smells | Use @clean-code for detail; this skill references it for review/production. |
| Clean Architecture | Dependency Rule, layers, boundaries, SOLID in architecture | See reference.md and references/clean-architecture.md. |
| The Clean Coder | Professionalism, estimation, saying no, sustainable pace | See reference.md and references/clean-coder.md. |
| Clean Agile | Values, Iron Cross, TDD, refactoring, pair programming | See reference.md and references/clean-agile.md. |
| Design patterns | When to use, misuse, cargo cult | See reference.md and references/design-patterns.md. |
| Smell / Heuristic | Meaning |
|---|---|
| Rigidity | Small change forces many edits. |
| Fragility | Changes break unrelated areas. |
| Immobility | Hard to reuse in another context. |
| Viscosity | Easy to hack, hard to do the right thing. |
| Needless complexity | Speculative or unused abstraction. |
| Needless repetition | DRY violated; same idea in multiple places. |
| Opacity | Code is hard to understand. |
Full lists (including heuristics C1–T9-style) are in reference.md. Use these in review to name issues and suggest refactors (extract, move dependency, introduce boundary).
| Context | Apply |
|---|---|
| Code review | Dependency Rule and boundaries; SOLID in context; list smells; suggest one or two concrete refactors (e.g., extract function, invert dependency); check tests and professionalism (tests present, no obvious pressure hacks). |
| Writing new code | Prefer small functions and single responsibility; depend inward (Clean Architecture); write tests first when doing TDD; avoid patterns until duplication or variation justifies them. |
| Refactoring | Identify one smell at a time; refactor in small steps with tests green; improve names and structure before adding behavior. |
@clean-code for naming and structure.Use this to ask for an Uncle Bob–oriented review:
Please review this change using Uncle Bob craft criteria (@uncle-bob-craft):
1. Dependency Rule and boundaries — do dependencies point inward?
2. SOLID in context — any violations in the touched code?
3. Smells — list rigidity, fragility, immobility, viscosity, needless complexity/repetition, or opacity.
4. Suggest one or two concrete refactors (e.g., extract function, invert dependency).
Do not duplicate lint/format; focus on structure and design.
Before (opacity, does more than one thing):
def process(d):
if d.get("t") == 1:
d["x"] = d["a"] * 1.1
elif d.get("t") == 2:
d["x"] = d["a"] * 1.2
return d
After (clear intent, single level of abstraction):
def apply_discount(amount: float, discount_type: int) -> float:
if discount_type == 1:
return amount * 1.1
if discount_type == 2:
return amount * 1.2
return amount
def process(order: dict) -> dict:
order["x"] = apply_discount(order["a"], order.get("t", 0))
return order
@clean-code for naming, functions, comments, and formatting; use this skill for architecture, boundaries, SOLID, smells, and process.Problem: Treating every class as needing a Factory or Strategy.
Solution: Introduce patterns only when you have a real design need (third duplication, second axis of change).
Problem: Review only listing "violates SOLID" without saying where or how.
Solution: Point to the file/function and which principle (e.g., "SRP: this function parses and persists; split into parse and persist").
Problem: Skipping the project linter because "we applied Uncle Bob."
Solution: This skill is about craft and design; always run the project's lint and format.
@clean-code — Detailed Clean Code book material (names, functions, comments, formatting, tests, classes, smells). Use for day-to-day code quality; use uncle-bob-craft for architecture and cross-book criteria.@architecture — General architecture decisions and trade-offs. Use when choosing high-level structure; use uncle-bob-craft for Dependency Rule and boundaries.@code-review-excellence — Code review practices. Combine with uncle-bob-craft for principle-based review.@refactor-clean-code — Refactoring toward clean code. Use with uncle-bob-craft when refactoring for boundaries and SOLID.@test-driven-development — TDD workflow. Aligns with Clean Agile and Clean Coder (tests as requirement, sustainable pace).