bestax: Command for Claude Code

.claude/commands/triage-find-duplicate-prs.md

triage-find-duplicate-prs is a command for Claude Code from allxsmith/bestax. It costs 19 tokens per session (1,610 once invoked), scanned A, original, MIT.

A command that searches open GitHub pull requests for work that duplicates or overlaps a target pull request. It reports findings but does not post comments.

In plain words
What is it for?
Use it to check an open pull request for other open pull requests covering the same changes.
Why use it?
It helps identify parallel or repeated work before a pull request is reviewed or merged.

Command for Claude Code

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

This is allxsmith/bestax's own configuration. It tells Claude Code how to work on bestax itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything bestax configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/render-triage-comment.mjs --mode=render \.

Reuse

Borrowing it

Nothing to install: this file belongs to allxsmith/bestax. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/allxsmith/bestax/main/.claude/commands/triage-find-duplicate-prs.md
Clone the repo
git clone --depth 1 https://github.com/allxsmith/bestax

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/allxsmith/bestax/triage-find-duplicate-prs"><img src="https://agentmods.dev/badge/commands/allxsmith/bestax/triage-find-duplicate-prs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 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,610 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.00019 $0.01610
Opus 5 $0.00010 $0.00805
Sonnet 5 $0.00004 $0.00322
Haiku 4.5 $0.00002 $0.00161

Measured 10d ago against content hash c6a8fcbdf399, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

triage-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 10d 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/triage-find-duplicate-prs.md · 137 lines

How it starts

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

/triage-find-duplicate-prs — overlapping-work check for a PR

Find OPEN, unmerged PRs that duplicate or overlap the target PR, and REPORT them. Context from the caller: REPO, NUMBER (the target PR), and TRIGGER (opened/labeled). If NUMBER is missing, ask.

You do not post anything. You have no comment tool. Your findings go out as a structured payload on this command's TRIAGE-RESULT: line, and scripts/render-triage-comment.mjs renders and publishes the comment — it owns the marker and the decision to comment at all, including this command's silent-by-default behavior.

Pre-checks (each exit is a skip, never a comment)

  1. gh pr view NUMBER --repo REPO --json state,title,body,files,comments — if the PR is not open, stop and report skip (not open).
  2. Marker check — a comment authored by bestaxbot or a bot account whose LAST non-empty line is <!-- ai-triage:find-duplicate-prs --> (match marker + that author class, never one specific login — the workflow posts as bestaxbot today; older comments are from github-actions[bot] or claude[bot]): A comment COUNTS only when the marker is its LAST non-empty line — the same predicate the publisher and the auto-close cron use. Matching it here matters: a bot reply that merely QUOTES a triage comment carries the marker verbatim, so a looser "contains" test would report already triaged and skip the search while the publisher saw no triage comment at all, leaving the item silently un-triaged.
    • TRIGGER=opened and marker present → stop, report skip (already triaged). This is a cost gate that saves the fan-out below; the publisher independently refuses to overwrite an existing triage comment on an opened run.
    • TRIGGER=labeled → continue regardless; the publisher refreshes its own marker comment in place.

Search — 3 parallel agents

Read the PR title, body, and changed file list, then fan out THREE Task agents in a single message, one strategy each.

Read the full file on GitHub · 137 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. 10d ago First seen · 137 lines · 19 tokens per session scan A c6a8fcbdf399

Subscribe to this mod's changes

triage-find-duplicate-prs is a command published in the GitHub repository allxsmith/bestax (11 stars, last pushed today), licensed MIT. It adds 19 tokens to every session and 1,610 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-08-30.