duplication-detector

duplication-detector is an agent for Claude Code from andyzengmath/quantum-loop. It costs 31 tokens per session (1,517 once invoked), scanned A, original, MIT.

A checker that finds planned tasks likely to work on the same parts of a codebase. It first compares their words, then uses meaning-based checking to confirm possible overlap.

In plain words
What is it for?
Use it to compare stories, their acceptance criteria, and their file-related tasks, then report pairs that may duplicate the same implementation work.
Why use it?
Overlapping tasks can cause duplicated code or conflicting edits, especially when several agents work at once. Finding these overlaps early lets the plan be corrected before implementation.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the quantum-loop plugin — 10 skills, 9 agents shipped together

Good fit Use it to compare stories, their acceptance criteria, and their file-related tasks, then report pairs that may duplicate the same implementation work.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/andyzengmath/quantum-loop/duplication-detector
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.

Clone the repo
git clone --depth 1 https://github.com/andyzengmath/quantum-loop

Made for: Claude Code.

Or install quantum-loop, the plugin that ships this one along with the rest of its 10 skills, 9 agents.

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-detector

README.md
[![agentmods](https://agentmods.dev/badge/agents/andyzengmath/quantum-loop/duplication-detector/github.svg)](https://agentmods.dev/agents/andyzengmath/quantum-loop/duplication-detector)
Your own site
<a href="https://agentmods.dev/agents/andyzengmath/quantum-loop/duplication-detector"><img src="https://agentmods.dev/badge/agents/andyzengmath/quantum-loop/duplication-detector/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 duplication-detector

Your own site · 80×15
<a href="https://agentmods.dev/agents/andyzengmath/quantum-loop/duplication-detector"><img src="https://agentmods.dev/badge/agents/andyzengmath/quantum-loop/duplication-detector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 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,517 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.00031 $0.01517
Opus 5.5 $0.00012 $0.00607
Sonnet 5.5 $0.00006 $0.00303
Haiku 4.5 $0.00003 $0.00152

Measured 1mo ago against content hash 3eebe4ee9edf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

duplication-detector 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 1mo 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.

agents/duplication-detector.md · 138 lines

How it starts

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

Quantum-Loop: Duplication Detector Agent

You are a duplication-detector specialist. Your job is to identify stories with overlapping implementation concerns using a two-phase approach: keyword-based pre-filtering followed by LLM semantic verification. You are spawned by the dag-validator coordinator agent.

Inputs

You will receive a JSON object with the following fields:

  • stories: Array of story objects, each containing:
    • id (string): Story identifier (e.g., "US-003")
    • title (string): Story title
    • description (string): Story description
    • acceptanceCriteria (array of strings): List of acceptance criteria
    • tasks (array of objects): Each task has a description (string) field
  • stopWords: Array of strings -- the combined stop-words list (standard stop-words from references/dag-validation.md plus any project-configurable stop-words from dagValidation.stopWords in quantum.json). All entries are lowercase.
  • jaccardThreshold: Number -- the Jaccard similarity threshold for flagging pairs (default 0.3). Configurable via dagValidation.jaccardThreshold in quantum.json.

Instructions

Phase 1 -- Keyword Pre-Filter

Phase 1 is a fast, mechanical keyword overlap check. It identifies candidate story pairs that might have overlapping implementation concerns, without making any judgment calls. Only pairs that pass this filter proceed to the more expensive Phase 2 LLM check.

Step 1: Build Keyword Sets

For each story, concatenate title + description + acceptanceCriteria + task descriptions. Tokenize to lowercase words, remove stopWords, deduplicate. This is the story's keyword set.

Store the keyword set for each story, keyed by story ID.

Step 2: Compute Pairwise Jaccard Similarity

For every unique pair of stories (A, B) where A.id < B.id (lexicographic order to avoid duplicate pairs):

Compute Jaccard similarity: J(A,B) = |intersection| / |union|. If both sets empty, J = 0.

Step 3: Flag Pairs Above Threshold

Read the full file on GitHub · 138 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. 1mo ago First seen · 138 lines · 31 tokens per session scan A 3eebe4ee9edf

Subscribe to this mod's changes

duplication-detector is an agent published in the GitHub repository andyzengmath/quantum-loop (24 stars, last pushed 3mo ago), licensed MIT. It adds 31 tokens to every session and 1,517 once invoked, about $0.0001 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

conductor

Conducts workflow runs: writes a Workflow-shaped script for a phase of work, starts it with wfstart, waits with wfwait, reads the result and decides the next step. Reads the tree and uses git and gh through the shell; leaves implementation, review and research to the workers its scripts dispatch. Session profile…

developer239/michals-opencode-cookbook · 88 tokens

producer

The Producer manages all production concerns: sprint planning, milestone tracking, risk management, scope negotiation, and cross-department coordination. This is the primary coordination agent. Use this agent when work needs to be planned, tracked, prioritized, or when multiple departments need to synchronize.

IdoCohen560/claude-unity-game-studio · 56 tokens

planner

Drafts the execution Plan (plan.md) AND emits task records for a SpecManager feature, grounded in the approved Architecture and the existing codebase. Plans MUST be organised into phases with Fibonacci-scored tasks ≤3.

joanseg/specmanager · 46 tokens

plan-creation-eng-lead

Engineering and Delivery Lead for implementation planning. Produces work breakdown structures, effort estimates, dependency graphs, milestones, parallel opportunities, and risk registers. Use when you need structured delivery planning for any implementation topic.

QBall-Inc/the-bulwark · 48 tokens

evolve-dependency-map

Dependency mapping and critical path analysis agent for the Evolve Loop (Evaluate archetype). Analyzes project dependencies, identifies the critical path, and highlights blocking items.

mickeyyaya/evolve-loop · 39 tokens

self-review-applier

The writing hand of the self-review loop. Applies one round's fix directives to the working tree, in order, exactly as written, and reports applied / deviated / blocked per directive as JSON. Spawned by the self-review skill (or its orchestrator), one per round, with a directives file. Has no shell — it cannot run…

HoussemDjeghri/self-review · 86 tokens