SKILL.md

skills/pr-status/SKILL.md · view on GitHub (opens in a new tab)

Triage the user’s open GitHub PRs into what needs their action, what is waiting on someone else, and what is going stale. Read-only: nothing here writes to GitHub.

scripts/pr_status.py (resolve it against this skill’s own directory) does the collection, staleness math, and formatting. Run it — do not reimplement its gh calls inline, and do not re-fetch PRs it already reported on.

1. Resolve scope first

Scope decides whether employer and personal work get mixed together, so settle it before running anything.

gh api user/orgs --jq '.[].login' lists the orgs available for scoping.

2. Run the script

python3 <skill-dir>/scripts/pr_status.py [--org NAME | --user NAME | --repo OWNER/NAME]
FlagUse when
--org NAME / --user NAME / --repo OWNER/NAMEscoping to employer / personal / one repo
--include-draftsthe user wants in-progress work in full detail
--drafts-onlyreviewing only unfinished work
--review-requestedthe user’s inbound review queue instead of their own PRs
--warn-days / --stale-days / --abandoned-daysoverride the 7 / 14 / 30-day tiers
--exclude-archiveddrop PRs in archived repos (unactionable noise)
--jsonfurther filtering or counting is needed

An unscoped run over a large account takes ~30 seconds (search pages are sequential and failing PRs get an extra lookup). That is normal — let it finish rather than retrying.

3. Report on it

Summarize; do not paste the script’s output back verbatim.

  1. Lead with what needs their action, naming the specific blocker per PR — which check failed, which reviewer is sitting on it, whether it conflicts.
  2. Then anything ready to merge, since that is the cheapest work to close out.
  3. Then PRs with no reviewer assigned — these stall silently and are the most common thing lost over PTO.
  4. Then what is waiting on others, and the stale tail, oldest first.
  5. Close with the draft count, calling out any drafts past the warn tier.

Group by repo when one repo dominates the list. Suggest a concrete next step for the top few PRs rather than restating their state. If a bucket is empty, say so in a clause and move on.

Interpreting the data

When digging into one PR

Fetch only what is missing — the script already has state, reviews, checks, and size.

Never pass comments or body to gh pr view --json: it dumps every full comment body and burns a large amount of context for almost no signal. To read discussion, select specific fields and slice, e.g. gh pr view N --repo O/R --json comments -q '.comments[-3:][].body'.

Useful follow-ups: gh pr checks N --repo O/R for full check status (it exits non-zero when checks fail — that is data, not an error), and gh pr diff N --repo O/R --name-only for scope without the patch.

Follow-ups to offer

Re-run with --include-drafts for in-progress work, --org/--user to separate employer from personal, or --review-requested for the inbound review queue.