This skill should be used when the user asks to "find fixed issues that are still open", "close resolved issues", "check open issues against merged PRs", "clean up stale issues", or wants to detect...
Detect open GitHub issues that have already been resolved by merged pull requests, and close them after user confirmation.
Fetch all open issues from the repository:
gh issue list --state open --limit 100 --json number,title,labels
If no open issues exist, report that and stop.
Fetch recently merged pull requests:
gh pr list --state merged --limit 100 --json number,title,body,mergedAt
Note: This fetches only the 100 most recently merged PRs. For repositories with high PR volume, older issues may require manual verification or adjusting the limit.
For each open issue, check whether a merged PR addresses it. Use two detection methods:
Scan merged PR titles and bodies for GitHub's auto-close keywords followed by an issue reference (e.g., #N or owner/repo#N). GitHub treats these keywords case-insensitively in PR titles, bodies, and commit messages:
close #N, closes #N, closed #Nfix #N, fixes #N, fixed #Nresolve #N, resolves #N, resolved #NRun the bundled script from the repository root to query GitHub GraphQL API for cross-referenced events:
bash .claude/skills/close-fixed-issue/scripts/check-issue-references.sh OWNER REPO ISSUE_NUMBER [ISSUE_NUMBER...]
Extract the repository owner and name from gh repo view --json owner,name.
This script returns, for each issue, only the merged pull requests that reference it. The output is pre-filtered to include only PRs where merged: true.
For each issue with a candidate merged PR, verify the fix exists in the codebase:
GrepFormat results as a markdown table:
| Issue | Title | Fixed By | Evidence |
|-------|-------|----------|----------|
| #N | ... | PR #M | test function / file path |
Separately list issues where evidence is ambiguous or partial.
Use AskUserQuestion to ask which issues to close. Present the confirmed-fixed issues as selectable options with multiSelect: true.
Never close issues without explicit user approval.
For each approved issue, close with a descriptive comment linking to the PR:
gh issue close <NUMBER> --comment "Resolved by PR #<PR_NUMBER> (<brief description>)"
Example:
gh issue close 123 --comment "Resolved by PR #456 (Added user authentication feature)"
Report the final list of closed issues.