find-duplicate-prs

find-duplicate-prs is a command for Claude Code from twaldin/hone. It costs 10 tokens per session (822 once invoked), scanned A, original, MIT.

A command for finding open GitHub pull requests that may substantially overlap with a given pull request. A pull request is a proposed code change that is reviewed before merging.

In plain words
What is it for?
Use it to identify duplicate pull requests and add matching results to the original pull request when appropriate.
Why use it?
It reduces duplicate work by checking the change, searching for related open proposals, and filtering likely false matches before commenting.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Good fit Use it to identify duplicate pull requests and add matching results to the original pull request when appropriate.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/twaldin/hone/find-duplicate-prs
View source ↗ twaldin/hone
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/twaldin/hone

Made for: Claude Code.

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 find-duplicate-prs

README.md
[![agentmods](https://agentmods.dev/badge/commands/twaldin/hone/find-duplicate-prs/github.svg)](https://agentmods.dev/commands/twaldin/hone/find-duplicate-prs)
Your own site
<a href="https://agentmods.dev/commands/twaldin/hone/find-duplicate-prs"><img src="https://agentmods.dev/badge/commands/twaldin/hone/find-duplicate-prs/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 find-duplicate-prs

Your own site · 80×15
<a href="https://agentmods.dev/commands/twaldin/hone/find-duplicate-prs"><img src="https://agentmods.dev/badge/commands/twaldin/hone/find-duplicate-prs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 822 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.00010 $0.00822
Opus 5 $0.00005 $0.00411
Sonnet 5 $0.00002 $0.00164
Haiku 4.5 $0.00001 $0.00082

Measured yesterday against content hash f54b0f0a6adc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

find-duplicate-prs 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 yesterday.

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.

capsules/bun-module-loader/.candidate-5187e276/.claude/commands/find-duplicate-prs.md · 48 lines

What it actually says

Find duplicate PRs command

Find other open, unmerged pull requests that may be duplicates of (or substantially overlap with) a given PR.

To do this, follow these steps precisely:

  1. Use an agent to check if the PR (a) is closed/merged, or (b) already has a duplicate-PR comment (check for the exact HTML marker <!-- find-duplicate-prs-bot:marker --> in the PR comments — ignore other bot comments). If so, do not proceed.
  2. Use an agent to view the PR title, body, and diff (gh pr view and gh pr diff), and ask the agent to return a summary of:
    • What the PR changes (files modified, functions changed, features added/fixed)
    • Key technical terms, error messages, API names, or module names involved
    • Any issue numbers referenced (e.g. "fixes #123") — two PRs that fix the same issue are likely duplicates
  3. Then, launch 3 parallel agents to search GitHub for other open, unmerged pull requests that may duplicate this one, using diverse keywords derived from the summary in Step 2. IMPORTANT: Always scope searches with repo:owner/repo is:pr is:open is:unmerged to constrain results to the current repository. Each agent should try a different search strategy:
    • Agent 1: Search using the PR title keywords and referenced issue numbers
    • Agent 2: Search using gh pr list filtered by the same files/paths touched in the diff
    • Agent 3: Search using feature/API/function names from the changed code
  4. Next, feed the results from Steps 2 and 3 into another agent, so that it can filter out false positives that are not actually duplicates. Exclude the PR itself. Only keep PRs that change the same code area for the same purpose, or fix the same referenced issue. If there are no likely duplicates remaining, do not comment at all — silently exit.
  5. Finally, if and only if at least one likely duplicate was found, comment on the PR.

Notes (be sure to tell this to your agents, too):

  • Use gh to interact with GitHub, rather than web fetch
  • You may also use read-only git commands (git diff, git log, git show, git grep, etc.) against the local checkout
  • Do not use other tools beyond gh and git (eg. don't use other MCP servers, file edit, etc.)
  • Make a todo list first
  • Always scope searches with repo:owner/repo to prevent cross-repo false positives
  • Only match against open, unmerged PRs — do not suggest closed, merged, or draft PRs
  • Never include the input PR in the results
  • Do not post a comment if zero duplicates are found
  • For your comment, follow the following format precisely (assuming for this example that you found 2 likely duplicates):

This PR may be a duplicate of:

🤖 Generated with Claude Code


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. yesterday First seen · 48 lines · 10 tokens per session scan A f54b0f0a6adc

Subscribe to this mod's changes

find-duplicate-prs is a command published in the GitHub repository twaldin/hone (47 stars, last pushed yesterday), licensed MIT. It adds 10 tokens to every session and 822 once invoked, about $0.0001 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-09-07.