repo-issue-triage

Automate GitHub issue and PR triage by cross-referencing open issues against pending PRs, merged PRs, and the current main branch to produce an actionable report with close/keep recommendations. Includes PR health monitoring. USE FOR: triage issues, issue checkup, PR status, close stale issues, issue audit, what can we close, outstanding issues, issue report, cross-reference PRs and issues, repo health check, sprint planning. DO NOT USE FOR: creating issues (use GitHub directly), fixing bugs (use coding skills), or PR code review (use code-review agent).

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "repo-issue-triage" with this command: npx skills add spboyer/repo-issue-triage/spboyer-repo-issue-triage-repo-issue-triage

Repo Issue Triage

Automates the process of auditing all open GitHub issues against pending PRs, recently merged PRs, and the current main branch codebase, then produces a structured report with close/keep recommendations and actionable work items.

Quick Reference

PropertyValue
MCP Toolsgithub-mcp-server
CLI Toolsgrep, glob, git log
TrackingSession SQL database
OutputStructured markdown report
Best ForPeriodic repo hygiene, sprint planning, release prep

When to Use This Skill

  • Periodic issue hygiene (weekly/monthly triage)
  • Sprint planning — identify what's already covered by PRs
  • Pre-release audit — find issues that can be closed
  • Post-merge cleanup — close issues covered by recent merges
  • PR health monitoring — CI status, review threads, approvals

Workflow

Execute these 7 phases in order. Use parallel tool calls wherever noted.

Phase 1: PR HEALTH CHECK

Check the status of the user's open PRs first. This is always the starting point — address any failing CI or unresolved review threads before moving to issue triage.

Parallel calls:

For each PR owned by the user:
  - CI status: gh pr checks {number} → count failures/passes/running
  - Review threads: GraphQL reviewThreads → count unresolved
  - Approvals: reviews → list approved-by

Output table:

| PR | Title | CI | Approvals | Unresolved Threads | Status |

Actions if issues found:

  • CI failures → fetch job logs, identify and fix
  • Unresolved threads → read comments, address or resolve
  • No approvals → note as "awaiting review"

Phase 2: FETCH ALL DATA

Fetch all open issues, open PRs, and recently merged PRs in parallel.

Parallel calls:

gh issue list --state open --limit 500
gh pr list --state open --limit 100
gh pr list --state merged --limit 30  (recent merges)

Extract into structured format: number | title | labels | assignees

Important: Use --limit 500 for issues. Paginate if repo has more. Use CLI (gh) for bulk fetching — it's faster than individual API calls.

Phase 3: BUILD COVERAGE MAP

Build a mapping of what PRs (open and merged) cover which issues.

Method 1: Direct links

  • Scan PR titles/bodies for "Fixes #N", "Closes #N", "fix #N"
  • Check issue bodies for PR references

Method 2: Keyword matching

  • Match PR titles against issue titles using topic keywords
  • Use regex patterns for common coverage relationships

Method 3: Known mappings

  • If the user has been working in this session, use SQL tables from prior work to pre-populate known coverage

Store in SQL:

CREATE TABLE issue_triage (
  number INTEGER PRIMARY KEY,
  title TEXT,
  labels TEXT,
  assignees TEXT,
  status TEXT DEFAULT 'pending',
  covered_by TEXT,
  reason TEXT,
  tier TEXT
);

Phase 4: DEEP ANALYSIS (Parallel Batches)

For issues not clearly mapped, do deep analysis using sub-agents.

Split issues into batches of ~100-120 and send to parallel explore agents. Each agent gets:

  1. The batch of issues (number | title | labels | assignees)
  2. The list of open PRs with descriptions of what they change
  3. The list of recently merged PRs
  4. Instructions to check the codebase for implemented features

Agent prompt pattern:

Read {batch_file} containing ~{N} GitHub issues for {owner}/{repo}.

For each issue, determine if it could be CLOSED or PARTIALLY addressed
by any of these recent changes:

MERGED PRs:
- #{num}: {title} ({summary of changes})

OPEN PRs:
- #{num}: {title} ({summary of changes})

Also check the codebase in {repo_path} for any issues that might
already be implemented on main.

Output ONLY issues that are CLOSEABLE or PARTIALLY covered.
Format: #NUMBER | TITLE | STATUS (CLOSE/PARTIAL) | COVERED_BY | REASON

Key: Use explore agent type with a capable model (e.g., Codex) for accurate codebase analysis. Run 4 batches in parallel.

Phase 5: VERIFY ON MAIN

For issues flagged as potentially fixed, verify against the codebase:

# Search for the fix
grep -r "keyword" --include="*.go" cli/
glob "**/*relevant_file*"

# Check recent commits
git log --oneline --grep="issue-keyword" -20

# Verify file exists
ls path/to/expected/implementation

Critical: Don't trust keyword matches alone. Verify the actual implementation exists and addresses the issue's requirements.

Phase 6: CATEGORIZE AND TIER

Assign each issue to a category using the classification rules.

Additionally, tier actionable issues:

TierDescriptionCriteria
Close NowFully covered or already on mainVerified implementation exists
Auto-CloseLinked to open PR with "Fixes #N"Will close when PR merges
Partially CoveredPR addresses part of issueNote what's done and what remains
Quick WinSmall, well-defined, unassignedCan fix in <1 hour
Actionable BugClear scope, reproducible, unassignedCan investigate and fix
Needs DesignRequires architecture decisionsFlag for team discussion
AssignedHas owner, in progressSkip — someone is working on it
Epic/TrackingTracking issue, not directly closeableSkip

Phase 7: REPORT

Generate the final report using the report template.

Report sections:

  1. PR Health Status table
  2. Closeable issues (with reasons)
  3. Auto-close on merge issues
  4. Partially covered issues (what's done, what remains)
  5. Quick wins and actionable items
  6. Category breakdown of remaining issues
  7. Summary statistics

Output as a markdown file and open in the user's editor.

Closing Issues

When closing issues, always include a detailed comment explaining:

  1. What PR or commit covers the issue
  2. Specifically how the issue is addressed (mention code/features)
  3. Any remaining gaps (for partial closures, note what's left)

Pattern:

Addressed by PR #{num} which {specific description of what the PR does}.
{Additional detail about how this resolves the issue's requirements}.

Do NOT use generic close messages like "Fixed" or "Resolved".

Batch Processing Guidelines

To avoid flooding the GitHub API:

OperationBatch SizeDelay
Issue fetching100-500 per callNone needed
PR status checksAll in parallelNone needed
Issue closing2-3 at a time1-2 seconds between
Comment posting2-3 at a time1-2 seconds between
Sub-agent analysis4 parallel batchesWait for all to complete

MCP Tools Used

ToolMethodPurpose
github-mcp-serverlist_pull_requestsFetch all open/merged PRs
github-mcp-serverlist_issuesFetch all open issues
github-mcp-serverissue_readDeep-read individual issues
github-mcp-serverpull_request_readCheck PR details/diff/status
github-mcp-serversearch_issuesFind linked issues
github-mcp-serversearch_codeSearch codebase for implementations
grepSearch local codebase for fixes
globFind implementation files

Error Handling

ErrorResolution
Pagination needed (>500 items)Use page parameter, loop until empty
Rate limitingAdd delays between batches
Issue body too largeExtract first 500 chars for classification
Ambiguous classificationDefault to KEEP_OPEN (conservative)
Sub-agent timeoutRetry with smaller batch
GraphQL thread query failsFall back to REST API reviews endpoint

Reference Documentation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

sensei

No summary provided by upstream source.

Repository SourceNeeds Review
Security

Ring Security

Monitor and manage Ring doorbells and security cameras. Query device status, review motion events, manage modes, and export event history. Use when you need...

Registry SourceRecently Updated
Security

Retirement Planner

退休规划工具。退休金计算、投资策略、社保养老金、投资组合、提取策略、缺口分析。Retirement planner with pension calculation, investment strategy, social security, portfolio, withdrawal strategy, gap...

Registry SourceRecently Updated
Security

Node Auto Debugger

Scan Node.js/Express/Next.js projects for bugs, security issues, and anti-patterns. Use when debugging a Node.js web app, running code audits, fixing client-...

Registry SourceRecently Updated