duplication-scanner

duplication-scanner is an agent for coding agents from Ohswedd/praxis. It costs 72 tokens per session (598 once invoked), scanned A, original, MIT.

A read-only code review agent that looks for duplicated logic, unnecessary new abstractions, and existing helpers that a change should reuse.

In plain words
What is it for?
Use it during reviews to find copy-pasted code, repeated blocks, duplicate implementations, unused additions, and missed standard-library or project utilities.
Why use it?
It helps prevent code from becoming larger or more complicated than needed. It also checks for similar code already present elsewhere in the project.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the praxis plugin — 15 skills, 8 commands, 13 agents, 5 hooks 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/ohswedd/praxis/duplication-scanner
Clone the repo
git clone --depth 1 https://github.com/Ohswedd/praxis

Or install praxis, the plugin that ships this one along with the rest of its 15 skills, 8 commands, 13 agents, 5 hooks.

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 duplication-scanner

README.md
[![agentmods](https://agentmods.dev/badge/agents/ohswedd/praxis/duplication-scanner.svg)](https://agentmods.dev/agents/ohswedd/praxis/duplication-scanner)
Your own site
<a href="https://agentmods.dev/agents/ohswedd/praxis/duplication-scanner"><img src="https://agentmods.dev/badge/agents/ohswedd/praxis/duplication-scanner.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 598 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.00072 $0.00598
Opus 5 $0.00036 $0.00299
Sonnet 5 $0.00014 $0.00120
Haiku 4.5 $0.00007 $0.00060

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

Security

Grade A, and why

duplication-scanner 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 3d 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/praxis/agents/duplication-scanner.md · 48 lines

What it actually says

Scope the change before you judge it. How to do that is defined once, in the review-scope skill, preloaded into your context at startup. If it is not there, read ${CLAUDE_PLUGIN_ROOT}/skills/review-scope/SKILL.md before you begin: an audit scoped with git diff alone reads nothing on a branch that has committed work, and reports PASS on a change it never saw.

You hunt duplication, reinvention, and over-engineering, three sides of "don't write code you don't need". Read-only.

For the scope under review (the current change set, or the files assigned to you by a repo-wide scan):

  1. Verbatim / near-duplicate logic. Search the codebase for existing code that does the same thing as the new code. Report matches with file paths and the specific overlap.
  2. Reusable primitives ignored. Identify existing functions, helpers, constants, types, or dependencies (including the language stdlib/framework) that the change should have used instead of re-implementing.
  3. Copy-paste within the change. Flag repeated blocks that should be factored into a shared function.
  4. Divergent parallel implementations. Flag cases where the change adds a second way to do something the codebase already does one way, causing future drift.
  5. Over-engineering / speculative code (YAGNI). Flag anything the change adds that no present requirement needs: unused functions, parameters, exports, or branches; abstraction layers, generics, config flags, or extension points added "for later"; and indirection or design patterns heavier than the problem warrants. Name the simpler form it should take.

For each finding, name the concrete existing thing to reuse (1–4) or the simpler form to adopt (5), and where it lives. Distinguish true problems (must fix) from acceptable, intentional repetition or a genuinely-warranted abstraction.

Return PASS, PASS WITH NOTES, or FAIL with cited, actionable findings.

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. 3d ago First seen · 48 lines · 72 tokens per session scan A 44548ee3ed78

Subscribe to this mod's changes

duplication-scanner is an agent published in the GitHub repository Ohswedd/praxis (1 stars, last pushed 1mo ago), licensed MIT. It adds 72 tokens to every session and 598 once invoked, about $0.0004 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.

Related

Other agents, from other repositories

accessibility-specialist

Accessibility expert: WCAG 2.2 audits, screen reader compat, keyboard navigation, ARIA patterns, automated a11y testing.

yonatangross/orchestkit · 33 tokens

designer

Ornamental design specialist for historical and modern style analysis, colorblind-accessible palettes, and AI-assisted image generation using Z-Image.

pjt222/agent-almanac · 29 tokens

css-expert

Expert in modern CSS including CSS Grid, Flexbox, custom properties, container queries, CSS layers, native nesting, modern color spaces, and advanced styling techniques. Specializes in responsive design, accessibility, performance optimization, and CSS architecture for scalable applications. Examples: Context: User…

andisab/swe-marketplace · 393 tokens

wp-cinematic

Cinematic scroll-driven theme specialist. Reads cinematic-scroll-kit's schemas/scene.json contract and generates the matching ACF/SCF field group, scene template parts, scroll-engine wiring, and seed scripts for the cinematic starter theme. Handles hybrid demos (cinematic reel + trailing flex sections). Owns the…

yojahny55/claude-wp-builder · 93 tokens

wp-audit-aios

All-in-One WP Security installer and configurator — installs plugin, applies security presets via WP-CLI options.

yojahny55/claude-wp-builder · 27 tokens

wp-context

Project-docs analyzer — reads a docs/ folder (scope spreadsheets, design PDFs, estimate/scope markdown) and extracts project constraints + an actionable scope manifest.

yojahny55/claude-wp-builder · 34 tokens