Selects, reviews, repairs, validates, and lands batches of up to 20 low-risk OpenClaw contributor pull requests using maintainer preferences and bounded sub-agent lanes.
Ships in openclaw-pr-batch-sweep. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Drive a continuing queue of real, low-risk OpenClaw contributor bug fixes through qualification, repair, proof, and landing. Work in batches of up to 20 without padding the batch with micro-patches, speculative cleanup, or risky surfaces.
Requires ghx, gitcrawl, gwt, and the OpenClaw maintainer, testing, autoreview, Crabbox, and ClawSweeper skills.
Read references/operator-selection-policy.md before selecting candidates. Read references/worker-contract.md before spawning sub-agents. Read and update references/decision-ledger.json so fresh runs inherit prior landed, rejected, closed, and explicitly skipped PRs.
Compose the repository skills instead of duplicating them:
$openclaw-pr-maintainer for live GitHub evidence and mutations.$openclaw-repair-sweep for campaign coordination. $openclaw-pr-maintainer owns item review and landing.$gitcrawl for discovery and duplicate clusters.$openclaw-testing, $crabbox, and $autoreview for validation.$clawsweeper for readiness labels and exact-head review evidence.next 20, continue the PR sweep, or asks for another batch.Recover and continue the existing queue.
auditWatermark when present. Use openPrThrough as the default floor for newly created PR discovery instead of rehydrating an unchanged live edge.main, live PR state, repo instructions, VISION.md, disk, and worktree health.Discover broadly, then reject aggressively.
Start with gitcrawl; verify live state with ghx. If gitcrawl is stale, malformed, or unavailable, fall through immediately to live ghx.
Run discovery and hydration shell calls serially on the maintainer host. Do not fan out gitcrawl, ghx, or per-PR REST calls in parallel.
Fetch at least 100 open PRs. Widen toward 1000 when the strict filter yields fewer than 20.
Pipe discovery JSON into the ranker. It accepts a raw PR array or gitcrawl's { "threads": [...] } envelope. Keep labels_json, author_login, and is_draft for normalization.
Combine handled_refs and explicit_skips into comma-separated HANDLED_PRS. Numbers, #123, and full pull-request URLs are accepted.
Pipe the first ranking into scripts/hydrate-candidates.mjs --input -, then rank its stdout with --hydrated. Hydration remains serial and includes REST metadata, paginated file deltas, live checks, and mergeability retries.
Set SKILL_ROOT to this skill's directory. For live discovery, run this pipeline in Bash or Zsh:
set -o pipefail
ghx pr list --repo openclaw/openclaw --state open --limit 100 \
--json number,title,url,author,labels,isDraft,state |
node "$SKILL_ROOT/scripts/rank-candidates.mjs" \
--limit 40 --batch-size 20 \
--decision-ledger "$SKILL_ROOT/references/decision-ledger.json" \
--exclude "$HANDLED_PRS" |
node "$SKILL_ROOT/scripts/hydrate-candidates.mjs" --input - |
node "$SKILL_ROOT/scripts/rank-candidates.mjs" --hydrated \
--decision-ledger "$SKILL_ROOT/references/decision-ledger.json" \
--exclude "$HANDLED_PRS"
Treat any nonzero pipeline status as failure. Do not act on JSON from a failed pipeline.
Retain intermediate JSON only for a concrete debugging or recovery need. Explicit --input <file> and hydrator --output <file> remain available.
If process launch returns EMFILE, Too many open files, or another file-descriptor exhaustion error, stop spawning workers and parallel shells immediately. Let retained lanes finish, then continue from the coordinator with one shell call at a time.
When REST returns mergeable: null or an unknown merge state, retry that PR fetch up to three times with a two-second delay. If GitHub still has not resolved it, carry the PR as indeterminate instead of admitting it to the final batch.
Final ranking rejects missing author association, partial file hydration, dirty/conflicting state, failed checks, and high-risk changed paths.
Treat pending non-routine checks as not ready. Do not admit them merely because older checks passed.
Risk labels are routing signals, not proof of a risky surface. Exact security/auth and availability labels are hard exclusions. A compatibility label alone still requires qualification against the title and changed paths.
Production-size and test/docs-only gates are intentionally deferred until the hydrated pass.
Apply the full operator policy. ClawSweeper diamond/platinum labels improve rank but never override a hard exclusion.
Build a batch of up to 20 qualified PRs.
Fan out bounded read-only qualification.
AGENTS.md from trusted origin/main, then inspect live state, full changed functions/modules, callers, callees, siblings, tests, issue context, and dependency contracts.references/worker-contract.md.Promote only qualified PRs into implementation lanes.
gwt worktree per PR. Never share a worktree between agents.Prove and narrow each PR.
origin/main and search duplicate/fixed-on-main clusters.handledMerged, not a future selection precedent.Review and land serially.
$autoreview on the final head until no accepted/actionable findings remain.main checkout, never a contributor-modified copy.main, verify the touched paths do not overlap, rebase through the native wrapper, and rerun exact-head CI. Do not copy the unrelated main fix into the contributor diff.main, record it as unrelated, cancel the current-task fallback, and keep waiting for the normal path-selected exact-head CI. Do not churn the contributor patch to repair unrelated full-suite debt.createCommitOnBranch exceeds GitHub's payload limit after a rebase, retry ${OPENCLAW_ROOT}/scripts/pr prepare-sync-head <PR> with OPENCLAW_PR_PUSH_MODE=git OPENCLAW_ALLOW_UNSIGNED_GIT_PUSH=1; require maintainerCanModify=true, the wrapper's exact lease, and an already reviewed prep branch. Do not raw-push around the wrapper.main does not automatically carry a contributor PR's commit ancestry. For contributor-head gates, fetch and force-checkout pull/<PR>/head inside the box, then overlay only the reviewed maintainer repair files. Do not restore sparse omissions from current main onto a stale PR head; that can create lockfile and typecheck mismatches unrelated to the PR.$operations-worktree for terminal current-task closeout after verifying the PR outcome and finishing current-task proof and remote leases. gwt finish applies only to trees created with --finish-managed; existing and repository-native PR worktrees keep their own lifecycle.$operations-worktree and the installed native helper own completion/release semantics.
Supported manual finalized closeout uses its own native guards.
Retention alone does not keep the PR or batch active.Close the batch with a ledger.
landed, closed, rejected, blocked, or carried.references/decision-ledger.json; do not add merely sampled or still-carried PRs.auditWatermark with the highest authoritatively inspected open PR, UTC timestamp, and origin/main SHA.retained, blocked, or verified removed, with its exact path, branch/HEAD, owner, reason, and next action.next 20 after refreshing the handled set and live queue.batch_size: default 20, maximum 20.repo: default openclaw/openclaw.explicit_skips: PR numbers or URLs the operator has excluded.handled_refs: merged, closed, rejected, ignored, or already-reviewed PRs.concurrency: default 2 retained qualification workers and 1 retained implementation worker; maximum 2 implementation workers.source_mode: discovery or provided-prs; default discovery.risk_overrides: explicit operator-approved exceptions only.main status after landing work.stateDiagram-v2
[*] --> RecoverQueueAndCurrentMain
RecoverQueueAndCurrentMain --> DiscoverAndHydrateSerially
DiscoverAndHydrateSerially --> QualifyCandidates: complete eligible evidence
DiscoverAndHydrateSerially --> RecordExcludedOrIndeterminate: hard exclusion or incomplete evidence
QualifyCandidates --> RepairAndProve: owner-boundary bug qualifies
QualifyCandidates --> RecordExcludedOrIndeterminate: insufficient value or unsafe scope
RepairAndProve --> ExactHeadReview: focused proof passes
RepairAndProve --> RecordBlockedOrCarried: proof fails or scope expands
ExactHeadReview --> LandSerially: current checks and reviews pass
ExactHeadReview --> RecordBlockedOrCarried: unresolved gate
LandSerially --> VerifyOutcome
VerifyOutcome --> RecordLedgerAndCheckout
RecordExcludedOrIndeterminate --> RecordLedgerAndCheckout
RecordBlockedOrCarried --> RecordLedgerAndCheckout
RecordLedgerAndCheckout --> [*]
agents/openai.yaml (opens in a new tab)assets/icon.jpg (opens in a new tab)references/decision-ledger.json (opens in a new tab)references/operator-selection-policy.md (opens in a new tab)references/worker-contract.md (opens in a new tab)scripts/hydrate-candidates.mjs (opens in a new tab)scripts/hydrate-candidates.test.mjs (opens in a new tab)scripts/rank-candidates.mjs (opens in a new tab)scripts/rank-candidates.test.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/openclaw-pr-batch-sweep:openclaw-pr-batch-sweepfrom openclaw-pr-batch-sweep
npx claudepluginhub vincentkoc/dotskills --plugin openclaw-pr-batch-sweepOther plugins' skills for the same job