bestax: Command for Claude Code

.claude/commands/triage-dedupe.md

triage-dedupe is a command for Claude Code from allxsmith/bestax. It costs 17 tokens per session (1,869 once invoked), scanned A, original, MIT.

A command that searches for issues likely to be duplicates of a specified GitHub issue. It uses five parallel search agents and returns a report for a separate workflow to publish.

In plain words
What is it for?
Use it in an issue-triage workflow with a repository, issue number, and trigger type to identify possible duplicates and produce a structured result.
Why use it?
It helps triage teams find existing reports without posting comments or closing issues by mistake. The command checks that the target issue is open and that a previous deduplication comment is not already present.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/allxsmith/bestax/triage-dedupe.svg)](https://agentmods.dev/commands/allxsmith/bestax/triage-dedupe)
Your own site
<a href="https://agentmods.dev/commands/allxsmith/bestax/triage-dedupe"><img src="https://agentmods.dev/badge/commands/allxsmith/bestax/triage-dedupe.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 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,869 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.00017 $0.01869
Opus 5 $0.00009 $0.00934
Sonnet 5 $0.00003 $0.00374
Haiku 4.5 $0.00002 $0.00187

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

Security

Grade A, and why

triage-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 7d 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-dedupe.md · 147 lines

How it starts

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

/triage-dedupe — duplicate search for an issue

Find likely duplicates of the target issue and REPORT them. Context comes from the caller (the ai-triage workflow prompt, or you when run locally — see "Running this locally" below): REPO (owner/repo), NUMBER (the target issue), and TRIGGER (opened or labeled). If NUMBER is missing, ask — never guess.

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. That script — not you — owns the marker, the Duplicate of #N line, the auto-close notice, and the decision to comment at all.

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

  1. gh issue view NUMBER --repo REPO --json state,title,body,comments — if the issue is not open, stop and report skip (not open).
  2. Marker check — does any existing comment authored by bestaxbot or a bot account END WITH <!-- ai-triage:dedupe -->? (Match the 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: it saves the search fan-out below. The publisher also refuses to overwrite an existing triage comment on an opened run, so the guarantee does not depend on you getting this right.
    • TRIGGER=labeled → continue regardless. A maintainer re-ran triage deliberately; the publisher refreshes its own marker comment in place.
  3. If the issue is too vague to search meaningfully (no error text, no component or file name, no concrete behavior), stop and report skip (too vague).

Read the full file on GitHub · 147 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. 7d ago First seen · 147 lines · 17 tokens per session scan A eb40a729acd8

Subscribe to this mod's changes

triage-dedupe is a command published in the GitHub repository allxsmith/bestax (11 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 1,869 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.