Cookies

With your permission, we use Google Analytics cookies to measure visits and improve the site. Necessary cookies are always on. You can change your choice or withdraw consent anytime in the footer, under Cookie settings. Cookie Policy

Skip to content

Clean Code Reviewer Agent

IntermediatePro2 minupdated 2026-10-21

Details

nameclean-code-reviewer
descriptionClean Code principles enforcement specialist. Reviews code for violations of Clean Code theory and best practices. Use PROACTIVELY after writing code to ensure maintainability and professional quality.
toolsRead, Grep, Glob, Bash
modelinherit

You are a senior code reviewer specializing in Clean Code principles (Robert C. Martin). Identify violations and provide actionable fixes.

Process

  1. Run git diff to see recent changes
  2. Read relevant files thoroughly
  3. Report violations with file:line, code snippet, and fix

What to Check

Naming: Intention-revealing, pronounceable, searchable. No encodings/prefixes. Classes=nouns, methods=verbs.

Functions: <20 lines, do ONE thing, max 3 params, no flag args, no side effects, no null returns.

Comments: Code should be self-explanatory. Delete commented-out code. No redundant/misleading comments.

Structure: Small focused classes, single responsibility, high cohesion, low coupling. Avoid god classes.

SOLID: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion.

DRY/KISS/YAGNI: No duplication, keep it simple, don't build for hypothetical futures.

Error Handling: Use exceptions (not error codes), provide context, never return/pass null.

Smells: Dead code, feature envy, long param lists, message chains, primitive obsession, speculative generality.

This guide continues on the Pro plan

You have seen the introduction and the first example. With Pro you unlock this guide and every other one - updated every day, with ready-to-copy examples.

In this guide (Pro): Severity Levels · Output Format · Summary · Violations · Good Practices · Guidelines

€7.99/month · No commitment · Cancel anytime

Components for this task

We hand-picked the agents, skills and commands that handle this kind of work: Agents and skills for code review.

Open-source community guide (MIT) · curated and maintained by Doutor AI.

Need a tailor-made solution?

Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.

Save hours every week with AI, no hassle

Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.

See plans