clean:review

clean:review is a command for Claude Code from ruslan-korneev/claude-plugins. It costs 16 tokens per session (759 once invoked), scanned A, original, MIT.

A command that checks code for code smells—patterns that often make code harder to change—and violations of clean-code and SOLID design principles.

In plain words
What is it for?
Use it to review one or more files or a directory for structural problems, object-oriented design issues, duplication, coupling, and other listed concerns.
Why use it?
It provides a structured review for problems such as oversized methods, unused code, tangled dependencies, and classes with too many responsibilities. This can reveal maintenance risks before they become harder to fix.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the python plugin — 4 skills, 10 commands, 1 agent, 1 hook shipped together

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 commands/ruslan-korneev/claude-plugins/clean-review
Clone the repo
git clone --depth 1 https://github.com/ruslan-korneev/claude-plugins

Made for: Claude Code.

Or install python, the plugin that ships this one along with the rest of its 4 skills, 10 commands, 1 agent, 1 hook.

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:review

README.md
[![agentmods](https://agentmods.dev/badge/commands/ruslan-korneev/claude-plugins/clean-review.svg)](https://agentmods.dev/commands/ruslan-korneev/claude-plugins/clean-review)
Your own site
<a href="https://agentmods.dev/commands/ruslan-korneev/claude-plugins/clean-review"><img src="https://agentmods.dev/badge/commands/ruslan-korneev/claude-plugins/clean-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 759 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.00016 $0.00759
Opus 5 $0.00008 $0.00380
Sonnet 5 $0.00003 $0.00152
Haiku 4.5 $0.00002 $0.00076

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

Security

Grade A, and why

clean:review 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.

plugins/python/commands/clean-review.md · 108 lines

How it starts

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

Command /clean:review

Analyze code for code smells and clean code principle violations.

Instructions

Step 1: Read the code

Read the specified file or files in the directory.

Step 2: Check for code smells

Look for the following problems:

Bloaters
  • Long Method — functions > 20-30 lines
  • Long Parameter List — > 3-4 parameters
  • Large Class — classes > 200 lines with unrelated methods
  • Primitive Obsession — primitives instead of Value Objects
Object-Orientation Abusers
  • Switch Statements — long if/elif by type
  • Refused Bequest — subclass doesn't use parent's methods
Change Preventers
  • Divergent Change — class changes for different reasons
  • Shotgun Surgery — one change affects many classes
Dispensables
  • Dead Code — unused code
  • Speculative Generality — code "for the future"
  • Comments — comments instead of clear code
Couplers
  • Feature Envy — method envies another class's data
  • Inappropriate Intimacy — classes are too coupled
  • Message Chains — long call chains

Step 3: Check principles

SOLID
  • SRP — class has one reason to change?
  • OCP — extension without modification?
  • LSP — subclasses replace parents?
  • ISP — interfaces not "fat"?
  • DIP — dependency on abstractions?
Other
  • DRY — no knowledge duplication?
  • KISS — no unnecessary complexity?
  • YAGNI — no code "for the future"?

Step 4: Check naming

  • Variables — nouns, reveal meaning
  • Booleans — is_/has_/can_/should_
  • Functions — verb + noun
  • Classes — nouns, specific names
  • Constants — SCREAMING_SNAKE_CASE

Response Format

## Code Review: {{ path }}

### Summary
- **Overall assessment**: Good / Needs attention / Critical
- **Issues found**: X

### Code Smells

#### Critical
- **Long Method** (lines X-Y): `function_name` — 80 lines
  - Recommendation: Extract Method

#### Warning
- **Primitive Obsession** (line X): `email: str` instead of `Email` Value Object

### Principle Violations

#### SRP
- `UserService` — 3 reasons to change: DB work, validation, notifications

### Naming Issues

- Line X: `d = 86400` → `SECONDS_IN_DAY = 86400`
- Line Y: `def process()` → `def calculate_order_total()`

### Recommendations

1. **Priority 1**: Split `process_order()` into separate functions
2. **Priority 2**: Extract `EmailService` from `UserService`
3. **Priority 3**: Create Value Object for Email

Read the full file on GitHub · 108 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 · 108 lines · 16 tokens per session scan A 9816f6a05273

Subscribe to this mod's changes

clean:review is a command published in the GitHub repository ruslan-korneev/claude-plugins (4 stars, last pushed 6mo ago), licensed MIT. It adds 16 tokens to every session and 759 once invoked, about $0.0001 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-31.