Merge the green integration -> production pull request, then relabel and clean up; optionally deploy. Use when the owner types /saani:merge or /saani:merge --deploy, or says "merge" or "merge and deploy" in their own words.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Merge?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/lordlothar99-merge)
---
name: merge
description: Merge the green integration -> production pull request, then relabel and clean up; optionally deploy. Use when the owner types /saani:merge or /saani:merge --deploy, or says "merge" or "merge and deploy" in their own words.
argument-hint: "[PR] [--deploy [--skip-ci WHY]] [--dry-run]"
disable-model-invocation: true
---
# /saani:merge: merge the pull request that an auto run left
**Arguments:** `$ARGUMENTS`.
The owner saying "merge" or "merge and deploy" in their own words in a session means this command: `saani merge`, and `saani merge --deploy`.
Only the owner starts it; an auto run never does.
1. Run `saani merge $ARGUMENTS`. It finds the one open integration -> production pull request (or the number given), refuses unless it is
open, mergeable and its CI is green on the exact head (the `[ci] status_context` status and every check run), merges it with a merge commit
(the trailers stay; the integration branch is never deleted), then does what `saani ci merged` does: relabel the issues, remove the
finished auto runs. `--dry-run` runs the checks and prints what would happen, merging nothing.
When `[release] version_file` is set and the pull request changed the version in it, it then creates the GitHub release `v<version>`
with the notes of the pull request's issues (nothing otherwise; it says so). If that release step fails, the merge stands: show the
`next: saani release create ...` line and tell the owner to run it; never run it yourself.
2. `--deploy`: after the merge (and the release step), `saani deploy` (the key into the SSH agent through a dialog or a terminal window when it is not there, the checks, the deploy, the log, the prod tag, the issues; `/saani:deploy`). If it refuses
or fails, the merge stands; say that, and what the deploy's message says to do. `--skip-ci "<why>"` goes to the deploy (it skips
the deploy's CI gate only, never the pull request's CI): only when the owner typed it, never added by you.
3. Merged: say the pull request, that the issues were relabelled and which auto runs were removed. Refused: show the reason and the step it
names (usually `saani ci pr`); never merge by another route, never force, never weaken a check.
## Running saani
Run `saani` with the Bash tool: the plugin's `bin/` puts it on that shell's PATH. If it is not found, run
`python -I "${CLAUDE_PLUGIN_ROOT}/saani.py"` instead. Run it from the project's folder (where saani.toml is). A command that fails: show its
message as it is, say what it means, never work around it.