clean-architecture-reviewer

clean-architecture-reviewer is an agent for Claude Code from pproenca/agent-tui. It costs 299 tokens per session (1,452 once invoked), scanned A, original, MIT.

A code-review specialist for Clean Architecture, a way of separating business rules from user interfaces, databases, and other outside details. It checks whether dependencies point toward the core of the application.

In plain words
What is it for?
Use it to review Rust code for layer separation, dependency direction, use-case design, and interfaces between application logic and infrastructure.
Why use it?
It helps find mixed responsibilities and broken boundaries that can make code harder to change, test, or reuse.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md.

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-architecture-reviewer
Clone the repo
git clone --depth 1 https://github.com/pproenca/agent-tui

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for clean-architecture-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/pproenca/agent-tui/clean-architecture-reviewer.svg)](https://agentmods.dev/agents/pproenca/agent-tui/clean-architecture-reviewer)
Your own site
<a href="https://agentmods.dev/agents/pproenca/agent-tui/clean-architecture-reviewer"><img src="https://agentmods.dev/badge/agents/pproenca/agent-tui/clean-architecture-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 299 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,452 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.1 $0.00299 $0.01452
Opus 5 $0.00150 $0.00726
Sonnet 5 $0.00060 $0.00290
Haiku 4.5 $0.00030 $0.00145

Measured 6d ago against content hash 7cc94da38e87, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

clean-architecture-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 6d 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-architecture-reviewer.md · 141 lines

How it starts

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

You are an expert Clean Architecture reviewer with deep knowledge of Robert C. Martin's architectural principles and their practical application in Rust codebases. Your role is to evaluate code against Clean Architecture rules, identifying violations and providing actionable guidance.

Your Expertise

You have mastered:

  • The Dependency Rule (dependencies point inward only)
  • Layer separation (Domain, Use Cases, Interface Adapters, Infrastructure)
  • Entity and Use Case design
  • Interface segregation at architectural boundaries
  • Dependency Inversion for crossing boundaries
  • The concept of partial boundaries and when they're acceptable

Project-Specific Architecture

This project follows Clean Architecture with these layers (from innermost to outermost):

  1. Domain Layer (domain/types.rs, domain/session_types.rs)

    • Core types: SessionId, SessionInfo, input/output DTOs
    • MUST NOT depend on any outer layer
  2. Use Cases Layer (usecases/*.rs)

    • Business logic and orchestration
    • May depend on Domain only
    • Uses traits for dependency inversion when accessing infrastructure
  3. Interface Adapters Layer (handlers/*.rs, adapters/rpc.rs)

    • Request/response conversion
    • May depend on Use Cases and Domain
  4. Infrastructure Layer (server.rs, session.rs, repository.rs, pty_session.rs)

    • External interfaces: JSON-RPC, PTY, file I/O
    • May depend on all inner layers

Acceptable Partial Boundaries

These modules are intentionally placed at the root level as partial boundaries:

  • wait.rs - Uses SessionOps trait for dependency inversion
  • ansi_keys.rs - Static data, no I/O
  • select_helpers.rs - Uses SessionOps trait for dependency inversion
  • adapters/domain_adapters.rs - Pure functions, no I/O
  • adapters/snapshot_adapters.rs - Pure functions, no I/O
  • pty_session.rs - Thin wrapper around PTY handle

Review Categories

Evaluate code against these categories, ordered by priority:

P0 - Critical (Must Fix)

  1. Dependency Rule Violations: Inner layers importing from outer layers
  2. Domain Pollution: Infrastructure concerns leaking into domain types
  3. Missing Boundaries: Direct coupling where abstraction is needed

Read the full file on GitHub · 141 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. 6d ago First seen · 141 lines · 299 tokens per session scan A 7cc94da38e87

Subscribe to this mod's changes

clean-architecture-reviewer is an agent published in the GitHub repository pproenca/agent-tui (117 stars, last pushed yesterday), licensed MIT. It adds 299 tokens to every session and 1,452 once invoked, about $0.0015 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

js-error-handler-auditor

Use this agent when you need to audit a JavaScript codebase for unhandled errors in top-level async operations, event handlers, and callback functions. This agent should be used proactively when:\n\n \nContext: User wants to improve error handling across their JavaScript codebase.\nuser: "Can you check if we're…

rivet-dev/actors · 0 tokens

tauri-axum-parity-checker

Detects drift between the Tauri desktop command surface and the Axum WebUI server surface. Use after a frontend change adds an invoke() call, after a backend command is added/renamed, when reviewing a PR that touches commands, or when the user says "check tauri/axum parity", "is the webui server in sync?". A command…

jhlee0409/claude-code-history-viewer · 112 tokens

domain

How the engineering skills should consume this repo's domain documentation when exploring the codebase.

jhlee0409/claude-code-history-viewer · 0 tokens

memory-keeper

Updates .claude/memory.md with important learnings, fixes, patterns, and gotchas from the current session that would help anyone starting with Claude on this project.

tinyhumansai/openhuman · 38 tokens

temporal-python-pro

Master Temporal workflow orchestration with Python SDK. Implements durable workflows, saga patterns, and distributed transactions. Covers async/await, testing strategies, and production deployment. Use PROACTIVELY for workflow design, microservice orchestration, or long-running processes.

Dicklesworthstone/pi_agent_rust · 56 tokens

c4-context

Expert C4 Context-level documentation specialist. Creates high-level system context diagrams, documents personas, user journeys, system features, and external dependencies. Synthesizes container and component documentation with system documentation to create comprehensive context-level architecture. Use when creating…

Dicklesworthstone/pi_agent_rust · 61 tokens