pr-triage

Ranks open GitHub pull requests into a merge order that minimizes total rebase and conflict work.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/PeteRichardson/skills --skill pr-triage-peterichardson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-triage
Source: https://github.com/PeteRichardson/skills/tree/main/pr-triage
Command: npx skills add https://github.com/PeteRichardson/skills --skill pr-triage-peterichardson

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a repository has several open pull requests, merging them in the wrong order causes cascading rebases and merge conflicts across the whole queue. This Skill analyzes every open PR, builds a file-overlap matrix, and recommends a merge sequence that minimizes total rework for all authors. ## Core Features & Use Cases - Blast-radius ranking: Computes how many other open PRs each PR overlaps with, so the PR that disturbs the fewest others merges first, with staleness and size as tiebreakers only. - Semantic collision detection: Reads the actual diffs of overlapping PR pairs to distinguish incidental adjacency from likely logic collisions that could merge cleanly but be wrong. - Stack and severity awareness: Honors stacked-PR chains (parent before child, with restack steps) and promotes PRs linked to critical-severity issues ahead of the queue. - Snapshot management: Writes advisory reports under .claude/tmp/pr-triage/ with subcommands to list, open, and clean past runs, plus repeat-run mode that only re-analyzes changed PRs. - Use Case: You have six open PRs, several branched from the same commit, and need to know which to merge first. Run the triage to get a ranked sequence with per-PR rationale, conflict warnings, and linked-issue context. ## Quick Start Ask the assistant to triage the open pull requests on this repository and recommend a merge order.

Frequently Asked Questions about pr-triage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide which GitHub pull request to merge first?

Run a triage that ranks open PRs by blast radius, meaning how many other open PRs share files with each one. The PR that disturbs the fewest others merges first, with staleness and diff size used only as tiebreakers.

How to order stacked pull requests for merging?

Stacked PRs are detected via a work-issue-stack marker in the PR body and treated as one chain that sorts at the parent's rank. The chain merges parent first, with a restack step between each link, and a child is marked blocked until its parent merges.

Does this tool merge or modify pull requests automatically?

No, it is strictly advisory and never merges, pushes, rebases, or force-pushes anything. It only reads data via gh pr list and gh pr diff, then writes a ranked recommendation report under .claude/tmp/pr-triage/.

Can file overlap between PRs be misleading?

Yes, two PRs can touch the same file without touching the same logic. The triage reads both diffs for every overlapping pair and classifies them as incidental adjacency or likely semantic collision, stating confidence and reasoning for each.

What happens when I re-run the triage after a merge?

Repeat-run mode reads the existing snapshot, marks resolved PRs as merged or closed, and re-ranks the remaining queue. PRs unchanged since the last run are not re-analyzed, so cost scales with genuinely new or updated PRs.