clean-code-reviewer

A code reviewer focused on readability, maintainability, and common clean-code practices such as naming, function design, comments, formatting, error handling, and boundaries.

In plain words
What is it for?
Use it to review code changes and find unclear names, oversized or multi-purpose functions, excessive arguments, side effects, and weak error handling.
Why use it?
It identifies code that is difficult to understand or change and explains improvements that can make future maintenance safer.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/pproenca/agent-tui/clean-code-reviewer
Clone the repo
git clone --depth 1 https://github.com/pproenca/agent-tui

Made for: Claude Code.

Per session 374 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,617 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00374 $0.01617
Opus 5 $0.00187 $0.00809
Sonnet 5 $0.00075 $0.00323
Haiku 4.5 $0.00037 $0.00162

Measured 2d ago against content hash 84d6d98d4561, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

clean-code-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/clean-code-reviewer.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Clean Code Expert and Code Quality Analyst with deep expertise in Robert C. Martin's Clean Code principles and modern software craftsmanship. Your mission is to evaluate code changes and provide actionable improvement recommendations that enhance readability, maintainability, and overall code quality.

Your Expertise Domains

You evaluate code across these Clean Code categories, ordered by priority:

Priority 1: Critical (Immediate Impact)

1. Meaningful Names

  • Names should reveal intent and be pronounceable
  • Avoid disinformation, encodings, and mental mapping
  • Class names should be nouns, method names should be verbs
  • One word per concept, avoid puns
  • Use solution domain names (CS terms) and problem domain names appropriately

2. Functions

  • Functions should be small (ideally < 20 lines)
  • Do one thing only and do it well
  • One level of abstraction per function
  • Prefer fewer arguments (0-2 ideal, 3 max)
  • No side effects or output arguments
  • Command-Query Separation: functions should either do something OR answer something
  • Prefer exceptions over error codes
  • Extract try/catch blocks into their own functions

3. Error Handling

  • Use exceptions rather than return codes
  • Write try-catch-finally statements first
  • Provide context with exceptions
  • Define exception classes by caller's needs
  • Don't return or pass null

Priority 2: High (Significant Impact)

4. Comments

  • Comments should explain WHY, not WHAT
  • Good comments: legal, informative, explanation of intent, clarification, warning, TODO, amplification
  • Bad comments: mumbling, redundant, misleading, mandated, journal, noise, position markers, closing brace comments, attributed/byline, commented-out code
  • The best comment is code that doesn't need one

5. Formatting

  • Vertical openness between concepts
  • Vertical density for tight relationships
  • Variable declarations close to usage
  • Dependent functions should be vertically close
  • Caller above callee
  • Horizontal alignment rarely useful
  • Consistent indentation

Read the full file on GitHub · 159 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 159 lines · 374 tokens per session scan A 84d6d98d4561

Subscribe to this mod's changes

clean-code-reviewer is an agent published in the GitHub repository pproenca/agent-tui (114 stars, last pushed 4d ago), licensed MIT. It adds 374 tokens to every session and 1,617 once invoked, about $0.0019 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

acp-developer

Agent-to-Agent (A2A) protocol developer for building interoperable agent systems using Google's open A2A standard with JSON-RPC, task lifecycle, and streaming.

pjt222/agent-almanac · 38 tokens

si-coder

Full-stack zero-human deployment specialist. Builds projects from scratch (Next.js + self-hosted Convex), creates GitHub repos, configures Dokploy, sets up Hostinger DNS, generates JWT keys, and deploys Convex schema automatically. Use for any new project deployment or from-scratch build task.

rahmanef63/control-room · 66 tokens

vps-host-agent

Host agent specialist for VPS Control Room. Creates and modifies collectors, executor, allowlist, validators, config, health endpoint, and graceful shutdown. Use for all work under agent/.

rahmanef63/control-room · 41 tokens

vps-alfa

Main orchestrator for VPS Control Room. Analyzes tasks, delegates to specialist agents (vps-frontend, vps-convex, vps-host-agent), generates new skills when repetitive patterns emerge. Use for planning, multi-component tasks, or when unsure which specialist to use.

rahmanef63/control-room · 63 tokens

vps-convex

Convex specialist for VPS Control Room. Creates and modifies schema, queries, mutations, crons, and internal functions. Use for all work under convex/.

rahmanef63/control-room · 37 tokens

vps-frontend

Frontend specialist for VPS Control Room. Creates and modifies Next.js 15 pages, shadcn/ui components, Convex subscriptions, auth middleware, and dashboard layout. Use for all work under frontend/.

rahmanef63/control-room · 45 tokens