Review green pull requests, resolve review threads with current-head evidence, merge authorized PRs, and reconcile local branches. Use when the user requests PR closeout, scoped GitHub, CodeRabbit, Codex, or CI finding repairs, or until-green monitoring.
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
Collect findings, confirm the cause, repair within each PR's scope, and verify the result. Use an evidence-backed action queue; a required external failure blocks its PR's merge while independent repairs continue.
review-fix is the default for named PR review-thread or CI repairs. Finish
authorized foreground work; report heartbeat_status: not_requested.
Monitoring, merge, and cleanup are not implied by a request to fix findings.green-closeout applies to requested foreground review, thread resolution,
merge, and local reconciliation. Carry the named operations through their
evidence gates without duplicate confirmation; report heartbeat_status: not_requested. A request to reconcile branches authorizes inspection and
safe updates, not blanket branch or worktree deletion.monitor-closeout applies when the user requests recurring continuation.
Reuse or create one heartbeat with target PRs, notification intent, and a
scope-specific stop rule. A blocked monitor blocks scheduled continuation
only; it does not block already-authorized foreground repairs.Read Review Findings for collection, confirmed issue triage, head changes, and the fix-to-resolution proof sequence. The mode rules here govern older closeout capsules and fixtures: heartbeat requirements apply to scheduled work, and cleanup requirements apply only to cleanup.
Use the current repo unless the user names a broader scope. Gather target PRs,
selected mode, required-check policy, granted operations, and GitHub/CodeRabbit/
Codex/CircleCI auth context. Gather cadence and merge strategy only for the
selected continuation or merge lane. Start with two or three focused failure
surfaces before
broadening a multi-repository sweep. Run credentialed CircleCI commands through
the host-configured auth-backed wrapper with ~/.codex/.env; discover that
wrapper from the active Codex environment rather than invoking an unqualified
run-auth-backed.sh or op directly, and never print secrets.
Report heartbeat_status first, then schema_version: 1, selected mode, the
finding and action queues, and separate proof, merge, local reconciliation,
cleanup, and blocker ledgers. Use the field definitions in
Closeout Commander, under Output Contract.
git status --short --branch, current branch,
repo URL/name, and local worktree list.mise, uv, and gh.references/review-findings.md before
grouping or patching. Build URL-first PR cards with head SHA, mergeability, required
checks, review-thread status, CI status, check-run head/event provenance, and
local branch/worktree ownership.blocked_external_ci; it blocks that PR's merge, while independent action
lanes may continue to their own next safe action.mergeStateStatus=DIRTY, conflict markers, failed mergeability checks,
or branch divergence as needs_merge_conflict_strategy. Inspect the live PR
and local branch/worktree state, then report the proposed strategy before any
merge, rebase, force push, or destructive cleanup.finding_class_id, a SHA-256
fingerprint of its normalized invariant, and exact occurrence evidence.
Validate the ledger with scripts/validate_recurring_findings.py. When a
class recurs across three independent tasks, or matches an explicitly
selected steering-uptake pattern, stop that fix lane until the closest
reusable test, validator, schema, lint rule, shared helper, or workflow
contract is added and its validation passes. A blocked guardrail records
status, owner, blocker_ref, expires_at, and next_review_at, and
remains non-merge-eligible.references/review-findings.md. A local fix is not a hosted
resolution: require the published fix, current-head proof, applicable
receipt, and resolution authority before resolving the exact thread id.
Already-fixed findings can use verified current-code evidence instead.blocked_pr_metadata, make the smallest metadata repair, and obtain
a fresh event. Otherwise classify the owner surface, patch the smallest
proven cause, and rerun or wait for affected checks.blocked_artifact_context; do not relabel it as
passing proof.codex review --uncommitted
for local edits. For committed changes, follow the mandatory
candidate-bound review
procedure: local HEAD must equal the latest hosted SHA before base review.
Require the applicable current-head receipt; empty diffs are not coverage.main, run
python3 Infrastructure/scripts/validation-and-linting/validate_pr_sweep_dirty_closeout.py --json --require-clean
from the primary checkout. Use --ledger <path> without --require-clean
only for non-destructive closeout accounting; ledger-only validation must
not authorize branch movement. If the clean check fails, block checkout-main
until the checkout is clean. Review-thread closeout does not prove
primary-worktree closeout.references/closeout-commander.md#local-branch-reconciliation:
refresh refs, preserve dirty or divergent checkouts, and verify each safe
update. Hosted merge and remote branch deletion do not prove local cleanup.Do not treat local proof, historical evidence, or another PR's result as hosted approval, merge authority, or a repaired external check.
Redact secrets and preserve unrelated changes. Establish a heartbeat only for requested monitoring, build the queue before patching, and work one PR at a time. Classify dirty paths and validation surfaces before side effects. When a class recurs across three independent tasks or meets the selected steering- uptake contract, before merge, validate its durable guardrail; never waive, route around, or relabel a required failure as green.
When the sweep cannot continue, report the smallest blocker that prevents the next safe action and keep the repair loop explicit:
The repair loop is: classify the owner, name the next safe action, apply the repository's recurrence threshold before adding a durable control, then rerun only the gate that proves that owner class.
Fail fast for the affected PR: stop its merge lane at the first failed required
gate, classify it, and continue only independent queue entries with a safe next
action. Before merge, validate
the latest immutable head, required checks, review threads, mergeability, and
every repeated-finding guardrail required by the action queue. Complete closeout
only with URL-first PR cards,
latest head SHAs, live review-thread state, required-check outcomes,
mergeability, dirty-work ownership, validation commands, cleanup proof,
external blockers, and remaining blockers. Report each command or tool outcome
as pass, fail, or blocked.
./bin/ask skills audit Skills/agent-ops/pr-green-sweep --level strict --json --robot
bash Infrastructure/scripts/run-infrastructure-python.sh ../Skills/agent-ops/pr-green-sweep/scripts/validate_recurring_findings.py --ledger <ledger.json>Run the ledger validator only when a recurring-finding ledger is required. Run the repository steering validator only when that route is selected. Treat a required non-zero exit as blocking for its affected lane. A local or historical pass does not replace live hosted evidence for the PR head being merged.
Read references/review-findings.md for foreground collection, confirmation,
repair, and hosted resolution.
Read references/closeout-commander.md for the full queue, validator,
authorization, CI, merge, and cleanup operating model.
Route capsule detail through references/knowledge-capsule.manifest.yaml:
heartbeat, live PR evidence, action queue, validation surface, authorization
boundaries, and cleanup proof.
Read references/knowledge-capsule-routing.md when selecting which PR sweep
capsule is needed for the current blocker.
Use references/eval-scenarios.json, the reviewed eval fixture files named
under references/evals.yaml, references/contract.yaml, and
references/task-profile.json for SDK evaluation and proof claims.
Use references/recurring-finding-ledger.v1.schema.json to validate the
recurring-finding ledger before treating a repeated class as merge-eligible.
jscraik/Agent-Skills
2920192
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.