Dedupe issue

From warpdotdev/oz-for-oss · View interactive version

Dedupe issue is an AI agent skill from the GitHub repository warpdotdev/oz-for-oss. Detect duplicate GitHub issues by comparing the incoming issue's title and description against the repository issue list. Use during triage to identify 2+ existing issues that are similar and surface them as potential duplicates.

How to use this skill

Skill file

Detect duplicate issues

Compare a newly filed GitHub issue against existing issues in the repository and identify likely duplicates by similarity of title and description.

Inputs

Expect the prompt to include:

Process

  1. Enumerate comparison candidates yourself. Fetch all open issues in the repository with pagination, excluding pull requests and the incoming issue itself. Use the GitHub API directly or gh api --paginate; do not rely on a preselected candidate list from the triage prompt and do not cap the search to the newest issues.
  2. Fetch closed issues only when they were closed within the last 7 days or when repository-specific guidance names a known canonical duplicate. Older closed issues should generally not be treated as duplicates because they may already be resolved.
  3. Normalize the incoming issue's title and description by lowercasing, stripping leading/trailing whitespace, and collapsing runs of whitespace into single spaces.
  4. For each candidate issue in the comparison set:

a. Compute title similarity: compare the incoming title to the candidate title. Consider them title-similar when they share the same core noun phrases or intent after stripping common prefixes like "bug:", "feature:", "[request]", emoji, and markdown formatting.

b. Compute description similarity: compare the key symptoms, error messages, reproduction steps, and requested behavior between the incoming and candidate descriptions. Ignore boilerplate template sections (e.g., "## Environment", "## Steps to Reproduce" headers with empty content) that do not carry diagnostic signal.

c. A candidate is a likely duplicate when both of the following hold:

  1. Rank candidates by overall similarity (title weight ≈ 40%, description weight ≈ 60%) and select the top matches.
  2. Only flag an issue as a duplicate when 2 or more existing issues are identified as likely duplicates. A single weak match is not sufficient — the evidence must be corroborated across multiple existing issues to reduce false positives.

Outputs

Return a list of duplicate candidates in the triage result's duplicate_of field. Each entry must include:

When fewer than 2 candidates meet the similarity threshold, return an empty duplicate_of list and do not flag the issue as a duplicate.

Guidelines

Repository-specific overrides

The consuming repository may ship a companion skill at .agents/skills/dedupe-issue-local/SKILL.md. When the prompt includes a fenced "Repository-specific guidance" section referencing that companion, read the referenced file and apply its guidance only to the categories listed below. Guidance in the companion may never change the duplicate-detection algorithm, the similarity thresholds, the 2-candidate minimum before flagging, or the output contract.

Overridable categories:

If a companion file is not referenced in the prompt, rely on the core contract alone.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.