pr-sweep

pr-sweep is a skill for Claude Code, Codex from ArcBlock/agent-skills. It costs 207 tokens per session (20,270 once invoked), scanned A, original, MIT.

A batch process that reviews every open GitHub pull request, groups duplicates or conflicts, closes redundant requests, and can merge clean ones after verification.

In plain words
What is it for?
Running scheduled or on-demand reviews across all open pull requests, checking them against live code and tests, deduplicating related work, and gated auto-merging.
Why use it?
It reduces the manual work of reviewing many proposed code changes and prevents overlapping pull requests from being handled independently.

Skill for Claude CodeCodex

Part of the agentloop plugin — 20 skills 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/arcblock/agent-skills/pr-sweep
Any agent
npx skills add ArcBlock/agent-skills --skill pr-sweep
Clone the repo
git clone --depth 1 https://github.com/ArcBlock/agent-skills

Made for: Claude Code, Codex.

Or install agentloop, the plugin that ships this one along with the rest of its 20 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-sweep

README.md
[![agentmods](https://agentmods.dev/badge/skills/arcblock/agent-skills/pr-sweep.svg)](https://agentmods.dev/skills/arcblock/agent-skills/pr-sweep)
Your own site
<a href="https://agentmods.dev/skills/arcblock/agent-skills/pr-sweep"><img src="https://agentmods.dev/badge/skills/arcblock/agent-skills/pr-sweep.svg" alt="Measured on agentmods" height="20"></a>
Per session 207 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 20,270 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.00207 $0.20270
Opus 5 $0.00103 $0.10135
Sonnet 5 $0.00041 $0.04054
Haiku 4.5 $0.00021 $0.02027

Measured 5d ago against content hash b732d39acda6, 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 5d 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/agentloop/skills/pr-sweep/SKILL.md · 618 lines

How it starts

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

PR Sweep — batch-review + dedup-close + gated auto-merge

Repo profile — read .claude/repo-profile.md first. This skill is repo-agnostic; arc is the reference implementation. Use the profile's values wherever this doc shows an arc default: repo_slug (the gh -R target), gate_mode (arc = scripts: no CI on PRs, so gh pr checks is empty and pre-merge is the only gate; ci/both repos ALSO require gh pr checks green), verification_entry / pre_merge_entry. Arc's own provenance for the lessons below is not inlined here (fuller case narratives, where they exist, are under .claude/case-law/).

A batch driver over pr-review. pr-review handles ONE PR (read → verify against code → run verification gate → detect conflicts → verdict). pr-sweep runs that engine across all open PRs, then does the two things a single-PR engine can't: resolve cross-PR duplicate/conflict clusters (keep one, comment + close the rest) and gated auto-merge the clean ones.

This is the thing a cron schedules: one run = sync + review-all + dedup-close + (optionally) merge. It is the PR-world twin of issue-sweep; together they let an independent machine keep both issues and PRs moving with no human in the loop — escalating only the genuinely human-only decisions.

输出语言按 profile comment_language 所有面向团队的产出——verdict comment、去重/关闭说明、升级给人的「需人确认块」、 本 sweep 自己开的 PR(verification-fix 等)的描述正文——按 body 语言写;代码标识符、路径、 命令、path:linegh 输出保持原样。PR 与 commit 标题comment_language 的标题语言部分, 不得混用。 不堆砌:先一句话结论,再最少但足够的证据(文档 / 代码 path:line / 真实测试输出,UI 相关 必附截图——ui-verify 的截图/录屏就是这类证据);长日志折叠进 <details>

目标(为什么存在): 让"定时机器"把 PR 从开放推进到终态——review、去重、合并—— 尽量不需要人 review。PR 上已无 CI,门控是 pre-merge verification 脚本;失败看根因,门控/脚本坏了就修脚本。人只在不可逆的高风险拍板点介入。

Usage

/agentloop:pr-sweep              # 全量 review + 评论 + 去重关闭(不自动 merge)
/agentloop:pr-sweep --merge      # 以上 + 对通过「合并闸」的低风险 PR 自动 merge
/agentloop:pr-sweep --dry-run    # 只报告 WOULD-DO,不发 comment / 不关 / 不合
/agentloop:pr-sweep <pr#…>       # 限定到指定 PR

Read the full file on GitHub · 618 lines

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. 5d ago First seen · 618 lines · 207 tokens per session scan A b732d39acda6

Subscribe to this mod's changes

pr-sweep is a skill published in the GitHub repository ArcBlock/agent-skills (5 stars, last pushed 4d ago), licensed MIT. It adds 207 tokens to every session and 20,270 once invoked, about $0.0010 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens