/claude-harness:merge-commandsfrom claude-harness
Hands the user a ready-to-paste shell block that merges a set of open pull requests in the right order, preceded by a one-line-per-PR summary. Use when a guard denies you a merge (gh pr merge), when PRs you opened are left for the user to merge, or when the user asks for "la commande pour merger", "dans le bon ordre", or a merge order.
Ships in claude-harness. 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.
None: SKILL.md is the whole skill.
You never merge here: the guards forbid it. You check the PRs, order them and print the
command the user runs. Never run a gh pr merge or an update-branch call yourself.
Take the PRs from the conversation (the ones you opened, or the ones the user names). If none are named, ask; do not sweep every repository.
gh pr view <N> --repo <owner>/<repo> --json number,title,state,mergeable,mergeStateStatus,baseRefName,headRefName,files
Drop and report, outside the command:
state is MERGED or CLOSED: already done, say so.mergeable is CONFLICTING or mergeStateStatus is DIRTY: the user resolves it first.baseRefName is main: never merged by this command (GIT-1), unless the user asked for a hotfix.chore/sync-harness-files: the sync-projects workflow merges it (GIT-7).A PR with pending or failing CI stays in: the command waits for its checks and stops on a red one.
Apply in this order, then keep the user's or the conversation's order for ties:
baseRefName is another PR's headRefName comes after it.files: the smaller or alignment PR (harness docs,
CLAUDE.md/AGENTS.md, dependency bumps) goes first; each later PR of that repository
gets an update-branch call and a sleep 20 before its merge.First a short list, one line per PR whenever it fits, in merge order:
1. deployment#15: CalDAV et passage à Funnel + mTLS (rebase sur develop d'abord)
2. kreadevis#58: alignement CLAUDE.md / AGENTS.md
3. elya#53: pin JDK 25 dans Dependabot (CI en cours)
Each line: repo#N: <what it changes, in a few words>, plus a parenthesis only for an
order reason or a status (CI pending, rebase needed). Then the dropped PRs with their reason.
Then a single bash block, wrapped in a subshell so set -e never closes the terminal:
(
set -e
m() { gh pr checks "$2" --repo "<owner>/$1" --watch --fail-fast && gh pr merge "$2" --repo "<owner>/$1" --merge; }
m <repo> <N>
gh api -X PUT repos/<owner>/<repo>/pulls/<N>/update-branch
sleep 20
m <repo> <N>
)
Rules for the block:
--merge, the strategy of the harness skills; no --auto, no --admin.gh api -X PUT .../update-branch, never gh pr update-branch
(missing from the Ubuntu gh 2.45).owner/repo in each call instead of <owner>/$1.After the block, two lines at most: if a step fails, the block stops there; remove the
merged lines and rerun. An update-branch error saying the branch is already up to date
stops it too: rerun without that gh api line and its sleep.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub selimlbouraya/claude-harness --plugin claude-harness12 skills in this plugin
/bootstrap-projectGenerates a harnessed repository from templates/project: documents, gate parameters, plugin declaration, CI caller and dependabot, then verifies the result against harness-invariants. Use when starting a new project, or when bringing an existing repository under the harness for the first time./dep-updateChecks and updates a project's dependencies, applying patch and minor bumps and proposing majors, then validating the build before commit. Use when the user asks for a dependency update, wants to know what is outdated, or before writing a lot PR./harness-syncDetects and fixes drift between a repository's harness documentation and the reality of its code, settings and lots. Use after editing CLAUDE.md or a skill, when the stack, conventions or lot scope evolved, after a lot, or when the user asks to refresh, check or improve the harness./i-have-adhdShape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time estimates, make wins visible. Invoke with /i-have-adhd; stays on until "stop adhd mode"./integration-checkRuns the smoke test of a frontend against its real backend, by hand or through the repo's Integration command, and writes docs/audits/lot-0-integration.md, which every frontend PR requires. Use before the first frontend PR, when the API contract changed, or when the user mentions integration, the real backend, end-to-end or the contract./lot-auditAudits a lot branch for security, performance and architecture before the PR is opened, fixes its findings, and writes the consolidated report docs/audits/lot-N.md. Use after lot-review, at the end of a lot, or when the user asks for an audit, a security review or an architecture review of lot work.