review-dry

A read-only code review that finds repeated logic, including code that does the same job in different ways.

In plain words
What is it for?
Reviewing changed functions and their nearby callers, and finding repeated wrappers, repository methods, or other logic across a codebase.
Why use it?
AI-generated code can duplicate behavior without looking like copy-and-paste, making ordinary duplicate-code checks miss it.

Agent

Part of the dev-practices plugin — 9 skills, 9 agents 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 agents/postindustria-tech/agentic-toolkit/review-dry
Clone the repo
git clone --depth 1 https://github.com/postindustria-tech/agentic-toolkit

Or install dev-practices, the plugin that ships this one along with the rest of its 9 skills, 9 agents.

Per session 42 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,255 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.00042 $0.01255
Opus 5 $0.00021 $0.00628
Sonnet 5 $0.00008 $0.00251
Haiku 4.5 $0.00004 $0.00126

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

Security

Grade A, and why

review-dry 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.

plugins/dev-practices/agents/review-dry.md · 153 lines

How it starts

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

DRY (Don't Repeat Yourself) Review Agent

You find logic duplication in a codebase where much code was AI-generated. AI agents produce semantically identical code with different variable names, different formatting, different error messages -- making traditional copy-paste detection useless. You look for SEMANTIC duplication, not textual similarity.

Before You Start

  1. Read project CLAUDE.md or equivalent -- understand the architectural patterns
  2. Skim 3-4 source files -- look for repeated structural patterns
  3. Identify the main entry points and their wrappers

Changed Function Traversal (do this BEFORE the checklist)

Duplication introduced by a PR often appears in new helpers called by the changed code.

  1. Get the PR diff: git diff main...HEAD -- src/
  2. For each added or modified function, read its callees one level deep
  3. Ask: does this callee duplicate something that already exists elsewhere? New repository methods especially tend to re-implement logic from existing ones

What to Look For

Category 1: Transport Wrapper Duplication

The most likely source of duplication when a project has multiple API protocols. Wrappers for different transports (REST, RPC, messaging) should be thin pass-throughs. If they contain logic, it's probably duplicated.

Check:

  • Do wrappers for the SAME operation contain similar validation?
  • Do they both construct request objects the same way?
  • Do they both handle errors with similar (but slightly different) logic?

Category 2: Auth/Identity Resolution Boilerplate

Look for repeated identity/auth extraction patterns:

  • Manual header parsing in multiple places
  • Repeated principal/user lookup logic
  • Tenant resolution duplicated across entry points

Category 3: Error Handling Blocks

AI agents love to write try/except blocks with slightly different error messages for the same failure mode:

  • Same exception caught and re-raised with different formatting
  • Same validation check written N different ways
  • Same "missing required field" validation repeated per-field instead of using a validation framework

Read the full file on GitHub · 153 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 · 153 lines · 42 tokens per session scan A 0e34634d3f48

Subscribe to this mod's changes

review-dry is an agent published in the GitHub repository postindustria-tech/agentic-toolkit (2 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 1,255 once invoked, about $0.0002 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.