pr-sweep

A workflow for reviewing all open pull requests across repositories. A pull request is a proposed code change waiting to be checked and merged.

In plain words
What is it for?
Use it to find open requests, skip drafts, review unreviewed changes, merge ready work, fix quick blockers, and produce a status report.
Why use it?
It gathers each request’s tests, merge status, and review state in one pass, so you do not have to inspect repositories one by one.

Skill for Claude CodeCodex

Part of the pr-sweep plugin — 1 skill shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/harnessprotocol/harness-kit/pr-sweep
Any agent
npx skills add harnessprotocol/harness-kit --skill pr-sweep
Clone the repo
git clone --depth 1 https://github.com/harnessprotocol/harness-kit

Made for: Claude Code, Codex.

Or install pr-sweep, the plugin that ships this one along with the rest of its 1 skill.

Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,795 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00115 $0.01795
Opus 5 $0.00057 $0.00898
Sonnet 5 $0.00023 $0.00359
Haiku 4.5 $0.00012 $0.00179

Measured 3d ago against content hash a5df49b5995b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-sweep scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pr-sweep/skills/pr-sweep/SKILL.md · 215 lines

How it starts

The opening of the file, as written. The whole thing — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pull Request Sweep

A cross-repo PR sweep: discover → enrich → triage → review → act → report.

Announce at start: "I'm using the pr-sweep skill to sweep all open PRs."


Step 1: Discover All Open PRs

gh search prs \
  --author @me \
  --state open \
  --json number,title,url,isDraft,repository,headRefName,baseRefName,reviewDecision \
  --limit 100

Parse the result into a working list. Skip drafts immediately — they're not ready for action.

If you have more than 20 non-draft PRs, report the count and ask the user if they want to proceed or filter by repo.


Step 2: Enrich Each PR

For each non-draft PR, fetch CI and merge state in parallel (dispatch subagents or batch calls):

# CI status
gh pr checks <number> --repo <owner/repo> --json name,state,conclusion

# Merge state (up-to-date, behind, conflicting, etc.)
gh pr view <number> --repo <owner/repo> --json mergeStateStatus,mergeable

Build a status object per PR:

{
  repo, number, title, url,
  ciStatus: passing | failing | pending | none,
  mergeState: clean | behind | dirty | blocked,
  reviewDecision: APPROVED | CHANGES_REQUESTED | REVIEW_REQUIRED | null
}

Step 3: Triage

Classify each PR into one category (in priority order — first match wins):

Category Condition
MERGE_READY CI passing, review approved or not required, merge state clean
PENDING_CI CI still running, everything else clean
NEEDS_REVIEW No reviews yet (reviewDecision null or REVIEW_REQUIRED)
BEHIND_BASE Merge state is behind
CI_FAILING CI has failed conclusions
CHANGES_REQUESTED Reviewer has requested changes
CONFLICTING Merge state is dirty (merge conflicts)
BLOCKED Anything else preventing merge

Show the triage table to the user and wait for confirmation before taking any action:

PR Triage
─────────────────────────────────────────────────────────────
MERGE_READY    owner/repo #42  feat: add caching layer
NEEDS_REVIEW   owner/repo #38  fix: auth token refresh
BEHIND_BASE    other/repo #11  refactor: split service
CI_FAILING     other/repo #9   feat: new export format
CHANGES_REQUESTED  repo #7     fix: race condition
─────────────────────────────────────────────────────────────
Plan: merge 1, review 1, rebase 1, attempt CI fix 1, flag 1.
Proceed?

Read the full file on GitHub · 215 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 215 lines · 0 tokens per session scan A a5df49b5995b

Subscribe to this mod's changes

pr-sweep is a skill published in the GitHub repository harnessprotocol/harness-kit (10 stars, last pushed 3d ago), licensed Apache-2.0. It adds 115 tokens to every session and 1,795 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories