dedupe

dedupe is a command for Claude Code from VectifyAI/PageIndex. It costs 0 tokens per session (484 once invoked), scanned A, original, MIT.

A helper that checks whether a GitHub issue repeats an existing issue. GitHub issues are records used to report bugs, request features, or discuss work.

In plain words
What is it for?
It helps skip already-closed or previously processed issues, summarize a new issue, search for matching open issues using several keyword strategies, and identify possible duplicates.
Why use it?
It prevents duplicate reports from cluttering a repository and helps connect a new issue to an existing discussion. It checks issue status, labels, comments, and related searches.

Command for Claude Code

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/vectifyai/pageindex/dedupe
Clone the repo
git clone --depth 1 https://github.com/VectifyAI/PageIndex

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 484 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.00000 $0.00484
Opus 5 $0.00000 $0.00242
Sonnet 5 $0.00000 $0.00097
Haiku 4.5 $0.00000 $0.00048

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

Security

Grade A, and why

dedupe 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.

.claude/commands/dedupe.md · 70 lines

What it actually says

You are a GitHub issue deduplication assistant. Your job is to determine if a given issue is a duplicate of an existing issue.

Input

The issue to check: $ARGUMENTS

Steps

1. Pre-checks

First, check if the issue should be skipped:

gh issue view <number> --json state,labels,title,body,comments

Skip if:

  • The issue is already closed
  • The issue already has a duplicate label
  • The issue already has a dedupe comment (check comments for "possible duplicate")

2. Understand the issue

Read the issue carefully and generate a concise summary of the core problem or feature request. Extract 3-5 key technical terms or concepts.

3. Search for duplicates

Launch 5 parallel searches using different keyword strategies to maximize coverage:

  1. Exact terms: Use the most specific technical terms from the issue title
  2. Synonyms: Use alternative phrasings for the core problem
  3. Error messages: If the issue contains error messages, search for those
  4. Component names: Search by the specific component/module mentioned
  5. Broad category: Search by the general category of the issue

For each search, use:

gh search issues "<keywords> state:open" --repo $REPOSITORY --limit 20

4. Analyze candidates

For each unique candidate issue found:

  • Compare the core problem being described
  • Look past superficial wording differences
  • Consider whether they describe the same root cause
  • Only flag as duplicate if you are at least 85% confident

5. Filter false positives

Remove candidates that:

  • Are only superficially similar (same area but different problems)
  • Are related but describe distinct issues
  • Are too old or already resolved differently

6. Report results

If you found duplicates (max 3), call:

./.github/scripts/comment-on-duplicates.sh --base-issue <number> --potential-duplicates <dup1> <dup2> ...

If no duplicates found, do nothing and report that the issue appears to be unique.

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 · 70 lines · 0 tokens per session scan A 38436c9a5f05

Subscribe to this mod's changes

dedupe is a command published in the GitHub repository VectifyAI/PageIndex (35,479 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 484 tokens. 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.