
Pr Triage
- 623 installs
- 74.8k repo stars
- Updated August 3, 2026
- rtk-ai/rtk
pr-triage is a Claude Code slash-command skill that audits open GitHub pull requests with gh CLI, deep-reviews selected PRs for risk and test coverage, and drafts review comments requiring approval before posting.
About
pr-triage is an rtk-ai/rtk agent skill that structures GitHub pull request review into three phases: automatic audit, opt-in deep review, and validated comment posting. Phase 1 runs gh pr list --limit 50, classifies PRs XS through XL by additions, flags stale PRs with no activity over 14 days, detects file overlaps above 50%, and copies the triage table to clipboard. Phase 2 launches parallel code-reviewer subagents on selected PRs with RTK-specific checks for lazy_static regex, anyhow error handling, and token savings. Phase 3 drafts English GitHub comments from templates/review-comment.md and posts only after explicit user approval via gh pr comment. Developers invoke /pr-triage when more than five open PRs lack review or before merge sessions on high-impact repositories.
- Prioritizes PRs by risk and age
- Summarizes diff scope and intent
- Checks CI and conflict status
- Flags missing tests or large changes
- Aligns with rtk triage workflows
Pr Triage by the numbers
- 623 all-time installs (skills.sh)
- +38 installs in the week ending Jul 26, 2026 (Skillselion tracking)
- Ranked #101 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/rtk-ai/rtk --skill pr-triageAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 623 |
|---|---|
| repo stars | ★ 74.8k |
| Last updated | August 3, 2026 |
| Repository | rtk-ai/rtk ↗ |
How do you triage open GitHub pull requests efficiently?
Review open pull requests for risk, size, test coverage, and merge readiness so reviewers spend time on blocked or high-impact PRs first.
Who is it for?
Maintainers and tech leads on active GitHub repos who need structured PR audits, overlap detection, and gated review comment posting via gh CLI.
Skip if: Solo developers with no open pull requests or teams not using GitHub CLI authentication should skip pr-triage and review manually.
When should I use this skill?
User runs /pr-triage, has more than five open PRs without review, or asks to audit PR risk, size, test coverage, and merge readiness.
What you get
PR triage table, overlap and staleness flags, parallel code-review reports, and approved GitHub review comments.
- PR triage table
- deep review report
- draft GitHub review comments
By the numbers
- Three-phase workflow: audit, deep review, and approval-gated comment posting
- gh pr list fetches up to 50 open PRs per audit pass
- Flags PRs stale after 14 days with no activity; proactive trigger at >5 unreviewed PRs
Files
PR Triage
Quand utiliser
| Skill | Usage | Output |
|---|---|---|
/pr-triage | Trier, reviewer, commenter les PRs | Tableau d'action + reviews + commentaires postés |
/repo-recap | Récap général pour partager avec l'équipe | Résumé Markdown (PRs + issues + releases) |
Déclencheurs :
- Manuellement :
/pr-triageou/pr-triage allou/pr-triage 42 57 - Proactivement : quand >5 PRs ouvertes sans review, ou PR stale >14j détectée
---
Langue
- Vérifier l'argument passé au skill
- Si
enouenglish→ tableaux et résumé en anglais - Si
fr,french, ou pas d'argument → français (défaut) - Note : les commentaires GitHub (Phase 3) restent TOUJOURS en anglais (audience internationale)
---
Workflow en 3 phases : audit automatique → deep review opt-in → commentaires avec validation obligatoire.
Préconditions
git rev-parse --is-inside-work-tree
gh auth statusSi l'un échoue, stop et expliquer ce qui manque.
---
Phase 1 — Audit (toujours exécutée)
Data Gathering (commandes en parallèle)
# Identité du repo
gh repo view --json nameWithOwner -q .nameWithOwner
# PRs ouvertes avec métadonnées complètes (ajouter body pour cross-référence issues)
gh pr list --state open --limit 50 \
--json number,title,author,createdAt,updatedAt,additions,deletions,changedFiles,isDraft,mergeable,reviewDecision,statusCheckRollup,body
# Collaborateurs (pour distinguer "nos PRs" des externes)
gh api "repos/{owner}/{repo}/collaborators" --jq '.[].login'Fallback collaborateurs : si gh api .../collaborators échoue (403/404) :
# Extraire les auteurs des 10 derniers PRs mergés
gh pr list --state merged --limit 10 --json author --jq '.[].author.login' | sort -uSi toujours ambigu, demander à l'utilisateur via AskUserQuestion.
Pour chaque PR, récupérer reviews existantes ET fichiers modifiés :
gh api "repos/{owner}/{repo}/pulls/{num}/reviews" \
--jq '[.[] | .user.login + ":" + .state] | join(", ")'
# Fichiers modifiés (nécessaire pour overlap detection)
gh pr view {num} --json files --jq '[.files[].path] | join(",")'Note rate-limiting : la récupération des fichiers est N appels API (1 par PR). Pour repos avec 20+ PRs, prioriser les PRs candidates à l'overlap (même domaine fonctionnel, même auteur).
Note : author est un objet {login: "..."} — toujours extraire .author.login.
Analyse
Classification taille :
| Label | Additions |
|---|---|
| XS | < 50 |
| S | 50–200 |
| M | 200–500 |
| L | 500–1000 |
| XL | > 1000 |
Format taille : +{additions}/-{deletions}, {files} files ({label})
Détections :
- Overlaps : comparer les listes de fichiers entre PRs — si >50% de fichiers en commun → cross-reference
- Clusters : auteur avec 3+ PRs ouvertes → suggérer ordre de review (plus petite en premier)
- Staleness : aucune activité depuis >14j → flag "stale"
- CI status : via
statusCheckRollup→clean/unstable/dirty - Reviews : approved / changes_requested / aucune
Liens PR ↔ Issues :
- Scanner le
bodyde chaque PR pourfixes #N,closes #N,resolves #N(case-insensitive) - Si trouvé, afficher dans le tableau :
Fixes #42dans la colonne Action/Status
Catégorisation :
_Nos PRs_ : auteur dans la liste des collaborateurs
_Externes — Prêtes_ : additions ≤ 1000 ET files ≤ 10 ET mergeable ≠ CONFLICTING ET CI clean/unstable
_Externes — Problématiques_ : un des critères suivants :
- additions > 1000 OU files > 10
- OU
mergeable==CONFLICTING(conflit de merge) - OU CI dirty (statusCheckRollup contient des échecs)
- OU overlap avec une autre PR ouverte (>50% fichiers communs)
Output — Tableau de triage
## PRs ouvertes ({count})
### Nos PRs
| PR | Titre | Taille | CI | Status |
| -- | ----- | ------ | -- | ------ |
### Externes — Prêtes pour review
| PR | Auteur | Titre | Taille | CI | Reviews | Action |
| -- | ------ | ----- | ------ | -- | ------- | ------ |
### Externes — Problématiques
| PR | Auteur | Titre | Taille | Problème | Action recommandée |
| -- | ------ | ----- | ------ | -------- | ------------------ |
### Résumé
- Quick wins : {PRs XS/S prêtes à merger}
- Risques : {overlaps, tailles XL, CI dirty}
- Clusters : {auteurs avec 3+ PRs}
- Stale : {PRs sans activité >14j}
- Overlaps : {PRs qui touchent les mêmes fichiers}0 PRs → afficher Aucune PR ouverte. et terminer.
Copie automatique
Après affichage du tableau de triage, copier dans le presse-papier :
# Cross-platform clipboard
clip() {
if command -v pbcopy &>/dev/null; then pbcopy
elif command -v xclip &>/dev/null; then xclip -selection clipboard
elif command -v wl-copy &>/dev/null; then wl-copy
else cat
fi
}
clip <<'EOF'
{tableau de triage complet}
EOFConfirmer : Tableau copié dans le presse-papier. (FR) / Triage table copied to clipboard. (EN)
---
Phase 2 — Deep Review (opt-in)
Sélection des PRs
Si argument passé :
"all"→ toutes les PRs externes- Numéros (
"42 57") → uniquement ces PRs - Pas d'argument → proposer via
AskUserQuestion
Si pas d'argument, afficher :
question: "Quelles PRs voulez-vous reviewer en profondeur ?"
header: "Deep Review"
multiSelect: true
options:
- label: "Toutes les externes"
description: "Review {N} PRs externes avec agents code-reviewer en parallèle"
- label: "Problématiques uniquement"
description: "Focus sur les {M} PRs à risque (CI dirty, trop large, overlaps)"
- label: "Prêtes uniquement"
description: "Review {K} PRs prêtes à merger"
- label: "Passer"
description: "Terminer ici — juste l'audit"Note sur les drafts :
- Les PRs en draft sont EXCLUES des options "Toutes les externes" et "Prêtes uniquement"
- Les PRs en draft sont INCLUSES dans "Problématiques uniquement" (car elles nécessitent attention)
- Pour reviewer un draft : taper son numéro explicitement (ex:
42)
Si "Passer" → fin du workflow.
Exécution des Reviews
Pour chaque PR sélectionnée, lancer un agent code-reviewer via Task tool en parallèle :
subagent_type: code-reviewer
model: sonnet
prompt: |
Review PR #{num}: "{title}" by @{author}
**Metadata**: +{additions}/-{deletions}, {changedFiles} files ({size_label})
**CI**: {ci_status} | **Reviews**: {existing_reviews} | **Draft**: {isDraft}
**PR Body**:
{body}
**Diff**:
{gh pr diff {num} output}
Apply your security-guardian and backend-architect skills for this review.
Additionally, apply the RTK-specific checklist:
- lazy_static! regex (no inline Regex::new())
- anyhow::Result + .context() (no unwrap())
- Fallback to raw command on filter failure
- Exit code propagation
- Token savings ≥60% in tests with real fixtures
- No async/tokio dependencies
Return structured review:
### Critical Issues 🔴
### Important Issues 🟡
### Suggestions 🟢
### What's Good ✅
Be specific: quote the file:line, explain why it's an issue, suggest the fix.Récupérer le diff via :
gh pr diff {num}
gh pr view {num} --json body,title,author -q '{body: .body, title: .title, author: .author.login}'Agréger tous les rapports. Afficher un résumé après toutes les reviews.
---
Phase 3 — Commentaires (validation obligatoire)
Génération des drafts
Pour chaque PR reviewée, générer un commentaire GitHub en utilisant le template templates/review-comment.md.
Règles :
- Langue : anglais (audience internationale)
- Ton : professionnel, constructif, factuel
- Toujours inclure au moins 1 point positif
- Citer les lignes de code quand pertinent (format
file.rs:42)
Affichage et validation
Afficher TOUS les commentaires draftés au format :
---
### Draft — PR #{num}: {title}
{commentaire complet}
---Puis demander validation via AskUserQuestion :
question: "Ces commentaires sont prêts. Lesquels voulez-vous poster ?"
header: "Poster"
multiSelect: true
options:
- label: "Tous ({N} commentaires)"
description: "Poster sur toutes les PRs reviewées"
- label: "PR #{x} — {title_truncated}"
description: "Poster uniquement sur cette PR"
- label: "Aucun"
description: "Annuler — ne rien poster"(Générer une option par PR + "Tous" + "Aucun")
Posting
Pour chaque commentaire validé :
gh pr comment {num} --body-file - <<'REVIEW_EOF'
{commentaire}
REVIEW_EOFConfirmer chaque post : ✅ Commentaire posté sur PR #{num}: {title}
Si "Aucun" → Aucun commentaire posté. Workflow terminé.
---
Gestion des cas limites
| Situation | Comportement |
|---|---|
| 0 PRs ouvertes | Aucune PR ouverte. + terminer |
| PR en draft | Indiquer dans tableau, skip pour review sauf si sélectionnée explicitement |
| CI inconnu | Afficher ? dans colonne CI |
| Review agent timeout | Afficher erreur partielle, continuer avec les autres |
gh pr diff vide | Skip cette PR, notifier l'utilisateur |
| PR très large (>5000 additions) | Avertir : "Review partielle, diff tronqué" |
| Collaborateurs API 403/404 | Fallback sur auteurs des 10 derniers PRs mergés |
---
Notes
- Toujours dériver owner/repo via
gh repo view, jamais hardcoder - Utiliser
ghCLI (pascurlGitHub API) sauf pour la liste des collaborateurs statusCheckRolluppeut être null → traiter comme?mergeablepeut êtreMERGEABLE,CONFLICTING, ouUNKNOWN→ traiterUNKNOWNcomme?- Ne jamais poster sans validation explicite de l'utilisateur dans le chat
- Les commentaires draftés doivent être visibles AVANT tout
gh pr comment
Review Comment Template
Use this template to generate GitHub PR review comments. Fill in each section based on the code-reviewer agent output. Comments are posted in English (international audience).
---
Template
## Review
**Scope**: Security, code quality, performance, test coverage, architecture
### Summary
{1–2 sentences: overall assessment. Be direct — what's the main takeaway?}
### Critical Issues 🔴
{List blocking issues that must be fixed before merge. For each:}
{- `file.rs:42` — Description of the problem. Why it matters. Suggested fix.}
{If none: "None found."}
### Important Issues 🟡
{List significant issues that should be fixed. For each:}
{- `file.rs:42` — Description. Why it matters. Suggested fix.}
{If none: "None found."}
### Suggestions 🟢
{List nice-to-haves and minor improvements. For each:}
{- Description. Context. Optional fix.}
{If none: omit this section.}
### What's Good ✅
{Always include at least 1 positive point. Be specific — what works well and why.}
{- Description of what's done right.}
---
*Automated review via [rtk](https://github.com/rtk-ai/rtk) `/pr-triage`*---
Formatting Rules
Citation format : file.rs:42 or ` code snippet ` for inline references
Issue severity :
- 🔴 Critical : security vulnerability, data loss risk, broken functionality, test missing for new feature
- 🟡 Important : error handling gap, performance regression, scope creep, missing token savings assertion
- 🟢 Suggestion : naming, DRY opportunity, documentation, style
RTK-specific checks to mention if relevant :
lazy_static!for regex (not inlineRegex::new())anyhow::Result+.context("msg")(no bare?, no.unwrap())- Fallback to raw command on filter failure
- Exit code propagation (
std::process::exit(code)) - Token savings assertion ≥60% in tests
- Real fixtures (not synthetic test data)
- No async/tokio dependencies (startup time)
Tone : Professional, constructive, factual. Challenge the code, not the person. No superlatives ("great", "amazing", "perfect"). No filler ("as mentioned", "it's worth noting").
Length : Aim for 200–400 words. Long enough to be useful, short enough to be read.
Related skills
How it compares
Use pr-triage for structured multi-PR GitHub audits with posting gates; use generic code-review skills for single-file reviews without gh orchestration.
FAQ
What are the three phases of pr-triage?
pr-triage runs Phase 1 automatic audit with gh pr list and a triage table, Phase 2 opt-in deep review via parallel code-reviewer agents on selected PRs, and Phase 3 draft GitHub review comments posted only after explicit user approval with gh pr comment.
When does pr-triage trigger proactively?
pr-triage triggers proactively when more than five open PRs lack review or when a PR has been stale with no activity for over 14 days. Manual invocation uses /pr-triage, /pr-triage all, or /pr-triage 42 57 for specific pull requests.