component-deduper

component-deduper is an agent for Claude Code from Blazity/nextjs-migration-plugin. It costs 45 tokens per session (532 once invoked), scanned A, original, MIT.

A review agent that improves groups of similar page sections produced by an earlier clustering step. It names reusable UI parts, decides whether borderline pairs should be combined, and identifies one-off sections.

In plain words
What is it for?
Use it to refine groups such as Hero, PricingTable, or CaseStudyCard, resolve ambiguous merges, and mark isolated sections as unique.
Why use it?
Automatic similarity grouping can produce unclear names or questionable merges. This review adds judgment while using only compact cluster summaries.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the nextjs-migration-plugin plugin — 18 skills, 4 commands, 16 agents shipped together

Good fit Use it to refine groups such as Hero, PricingTable, or CaseStudyCard, resolve ambiguous merges, and mark isolated sections as unique.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/blazity/nextjs-migration-plugin/component-deduper
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/Blazity/nextjs-migration-plugin

Made for: Claude Code.

Or install nextjs-migration-plugin, the plugin that ships this one along with the rest of its 18 skills, 4 commands, 16 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 component-deduper

README.md
[![agentmods](https://agentmods.dev/badge/agents/blazity/nextjs-migration-plugin/component-deduper/github.svg)](https://agentmods.dev/agents/blazity/nextjs-migration-plugin/component-deduper)
Your own site
<a href="https://agentmods.dev/agents/blazity/nextjs-migration-plugin/component-deduper"><img src="https://agentmods.dev/badge/agents/blazity/nextjs-migration-plugin/component-deduper/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 component-deduper

Your own site · 80×15
<a href="https://agentmods.dev/agents/blazity/nextjs-migration-plugin/component-deduper"><img src="https://agentmods.dev/badge/agents/blazity/nextjs-migration-plugin/component-deduper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 532 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.00045 $0.00532
Opus 5.5 $0.00018 $0.00213
Sonnet 5.5 $0.00009 $0.00106
Haiku 4.5 $0.00005 $0.00053

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

Security

Grade A, and why

component-deduper 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/component-deduper.md · 53 lines

What it actually says

Component Deduper Agent

You take the algorithmic-first-pass output from lib/cluster.ts and refine it.

Inputs

  • clusters — { id, tagSkeleton, representative, memberIds[] }
  • ambiguousPairs — { a, b, similarity } — section-id pairs whose Jaccard similarity sits between ambiguousThreshold and autoMergeThreshold
  • unique — sections that ended up as singletons
  • pageCount — total number of crawled pages

Rules

  1. Names. Each cluster needs a meaningful component name (e.g., Hero, PricingTable, CaseStudyCard). Derive from the tagSkeleton semantic root and any heuristic content cues your prompt receives. Default to Section{N} when nothing better is inferable.
  2. Ambiguous merges. For each ambiguous pair, decide merge or keep-separate. Bias toward keep-separate — only merge when both members clearly represent the same component used with different content.
  3. Unique sections. Mark a cluster unique: true when it has exactly one member AND no ambiguous pair connects it to another cluster.
  4. Cost bound. You see at most a few KB per cluster (signature + sample text + page list). Do not ask for full DOM specs.

Output

A revised Components array matching schemas/components.ts:

[
  {
    "id": "cluster-abc123",
    "name": "Hero",
    "signature": "abc123",
    "tagSkeleton": "section>div>h1",
    "memberSections": [{ "id": "p0-s1", "url": "..." }, ...],
    "unique": false,
    "propsRef": "HeroProps"
  }
]

Plus a mergeDecisions array:

[{ "pair": ["section-a-id", "section-b-id"], "decision": "merge" | "keep-separate", "reason": "..." }]

You MUST NOT

  • Hallucinate sections that don't appear in the cluster input.
  • Propose merges that span layout shells (header / footer / nav) and content components.
  • Touch routes.json or props.json.
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 · 53 lines · 45 tokens per session scan A d8bcc83f5bf4

Subscribe to this mod's changes

component-deduper is an agent published in the GitHub repository Blazity/nextjs-migration-plugin (2 stars, last pushed 27d ago), licensed MIT. It adds 45 tokens to every session and 532 once invoked, about $0.0002 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-31.

Related

Other agents, from other repositories

confluence-searcher

Searches Confluence and related tickets for product, architecture, rollout, and test-data context. Use when implementation or verification needs internal documentation without loading raw pages into main context.

HoangNguyen0403/agent-skills-standard · 40 tokens

devops-engineer

Handles infrastructure, deployments, database and migrations, environment variables, CI/CD, secrets, and build or runtime troubleshooting. Use proactively for config changes, failed deploys, environment setup, or hardening the pipeline.

krivoox/agent-stack-template · 47 tokens

fe-git-operator

Dedicated git operations — splitting commits, safe staging that preserves the user's pre-existing index, writing Conventional Commits bodies (fix = symptom/cause/fix, feat = addition/core/impact), and pushing the branch. fe-pr-author owns PRs; this agent owns commits and the push. Destructive commands forbidden.

sh5623/fe-rail · 69 tokens

backend-engineer

Backend implementation. Use for API, authentication, DB migration work.

first-fluke/fullstack-starter · 17 tokens

codebase-analyzer

Deep code analysis agent for legacy projects. Reads an external project folder (read-only), extracts feature logic, data flows, business rules, and implicit requirements. Outputs a structured ANALYSIS.md. Invoked by reforge-orchestrator during Phase 1.

ByeongminLee/nextjs-claude-code · 56 tokens

tester

Executes tests based on TESTSTRATEGY.md and feature-level TEST.md. Runs unit/integration tests via test runner, reports results, and updates TEST.md checklists. In TDD mode, generates TEST.md skeletons during /spec. In post-dev mode, generates TEST.md and test code after /dev completion.

ByeongminLee/nextjs-claude-code · 67 tokens