/ccxp-skills:address-pr [PR number or URL]from ccxp-skills
Use when the user explicitly asks to address, verify, or merge a specific open PR (CI, Claude Code review, test plan, tiered merge)
Ships in ccxp-skills. 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.
Address a PR's review comments, verify CI and affected pipelines, then merge or notify.
<skills-root>= this skill's "Base directory" minus its last component; substitute the literal path (skill-conventions§9).
<arg> is optional:
/address-pr 188 — address a specific PR/address-pr https://github.com/<owner>/<repo>/pull/188 — by URL/address-pr — auto-pick the next open PR (oldest first, authored by us)One read-only script decides all three; it writes nothing:
GATE=$(bash <skills-root>/address-pr/scripts/entry-gate.sh <number|url|->); RC=$?
<number|url|->: a PR number, a …/pull/<n> URL, or - to auto-pick (our own open PRs only; oldest-first, skipping owned:<other>/unknown, so one permanently-owned PR cannot block the rest). $GATE is one JSON line {number, task_id, author, verdict, head_ref}. $RC is the gate; anything not in this table, or an empty $GATE, is a stop (fail closed):
0 (mine, untracked): proceed to §1.510 (free): claim the task first (§1.6 free), then proceed11 (new): claim on the PR's own branch (§1.6 new), then proceed20 (foreign): hard stop, no write action of any kind (below)21 (owned:<agent>): defer: another session owns the task; do not run the loop or merge22 (unknown): defer: ownership unresolvable (fail-safe, never a silent merge)1: - found no pickable PR: report "No open PRs to address" (the script's stderr names skipped PRs) and exit2: usage, fix the argument20 foreign PR (authored by someone else or a bot like app/*, or author/login unreadable): the explicit number/URL path is not filtered by --author @me, so address-pr 877 would otherwise review, edit and merge a teammate's PR. No merge, push, review comment, body/label edit or task-claim write.
/ccxp cron, auto-pick, /drive dispatch): echo "PR #<number> authored by <author> (not us) — skipping, not touching." and exit. Never pick a foreign PR again this run.§1.3 is about whose PR it is; §1.6 about which CC session is driving our shared PRs; the script checks them in that order and both must pass. The §1.5 Project writes below run only after the gate.
/address-pr may be invoked independently of /drive (e.g., reviewing an already-open PR). To make the Project board show the PR is in human-reviewable state, do two things up front:
task_id (from _session/pr_task_id.sh: branch name → PR body Task: link → commit-message scan).In Progress for the duration of the PR loop.set-pr-ref.sh) so the board shows the task→PR mapping at a glance. Idempotent — a no-op if /gcpr already stamped it, or on re-entry.TASK_ID=$(jq -r .task_id <<<"$GATE")
if [ -n "$TASK_ID" ]; then
# 1) Status=Review
bash <skills-root>/_session/status.sh "$TASK_ID" Review
# 2) Append the PR ref to the item title (board task->PR mapping)
PR_URL=$(bash <skills-root>/_gh/gh.sh pr view <number> --json url --jq .url 2>/dev/null)
[ -n "$PR_URL" ] && bash <skills-root>/_session/set-pr-ref.sh "$TASK_ID" "$PR_URL"
fi
Both calls are best-effort: failures log to stderr and don't block the workflow. If task_id is empty (untracked branch, no body Task: link, no T-id in commits), skip the Project writes — the file-driven mirror workflow will reconcile state on the next push.
Clone-locality note (informational only): once TASK_ID is resolved you may run the guard for visibility:
[ -n "$TASK_ID" ] && bash <skills-root>/_taskid/in-this-repo.sh "$TASK_ID" || true
/drive, here a non-zero result is expected and fine: cross-repo /address-pr runs in the target clone (e.g. hub=hub-repo, target=ccxp-skills) where the task file is not present by design. So this is warn-only/informational in /address-pr — never refuse, and ignore DRIVE_STRICT_CLONE here./address-pr reads ownership (§1.6) and, on a free verdict, claims the task itself (see §1.6's free handling) — this note is about the clone-locality guard specifically, which stays informational-only here; the guard's harder, refusing teeth are in /drive and /stage./address-pr owns the Review transition (not /drive Phase 3) because /drive hands off to address-pr the moment the PR opens, and the entire multi-iteration PR loop (CI fixes, review back-and-forth, force-pushes, merge gate) belongs in the Review stage. Owning it here means re-invoking /address-pr from another session correctly re-asserts Review on every entry.
/ccxp cron) can otherwise drive the same PR concurrently because the PR lives on GitHub, reachable from every clone, and "one-session-per-clone" only protects working trees.(The §1.3 authorship gate must already have passed — §1.6 applies only to PRs that are ours.)
cc-owned label or marker comment.claimed_by: cc1-<machine-id>:<path-hash> on main, which is durable, GitHub-persisted, and atomically arbitrated by the merge (the same (machine, clone) agent identity, and the release-on-pickup "≤1 task at a time", that task_claim.sh already enforces).The gate (§1) already resolved the owner via _session/task_claim.sh pr-owner <number>; its verdicts mean:
mine — this clone holds the task claim (the normal /drive path: it claimed the task before opening the PR). Proceed.free — the task exists on main but is unclaimed. Claim it before doing anything else — see below. Don't just "proceed"; a PR can sit open against an unclaimed task for weeks, during which the Project board reads Open/unclaimed even while a PR against it exists, and a peer session could pick the same task for duplicate work.new — the task file does not exist on main yet: this very PR introduces it (the /stage pattern — queue.md + the new task file committed together) and it's unclaimed. Distinct from free because the claim mechanics differ — see its own procedure below.untracked — the PR maps to no task (fix/* branch, no Task: link). No cross-session task to coordinate on; proceed.owned:<agent> — a different (machine, clone) agent holds the task. Defer; do not drive or merge.unknown — the task file couldn't be resolved (network / not found). Fail-safe: defer, never a silent merge.
unknown on a rescoped PR; that is a tooling bug to fix separately, not license to bypass the fail-safe. If you have manually confirmed the real current task from the PR body and claimed that task, you may proceed — but say so explicitly and file or link the tooling bug if not already tracked.free → claim now, same mechanism as /drive Phase 1's Claim PR (this is the one case where /address-pr does acquire, not just read):
$TASK_ID is already resolved from §1.5. On a fresh t<id>-claim branch off main: bash <skills-root>/_session/task_claim.sh release-others <id> (free any stale claim this clone holds), then bash <skills-root>/_session/task_claim.sh acquire <id>, plus the status-preserve step below.claimed_by), push, gh pr create, and drive that claim PR through this same /address-pr loop to merge (it's docs-only, auto-merge-eligible under the status-change tier).claimed_by: line = you lost the race — another session claimed the task in the same window. git checkout main && git pull && git remote prune origin, re-run task_claim.sh pr-owner <number>; it should now read owned:<other> — defer per that case.git checkout main && git pull && git remote prune origin, run bash <skills-root>/_session/task_claim.sh verify-landed <id> [--repo <hub-owner/repo>] (bare acquire is local-only; branch on the stdout token: only landed proceeds), then continue to §2 on the original PR you were addressing.Status-preserve (both free and new). task_claim.sh acquire hard-sets status: In Progress (_tc_acquire's none branch in _session/task_claim.sh), so a task already at Design (e.g. just recorded by /incept) would be silently demoted in the claim commit. Capture the status first, restore it after:
PRE=$(bash <skills-root>/_session/task_claim.sh read <id> | cut -f1) # before acquire
bash <skills-root>/_session/task_claim.sh acquire <id>
if [ -n "$PRE" ] && [ "$PRE" != "Open" ] && [ "$PRE" != "In Progress" ]; then
PRE="$PRE" bash -c '. <skills-root>/_session/task_claim.sh; _tc_fm_set "$(_tc_find_file <id>)" status "$PRE"'
bash <skills-root>/_session/status.sh <id> "$PRE" # board mirror, best-effort
fi
main in the claim commit. status.sh only mirrors the Project board and never touches the file, so it is not enough alone./ipm step 3.4's acquire then status.sh <id> Design (ipm/SKILL.md) — same intent, plus the frontmatter write.Open and In Progress need no correction (acquire's result is already right).new → claim directly on the PR's own branch — unlike free, there is no separate claim-branch/merge round-trip, because free's procedure above can't work here: task_claim.sh acquire's file lookup (_tc_find_file) is a local filesystem glob, and a fresh branch cut off main does not have a file that exists only on this PR's own (not-yet-merged) branch. Instead:
git fetch && git checkout <the PR's headRefName> — the existing PR branch, not a new one, so the just-added task file is present in the local working tree.bash <skills-root>/_session/task_claim.sh release-others <id> then bash <skills-root>/_session/task_claim.sh acquire <id> — now succeeds, since the file is right there on this checked-out branch.free's step 3 above: another session saw new on this same PR and pushed its own claim commit first. Do not force-push. git fetch && git checkout <branch> again (picks up their commit) and re-run task_claim.sh pr-owner <number> — it re-resolves via the same head-ref path against the new head SHA, reads their now-stamped claimed_by, and reports owned:<other>. Defer per that case.No heartbeat / release for the mine/owned cases. Ownership is already established when the task was claimed; /address-pr only reads it there. There is no TTL marker to heartbeat, and nothing to release at merge — the task claim is released at task close (/drive Phase 7 / the journal-move PR, via task_claim.sh release).
hub-repo; target repo holds the PR, e.g. ccxp-skills/example-website.com), the claim is written from the hub clone (/drive Phase 1) but /address-pr's cross-repo mode runs from the ephemeral target clone (Phase 1.5: /tmp/<task-id>-<slug>-target) — a different path on the same host._tc_claimant_id's exact identity match can never call that "mine" on its own, which without this recognition made every cross-repo PR fall through to owned:<hub-clone> (from the target clone) or untracked/wrong-PR (from the hub clone, since gh pr view <n> resolves against $PWD's origin)._tc_pr_owner closes this gap with _tc_is_own_cross_repo_clone, a pure check consulted only when _tc_decide itself said other:
Host must match — a genuinely foreign host is never "mine", cross-repo or not.
The current clone's path must be this task's ephemeral target directory — basename matches <task-id>-*-target, the exact naming convention Phase 1.5 creates for this task. A same-host clone working a different task (even one that also looks like an ephemeral target clone), or any path that isn't that naming convention, still falls through to owned:/defer.
Net effect: a session driving its own cross-repo PR from the target clone now reads mine (proceed), while every foreign-host, foreign-task, or non-ephemeral same-host case is unchanged — the anti-steal guarantee above holds exactly as before.
This does not address the secondary hub-clone-side symptom (gh pr view <n> resolving the wrong repo's PR # when invoked from the hub clone) — cross-repo /address-pr is already documented (§1.5 cwd-discipline note) to always run from $TARGET, so that path isn't exercised here.
/address-pr is invoked on a PR that lives in a different repo than the maintainer's hub clone (typical for cross-repo /drive dispatches: hub=hub-repo, target=ccxp-skills / example-website.com / build-pipeline-repo), cd into the target repo's clone before any git / gh pr invocation, and verify pwd literally matches that path.pre-merge-check.sh reads files from cwd; the wrong cwd means the wrong file gets validated. Same gotcha class as /drive Phase 3 and /gcpr Step 4 — see those for the full discussion.Each iteration:
(No ownership heartbeat — PR ownership is the durable task claim on main, §1.6, not a TTL marker to keep alive.)
pre-merge-check.sh is a green-light script — it checks CI, review-comment resolution, and test-plan boxes, but does not challenge unstated assumptions. Before relying on its verdict, invoke superpowers:verification-before-completion on the current PR state.This fires every iteration of the §2 loop, not just the first — each push reset re-introduces stale-assumption risk. If verification surfaces a gap, fix it (commit + push triggers a fresh iteration) and re-run §2.a from the top. For docs-only PRs (same change-kind heuristic as /drive Phase 3.0), verification scope is lighter (links, frontmatter, render) but still gated.
Doc-consistency check (alongside verification): run the doc-freshness helper so a behaviour / structure / setup change doesn't merge with stale docs (especially README-like docs):
bash <skills-root>/_docs/doc-impact.sh "origin/${base_ref:-main}" # base_ref = the PR's base branch
Secret-handling check (recommended): run /secrets-check on the PR diff; advisory, masked findings only.
If it flags docs the PR didn't touch, the change isn't done: push a commit updating them (a fresh §2 iteration), or — interactively — record an explicit "reviewed, no change needed".
Unattended (ccxp loop): do not block the merge — proceed, but file a follow-up doc-conformance task (bash <skills-root>/_taskid/new.sh --check ./dev) for the unaddressed flags so drift is tracked, not lost.
It's a follow-up, so stamp its scheduled: into the next iteration after writing the file: bash <skills-root>/_ipm/stamp-scheduled.sh dev/TODO/<id>-<slug>.md next (token-free; update-forward-only). Docs-only PRs are exempt (the change is the docs). Same change-kind heuristic as the verification step above.
Review threads (before the pre-merge check). A ruleset with required_review_thread_resolution makes every unresolved thread merge-blocking, yet gh pr merge only says "the base branch policy prohibits the merge" (reviewDecision stays empty). Check them first:
bash <skills-root>/address-pr/scripts/review-threads.sh list <number> # TSV of unresolved threads; exit 0 = none
review-threads.sh reply <number> <thread-id> --fixed <sha> (the sha must be a commit of this PR touching the thread's file; the marker must be the last comment in the thread), or push back with reply ... --pushback <file> giving the specific constraint, never a style preference.bash <skills-root>/address-pr/scripts/review-threads.sh resolve <number>: it resolves only bot-opened threads carrying one of those markers (pushback resolutions capped at 5 per run) and prints what remains. Never resolve a thread without fixing it or arguing it.10 (bot-opened threads remain, including ones the token cannot resolve) counts as BLOCKED: loop under the §2.f valve, and stop and report once the valve trips. Exit 11 (only human-opened threads remain): stop and report to the owner, do not loop. Exit 3: gh failure, stop. Contract and tests: tests/address_pr_review_threads.bats.Then run the pre-merge check script. It is the single source of truth for CI, test plan, and pipeline verification.
(Repos without the script — e.g. ccxp-skills — fall back to the manual gate: CI, mergeability, test-plan boxes.) Note on review-comment enforcement: pre-merge-check.sh's own "review comments" check (where it exists) was written against Copilot's native reviewThreads — it does not see the plain PR comments step d now posts, so it will report "0 unresolved" trivially regardless of what step d found.
The actual enforcement of Claude Code review findings is step d's own in-loop discipline (fix or justify before continuing), not a persisted, externally-checkable state.
A session that skips step d entirely is not caught by the hard gate the way an unresolved Copilot thread used to be — this is a known reduction in cross-session backstop coverage, not an oversight.
Consumer repos wanting that backstop back need to teach their own pre-merge-check.sh to look for the **Claude Code review:** marker instead of reviewThreads.
bash <skills-root>/address-pr/scripts/pre-merge-check.sh <number>
For a support task also run bash <skills-root>/_support/gate-pr.sh <number> (same-commit regression test; no-op for other PRs; see _support/README.md); a non-zero exit blocks the merge like ❌ BLOCKED.
✅ ALL CHECKS PASSED: also check mergeability (bash <skills-root>/_gh/gh.sh pr view <number> --json mergeable). If MERGEABLE → exit the loop. If CONFLICTING → rebase in step b.❌ BLOCKED: read the failures and fix them in steps b-e below, then loop back to step a.Check mergeability (the default branch may have advanced since last iteration):
bash <skills-root>/_gh/gh.sh pr view <number> --json mergeable --jq '.mergeable'
UNKNOWN: retry after 10 secondsCONFLICTING: checkout, rebase on main, force-push. If conflicts can't be auto-resolved, stop and report.MERGEABLE: continuebash <skills-root>/_gh/gh.sh pr checks <number>
fail: read the failure logs, fix the code, commit, push.pending: wait 60 seconds and re-check.pass (or no checks for docs-only PRs): continue.No external bot.
The reviewer is a fresh, independent Claude agent dispatched via the Agent tool — it has no memory of why this change was made, which is the property that made Copilot's review useful in the first place (a second pair of eyes, not the same author grading their own work).
This also drops the org-tier dependency (Copilot Enterprise / Code Review add-on) entirely — every repo gets the same review mechanism regardless of GitHub plan.
State lives on the PR itself, not in local files — re-invoking /address-pr from a different clone or session must re-derive the same state, not restart blind (same durability rule as §1.5/§1.6).
Keyed to the head SHA the review actually covered, not a timestamp — a push landing between the diff fetch and the comment post would date-order after the comment despite never having been reviewed.
bash <skills-root>/address-pr/scripts/review-state.sh <NUMBER> # -> "reviewed <head-sha>" | "needs-review <head-sha>"
It reads our own latest **Claude Code review:** comment, takes the (sha: …) from its header line, and compares it with the PR's current head (exit 3 = gh failed: stop, never read as reviewed). Keep the printed sha as HEAD_SHA.
reviewed <sha>: this exact commit is already reviewed — skip to the approval gate below (LGTM check), then step e.needs-review <sha>: dispatch a fresh review (steps 1-3 below).Diff the PR, scoped to the actual changed files:
bash <skills-root>/_gh/gh.sh pr diff <NUMBER>
Dispatch an independent review agent via the Agent tool (subagent_type: code-improvement-scanner, or general-purpose if the diff is a workflow/config change outside that agent's usual scope). Give it the diff (or point it at the branch/files — its own choice how to read them) and an explicit review brief: find real bugs, correctness issues, security issues, and quality problems; if the diff is correct and complete, say so plainly (a clean bill) rather than manufacturing nitpicks. Do not tell it what the implementation was trying to achieve beyond the PR's own title/description — that context gap is what makes the review independent.
Post the agent's report as a PR comment from a file: write the report to $REVIEW_REPORT_FILE (never splice the agent's freeform text into a shell argument — it routinely contains $, backticks or code snippets), then:
bash <skills-root>/address-pr/scripts/post-review.sh <NUMBER> "$HEAD_SHA" "$REVIEW_REPORT_FILE" # add --dry-run to preview
It posts **Claude Code review:** (sha: <HEAD_SHA>) plus the report, so the audit trail lives on the PR. Nothing is posted on a non-zero exit: 2 empty/unreadable report, 3 stale (the head moved since HEAD_SHA; re-run review-state.sh and review the new head), 4 gh failure.
If the report is a clean bill (no real findings): review is complete — set CLEAN_BILL=1, dispatch the approval gate below, then continue to step e.
If the report describes real issues: before responding, invoke superpowers:receiving-code-review. It enforces: steelman the finding before deciding to push back; distinguish "wrong because I have context the reviewer lacked" from "wrong because I want to be done"; and when pushing back (not making a code change), post a follow-up PR comment with the specific design constraint or test that makes the finding incorrect — not "stylistic preference". Then address each per the skill's output: fix code (commit + push — the head SHA changes, so review-state.sh reports needs-review and a fresh review re-triggers next iteration), or post the pushback comment and move on. Never silently drop a finding without a comment explaining why. This targets the same "argue with the reviewer to feel productive" anti-pattern the Copilot-era wording warned about — the skill is still the brake, just aimed at a different reviewer.
Dispatch the approval gate (only after a clean bill, only when the repo has one). A repo with a synx-merge-bot App-auth pr-approve.yml workflow (.github/workflows/pr-approve.yml on its default branch — check once per run, not once per repo forever, since a repo can gain this later) uses that workflow to submit a real GitHub APPROVE review, pinned to the exact commit this step's review just covered — this is what makes required_approving_review_count: 1 on such a repo satisfiable by automation without weakening what the review means (see pr-approve.yml's own design comment: it is deliberately mechanical and never decides whether to approve — that judgment is entirely this step, right here).
Repos without the workflow skip this block entirely; nothing else in /address-pr depends on it.
LGTM supplement. The PR author's LGTM comment is a second trigger for this same dispatch — it is not an approval itself (the bot's real APPROVE review is what satisfies required_approving_review_count, and branch protection still decides merge). It supplements the independent review, never replaces it:
HEAD_SHA must exist and no finding may be unanswered (each fixed, or pushed back with a comment; set FINDINGS_OPEN=1 while any is, which blocks the LGTM path); the LGTM never skips the review or silences an open finding.bash <skills-root>/address-pr/scripts/has-lgtm.sh <NUMBER> [--after <time of our latest pushback comment>] decides: exit 0 prints the author. It counts only the PR author's own, non-bot comment after the latest push whose first line is a bare LGTM (not LGTM but, not LGTM, quoted, or a **Claude Code review:** comment); any later author comment other than a clean LGTM (hold, wait, a second thought) revokes. Contract and tests: tests/address_pr_has_lgtm.bats.pr-approve.yml in the repo: nothing is triggered; notify/wait as usual, and note "LGTM seen, no approval workflow" in the §3 report.LGTM_BY="$(bash <skills-root>/address-pr/scripts/has-lgtm.sh <NUMBER> ${PUSHBACK_AT:+--after "$PUSHBACK_AT"} 2>/dev/null || true)"
if [ "${CLEAN_BILL:-0}" = 1 ]; then TRIGGER=(--clean-bill) # review of HEAD_SHA was a clean bill
elif [ -n "$LGTM_BY" ]; then TRIGGER=(--lgtm-by "$LGTM_BY"); [ "${FINDINGS_OPEN:-0}" = 1 ] && TRIGGER+=(--findings-open)
else TRIGGER=(); fi # no trigger: skip the gate
[ "${#TRIGGER[@]}" -gt 0 ] && bash <skills-root>/address-pr/scripts/approve-dispatch.sh <NUMBER> "$HEAD_SHA" "${TRIGGER[@]}" # add --dry-run to preview
approve-dispatch.sh <NUMBER> <HEAD_SHA> (--clean-bill | --lgtm-by <login> [--findings-open]) [--dry-run] encodes the dispatch: it runs gh workflow run pr-approve.yml -f pr_number=… -f commit_sha=<HEAD_SHA>, then polls the PR's own reviews (not the workflow run) for a genuine APPROVED review pinned to that exact commit.
The poll is bounded (APPROVE_POLL_TRIES x APPROVE_POLL_INTERVAL, default 12 x 10s) so a slow or failed dispatch never hangs the loop. One line on stdout, and the exit is the verdict; an exit not listed here, or empty output, is a stop:
0 approved via workflow|fallback <sha>: a real approval landed10 no-workflow: no pr-approve.yml (the check cannot tell "absent" from a transient/auth failure: deliberately fail-safe, worst case a repo that should auto-approve is skipped and the merge stalls, never an approval that should not exist); nothing dispatched. Note "LGTM seen, no approval workflow" in the §3 report when it was an LGTM11 timeout: dispatched but no approval landed and the fallback was unavailable or failed: warn and continue; the §2.a mergeability check is the backstop13 dry-run: only with --dry-run; nothing was changed, never an approval12 not-eligible: --lgtm-by with --findings-open (an LGTM never silences an open finding); nothing dispatched2 usage: no trigger flag, both flags, or a bad sha (fail closed)The fallback (local-mint _gh/gh-app-token.sh + the same pinned APPROVE) runs only when GH_APP_ID and a private key are already in the environment; the token is never printed. Contract and tests: tests/address_pr_approve_merge.bats.
pr-approve.yml (App secrets stay in GitHub). Local minting via _gh/gh-app-token.sh is a fallback only; no bypass list is ever used.gh pr merge --auto), only after the hard gate and step e pass, so GitHub cannot merge ahead of the test plan; it then fires once branch protection's required approval and checks pass. Where --auto is refused (no protection on the repo), §3.3 merges as before.--ref <branch> pipeline dispatch, an external/manual check — immediately write it into the PR body's ### Pre-merge section as an unchecked item carrying the run URL, BEFORE you start waiting on it:bash <skills-root>/_gh/gh.sh pr edit <number> --body "$(...append '- [ ] labrun green — <run-url>'...)"
pre-merge-check.sh §3 (and the ccxp-skills manual fallback) already block merge on any unchecked pre-merge item, so the instant the gate is on the PR, every session — including the /ccxp cron — is blocked until it's satisfied.Then check the PR body for unchecked pre-merge items (- [ ]):
--ref <branch>.gh pr editPost-merge items: Do NOT verify before merge. List them in the report.
- [ ] must actually be checked off (not just left for the maintainer to trust) before reporting the PR ready to merge — an item that "needs a workflow run" means trigger it and wait, not skip it.PR titles need a descriptive slug, not just the bare task ID. fix(rc-confirm-promote): stop gh workflow run's stdout leaking into run_id (T20260727-252437) — never a title that's only T20260727-252437. A bare ID gives a reviewer no context without looking up the task file; this applies to claim PRs and journal-move PRs too, not just the main implementation PR.
When the hard gate passes (pre-merge-check.sh outputs ALL CHECKS PASSED):
Send Slack notification. slack-text.sh renders the text (it sends nothing); pass the number of test-plan items needing manual verification, if any, then hand the line to /slack:
bash <skills-root>/address-pr/scripts/slack-text.sh <number> <url> [--unverified <N>]
Verified: PR #<number> is ready to merge — CI green, Claude Code review addressed, test plan verified. <url>; with --unverified N: … Claude Code review addressed. N test plan items need manual verification. <url>.
Report to the user:
Before arming the merge, run review-threads.sh list <number> (with --auto GitHub waits silently, so a thread-blocked merge would otherwise stall without a stated cause); re-run it whenever a merge is refused with "base branch policy prohibits" or has not landed after wait-merged.sh, to tell unresolved threads apart from a missing approval. Then follow the merge policy in dev/guidelines.md — tiered merge, pipeline verification on branch, main must always be green. Use bash <skills-root>/_gh/gh.sh pr merge --auto --rebase --delete-branch when a bot approval landed in step d (falling back to plain pr merge --rebase --delete-branch if --auto is refused); --auto returns before the merge happens, so run bash <skills-root>/address-pr/scripts/wait-merged.sh <number> (read-only poll, WAIT_MERGED_TRIES x WAIT_MERGED_INTERVAL, default 30 x 10s) and continue to step 4 and any branch cleanup only on exit 0 (merged); 11 still open, 12 closed unmerged, 4 state unreadable: stop and report, never assume merged. Or plain pr merge --rebase --delete-branch for the auto-merge tier, or notify for wait-for-approval tier.
Status=Done (after merge succeeds):
if [ -n "$TASK_ID" ]; then
bash <skills-root>/_session/status.sh "$TASK_ID" Done
fi
Set Project Status=Done (intentional double-coverage with /drive Phase 7 — catches the merge-via-UI path where /drive never sees the close). Best-effort and idempotent; a no-op if /drive already wrote it.
/drive Phase 7 (the journal-move PR runs task_claim.sh release <task-id> <final-status>).dev/guidelines.md — read-only operations may run in parallel, but side-effecting operations (checkout, stash, edit, commit, push) must run sequentially. Finish all mutations for one branch before switching to another.--amend + --force-with-lease. After ANY push, wait for both CI and a fresh Claude Code review before declaring clean. Never skip re-review after a force-push. Step d only dispatches a fresh review when the newest review comment predates the latest push, which keeps the loop idempotent without re-reviewing an unchanged diff.bats tests/) before pushing to avoid ping-pong failures/gcpr (conventional commits, Co-Authored-By trailer)scripts/approve-dispatch.sh (opens in a new tab)scripts/auto-pick.sh (opens in a new tab)scripts/entry-gate.sh (opens in a new tab)scripts/has-lgtm.sh (opens in a new tab)scripts/post-review.sh (opens in a new tab)scripts/pre-merge-check.sh (opens in a new tab)scripts/review-state.sh (opens in a new tab)scripts/review-threads.sh (opens in a new tab)scripts/slack-text.sh (opens in a new tab)scripts/wait-merged.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub synx-data-labs/ccxp-skills --plugin ccxp-skills57 skills in this plugin
/1password-env-setupUse when the user explicitly asks to bootstrap or refresh a repo's 1Password-backed .env — installs the refresh-env helper, generates a hash-checking .envrc, and materializes .env from .env.tpl via op inject/agent-pairingUse when the user explicitly asks to toggle the ccxp-agent main-session agent on/off for this Claude Code profile or check its status/agents-sdkBuild AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.