agent-tui: Agent for Claude Code

.claude/agents/clean-architecture-reviewer.md

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.

This is pproenca/agent-tui's own configuration. It tells Claude Code how to work on agent-tui itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-tui configures →

Reuse

Borrowing it

Nothing to install: this file belongs to pproenca/agent-tui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pproenca/agent-tui/master/.claude/agents/clean-architecture-reviewer.md
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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for clean-architecture-reviewer

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.5 $0.00120 $0.00581
Sonnet 5.5 $0.00060 $0.00290
Haiku 4.5 $0.00030 $0.00145

Measured 2mo ago against content hash 7cc94da38e87, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (122 stars, last pushed 8d ago), licensed MIT. It adds 299 tokens to every session and 1,452 once invoked, about $0.0012 per session on Opus 5.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

rust-critic

Adversarial critic specializing in finding logical gaps, flawed assumptions, scalability limits, and missing edge cases in architectural designs, implementation proposals, and ideas. Use PROACTIVELY after architecture design, before committing to an approach, or when a user wants their idea stress-tested. Never writes…

bug-ops/zeph · 109 tokens

rust-code-reviewer

Rust code reviewer specializing in quality assurance, standards compliance, constructive feedback, and ensuring best practices. Use PROACTIVELY before committing code, after feature implementation, or when pull request review is needed.

bug-ops/zeph · 45 tokens

lint-rule-handler

Map a natural-language wiki-health request to one or more scraps lint rules, run them, interpret each violation as a signal against the user's purpose, and either apply mechanical fixes or report findings. Use this agent for purpose-driven Scraps lint work.

boykush/scraps · 53 tokens

finding-verifier

Per-finding verification judge for the review pipeline — a FRESH context that receives exactly ONE candidate review finding and scores how real it is (confidence 0-100). Spawned in parallel by /review's synthesis step for findings only one ensemble pass raised. Utility agent (no author pair, read-only, never edits…

saeedkolivand/ai-job-hunter-app · 92 tokens

Validate

Runs build, typecheck, lint and test; reports pass or fail with failure details; never fixes.

dean0x/devflow · 23 tokens

extension-reviewer

Primary reviewer for the browser extension (apps/extension/ — MV3, Chrome + Firefox) and the desktop⇄extension bridge (native-host + loopback WebSocket pairing/token auth, origin allowlist) plus the shared extension protocol. Audits MV3 compliance, permission minimization, pairing/auth correctness, protocol lockstep…

saeedkolivand/ai-job-hunter-app · 88 tokens