merge-release
Skill1 starsChanged 29 days agoMITView on GitHub
Merge an approved release PR into its target branch. Takes the release branch or the version it is for. Validates approval/checks/conflicts via gh, then merges. Step 3 of the release workflow.
- Commits and pushes
In this repository37 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-product-knowledgeSkill
- archive-requirementsSkill
- brainstormSkill
- bug-stubSkill
- commitSkill
- configuration-initSkill
- create-proposalSkill
- create-release-branchSkill
- create-releaseSkill
- create-requirementsSkill
- epicSkill
- explainSkill
- feedbackSkill
- implementSkill
- jiraSkill
- load-contextSkill
- load-requirementsSkill
- meetingSkill
- monitor-prSkill
- pr-reviewSkill
- rebuild-indexSkill
- rebuild-requirements-indexSkill
- refactorSkill
- releaseSkill
- report-issueSkill
- resume-workSkill
- review-planSkill
- search-requirementsSkill
- second-opinionSkill
- standupSkill
- todoSkill
- todo-workSkill
- troubleshootSkill
- update-contextSkill
- update-documentationSkill
- work-statusSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 48
If non-zero, stop with the standard "not in a git repository" message instructing the user to cd into a service repo.
- Distinctive: line 70
If the array is empty, stop with: "No open release PRs found.
- Very specific: line 90
If pr.state == "MERGED", congratulate the user and stop — there is nothing to do.
- Very specific: line 92
If pr.state == "CLOSED", surface the URL and stop.
- Very specific: line 96
If gates.ready == true, use AskUserQuestion to confirm: Merge PR #N now?
- Very specific: line 98
If gates.ready == false, surface blocking_issues and AskUserQuestion to ask the user how to proceed.
- Very specific: line 107
When the user opts to override, pass the relevant flag(s) to apply: --allow-unapproved, --allow-failing-checks.
- Distinctive: line 119
If apply exits non-zero, surface stderr verbatim and stop.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Merge Release PR Command
Workflow:
/create-release-branch→/create-release→/merge-release→/release
Usage
/merge-release # lists open release PRs to pick from
/merge-release release/v1.2.0 # by release branch
/merge-release v1.2.0 # by version — resolves to release/v1.2.0Takes either form, or neither. With no argument it does not read the branch you are on — it lists the open release PRs and asks you to choose.
Context
Working directory: !pwd
Current branch: !git branch --show-current 2>/dev/null || echo "(not in a git repository)"
Available release branches: !git branch -a --list 'release/*' 'origin/release/*' 2>/dev/null || echo "(no release branches)"
Arguments provided: $ARGUMENTS
Release terminology — see ${CLAUDE_PLUGIN_ROOT}/shared/release-concepts.md.
Your Task
Thin dispatcher over ${CLAUDE_PLUGIN_ROOT}/shared/release/pr-merge.sh. Do not re-derive validation logic in prose — call the script and surface its structured output. Pause only for the confirmations the steps below ask for.
Step 0 — Pre-flight: verify git repo
git rev-parse --is-inside-work-tree 2>/dev/nullIf non-zero, stop with the standard "not in a git repository" message instructing the user to cd into a service repo.
Step 1 — Parse arguments
bash "${CLAUDE_PLUGIN_ROOT}/shared/release/parse-args.sh" \
--skill=pr-merge --json -- $ARGUMENTSOutcomes:
- Exit 0 —
release_branchpopulated; proceed. - Exit 10 —
missingcontainsrelease_branch. Go to Step 2 (interactive selection). - Exit 20 — show errors and stop.
Step 2 — Interactive selection (no arg supplied)
List open release-labeled PRs:
bash "${CLAUDE_PLUGIN_ROOT}/shared/release/pr-merge.sh" --list --jsonIf the array is empty, stop with: "No open release PRs found. Run /create-release first."
Otherwise use AskUserQuestion to present up to 4 PRs as options (label: #<n> <headRefName> → <baseRefName>, description: title) — the tool shows no more than 4; with more PRs, name the rest in the question text so the user can type one. The user picks one; remember its headRefName as release_branch.
Step 3 — Plan: show PR state and gates
bash "${CLAUDE_PLUGIN_ROOT}/shared/release/pr-merge.sh" \
--release-branch=<release_branch> --plan --jsonThe output JSON has:
pr— number, title, url, state, mergeable, reviewDecision (rawstatusCheckRollupis stripped — already aggregated below)gates—approved,no_conflicts,checks_passing,checks_running,readyfailing_checks[]— slim{name, conclusion}per failed check, used to name what failedrunning_checks_count— count of checks still pending/in-progress (no per-check detail)blocking_issues— human-readable list of why it's not ready (empty when ready)
Render a short summary to the user (one section per gate, ✓ / ✗).
If pr.state == "MERGED", congratulate the user and stop — there is nothing to do.
If pr.state == "CLOSED", surface the URL and stop.
Step 4 — Decide whether to merge
If gates.ready == true, use AskUserQuestion to confirm: Merge PR #N now? [y/n]. Also ask whether to delete the release branch after merge (pass --delete-branch on apply if yes).
If gates.ready == false, surface blocking_issues and AskUserQuestion to ask the user how to proceed. Valid options depend on which gate failed:
| Failed gate | Allowed user choices |
no_conflicts == false | Abort only — conflicts must be resolved on the branch first. |
checks_running | Abort, or wait and re-run /merge-release. |
checks_passing == false | Abort, view details (gh pr checks <n>), or merge anyway (override). |
approved == false | Abort, or merge anyway (override; review-required is a soft gate). |
When the user opts to override, pass the relevant flag(s) to apply: --allow-unapproved, --allow-failing-checks. Conflicts cannot be overridden — direct the user to resolve them and re-run.
Step 5 — Apply
bash "${CLAUDE_PLUGIN_ROOT}/shared/release/pr-merge.sh" \
--release-branch=<release_branch> --apply --json \
[--allow-unapproved] [--allow-failing-checks] [--delete-branch]The merge happens server-side (GitHub API) — no git push is issued, so the audit-gate hook does not apply.
If apply exits non-zero, surface stderr verbatim and stop.
Step 6 — Report
On success:
✓ Release PR Merged
PR: #<n> <title>
branch: <head> → <base>
Next:
/release # tag + GitHub releaseImportant Notes
- No extra round-trips — run the steps straight through, pausing only for the confirmations they ask for; use parallel tool calls where independent.
- No re-derived gh commands in prose — every gh call goes through
pr-merge.sh, including the Step 2 listing. - No audit recording needed — the merge and optional branch deletion are server-side via the GitHub API.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

