← ClaudeAtlas

pr-mergelisted

Use when PRs are open on shadok-ai/shadok-ai and need bringing to a merge — a periodic pass over the PRs, a green PR to merge, a PR behind main (strict mode), a rebase conflict, a red CI verify to repair, or doubt about whether a PR is eligible for automatic merging.
shadok-ai/shadok-ai · ★ 14 · AI & Automation · score 76
Install: claude install-skill shadok-ai/shadok-ai
# pr-merge — bringing shadok-ai's PRs to a merge ## Overview `main` is protected in **strict** mode: the `verify` check must pass **and** the branch must be up to date. Many agents work in parallel in durable worktrees, so **a PR's branch may still be held by a live session**. Principle: never break `main`, never push out from under an agent. Rationale and rejected alternatives: `docs/superpowers/specs/2026-07-28-pr-merge-agent-design.md`. ## Entry filter A PR is a candidate only when **all four** hold: 1. `isDraft: false`; 2. `baseRefName: main`; 3. author ∈ {`shadok-ai-dev`, bots (`dependabot[bot]`, `github-actions[bot]`, app bots)}; 4. no `hold` label. `isCrossRepository: true` (a fork) → **never merged**, reported. One thing the loop may do for it: unblock its CI — see "Approving a fork's workflows" below. ```bash gh pr list --state open --limit 50 --json \ number,title,author,isDraft,mergeStateStatus,headRefName,baseRefName,labels,isCrossRepository ``` ## The decision, by `mergeStateStatus` | Status | Meaning | Action | |---|---|---| | `CLEAN` | green + up to date | quick review → `gh pr merge N --squash --subject "<title> (#N)"` | | `BEHIND` | behind `main` | `gh pr update-branch N` → wait for `verify`, then merge **in the same pass** | | `DIRTY` | conflict | simple → resolve; large → show the human | | `UNSTABLE` | checks failing **or still running** | read `statusCheckRollup`: running → wait; failing → simple → fix, large → show | | `BLOCKED` | missing re