Skip to content

Instantly share code, notes, and snippets.

@SeverinAlexB
Created February 18, 2026 09:03
Show Gist options
  • Select an option

  • Save SeverinAlexB/494a674b057eaa723a771301dbb6b1b7 to your computer and use it in GitHub Desktop.

Select an option

Save SeverinAlexB/494a674b057eaa723a771301dbb6b1b7 to your computer and use it in GitHub Desktop.
Find related Github issues in repo - Claude Code Skill
name description
find-issue
Search for existing GitHub issues that match a user's problem description. Use when someone describes a bug, feature request, or problem and wants to know if a matching GitHub issue already exists. Triggers include: "find issue", "is there an issue for", "has this been reported", "search issues", "look for issue", "check if issue exists", "find related issues", "is this a known bug", "do we have a ticket for", or any description of a problem followed by a question about whether it's already tracked. Read-only — never create, comment on, or modify issues.

Find Issue

Search the current repository's GitHub issues to determine whether a described problem is already tracked.

Workflow

1. Extract search keywords

From the user's problem description, extract:

  • Primary keywords: Core nouns and verbs (e.g., "scroll", "feed", "crash", "login")
  • Synonyms/related terms: Alternative ways to describe the same problem (e.g., "scroll" → "jump", "bounce", "snap"; "outdated" → "stale", "old", "cache", "refresh")

2. Search with gh CLI

Run multiple searches in parallel to maximize coverage. Default to --state open unless the user specifies otherwise.

Title + body search (primary):

gh search issues "<keywords>" --repo $(gh repo view --json nameWithOwner -q .nameWithOwner) --state open --json number,title,body,labels,url,updatedAt --limit 30

Comment search (secondary, only when title+body yields few results or user's description is very specific):

gh search issues "<keywords>" --repo $(gh repo view --json nameWithOwner -q .nameWithOwner) --state open --match comments --json number,title,url --limit 15

Run searches with multiple keyword variations in parallel. Deduplicate results by issue number.

3. Fetch full details for candidates

For the top candidates, fetch full issue body if not already retrieved:

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

Read comments selectively — they add context but can also contain noise.

4. Rank and present results

For each relevant issue, present:

Field Content
Issue #number — Title (linked URL)
Labels Label list
Match Why this issue matches the user's description

Closest match analysis

For the single best match, provide a comparison:

  • What overlaps: Aspects of the user's description that are already captured in the issue
  • What's missing: Aspects the user described that the existing issue does NOT cover — suggest the user add these details as a comment
  • What's different: If the issue describes a related but distinct problem

5. Verdict

End with a clear recommendation:

  • Exact match found: "This is already tracked in #N. [summary of overlap]"
  • Partial match found: "Issue #N covers part of this. Your description also mentions [X] which isn't in that issue — consider adding a comment."
  • No match found: "No existing issue matches this description. This appears to be a new issue."

Guidelines

  • Never create, edit, or comment on issues — read-only
  • Default to open issues; search closed issues only when explicitly asked
  • When the user's description is vague, search broadly with synonyms
  • Show all relevant matches, not a fixed number — use judgment on what's truly related
  • Keep the output scannable: table format for the list, prose only for the closest-match analysis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment