/mergify:mergify-merge-protectionsfrom mergify
Controls PR merge timing with Mergify: Depends-On for cross-PR dependencies, Merge-After for date-based holds, and scheduled freezes via CLI.
Ships in mergify. 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.
Merge protections control when PRs are allowed to merge:
| Protection | Scope | How |
|---|---|---|
| Depends-On | Per-PR dependency chain | Depends-On: header in PR body |
| Merge-After | Per-PR time gate | Merge-After: header in PR body |
| Scheduled Freezes | Repository-wide or conditional | CLI commands (mergify freeze) |
Depends-On and Merge-After are built-in — just add the header to the PR description (or commit message body when using mergify stack push) and Mergify enforces them automatically, no .mergify.yml configuration needed. Freezes are managed via CLI commands.
They work only on a repository where Mergify runs: one with a Mergify configuration file (.mergify.yml, .mergify/config.yml or .github/mergify.yml), or whose pull requests get Mergify's checks or comments. Anywhere else a Depends-On: or Merge-After: line holds nothing back, so tell your user rather than rely on it.
Block a PR from merging until one or more other PRs are merged first.
Add one or more Depends-On: lines to the PR body:
Depends-On: #123
Depends-On: https://github.com/org/other-repo/pull/456
Depends-On: org/other-repo#789
All three formats are supported — use #NNN for same-repo, full URL or org/repo#NNN for cross-repo.
Depends-On:, a space, then the reference. Mergify ignores a line that holds anything more (a list marker, a second reference, a trailing word or period), and the PR is then not held. Use one Depends-On: line per dependency.mergify stack pushThe stack tool orders the PRs of a stack itself: it writes Depends-On: #NNN between consecutive PRs, or leaves it out when GitHub holds the stack. For a PR outside the stack, in another repository or in this one, add the header manually to the commit message body — it will be copied to the PR description on push.
mergify stack push keeps that line, Depends-On: #NNN for a PR of the same repository included, and appends its own marker for the PR below in the stack. Older mergify releases removed every Depends-On: #NNN line from the description: if the line is missing from the PR after the push, upgrade with the mergify-cli-upgrade skill, or write the reference as owner/repo#NNN or as a URL, which every release keeps. A Merge-After: line in the commit message body is copied as is.
Postpone merging until a specified date and time.
Add a Merge-After: line to the PR body:
Merge-After: 2025-09-01T09:00:00Z
Merge-After: 2025-09-01 # date only (midnight UTC)
Merge-After: 2025-09-01T09:00:00 # no timezone (assumed UTC)
Merge-After: 2025-09-01T09:00:00Z # explicit UTC
Merge-After: 2025-09-01T09:00:00+02:00 # with UTC offset
Merge-After: 2025-09-01T09:00:00[Europe/Paris] # with IANA timezone
If no timezone is specified, UTC is assumed.
Both headers can be used together on the same PR:
This PR updates the billing API to support the new pricing model.
Depends-On: org/billing-service#42
Merge-After: 2025-06-15T10:00:00[US/Eastern]
The PR will not merge until PR #42 in billing-service is merged and the specified time has passed.
Scheduled freezes temporarily halt merging of pull requests matching specific conditions. Use them for deployment windows, incident response, maintenance periods, or any situation where merges should be paused.
mergify freeze list # List all scheduled freezes
mergify freeze list --json # Machine-readable JSON output
mergify freeze create OPTIONS # Create a new scheduled freeze
mergify freeze update FREEZE_ID OPTIONS # Update an existing freeze
mergify freeze delete FREEZE_ID # Delete a freeze
All commands require a Mergify credential: the one mergify auth login stores (your user runs it, see below), or:
--token / -t (env: MERGIFY_TOKEN) -- Mergify credential. Falls back to the credential mergify auth login stored. The CLI no longer falls back to GITHUB_TOKEN or gh auth token.--repository / -r -- Repository full name (auto-detected from git remote)--api-url / -u (env: MERGIFY_API_URL) -- Mergify API URL (default: https://api.mergify.com)# Emergency freeze (starts now, no end time)
mergify freeze create \
--reason "Production incident - halting all merges" \
--timezone "US/Eastern"
# Scheduled maintenance window
mergify freeze create \
--reason "Weekend deployment freeze" \
--timezone "Europe/Paris" \
--start "2024-12-20T18:00:00" \
--end "2024-12-23T08:00:00"
# Freeze with conditions (only freeze merges to main)
mergify freeze create \
--reason "Release freeze for v2.0" \
--timezone "UTC" \
-c "base=main"
# Freeze with exclusions (allow hotfix PRs through)
mergify freeze create \
--reason "Code freeze" \
--timezone "UTC" \
-c "base=main" \
-e "label=hotfix"
Required options:
--reason -- Human-readable reason for the freeze--timezone -- IANA timezone name (e.g., Europe/Paris, US/Eastern, UTC)Optional options:
--start -- Start time in ISO 8601 format (default: now)--end -- End time in ISO 8601 format (default: no end, emergency freeze)--condition / -c -- Matching condition (repeatable, e.g., -c 'base=main')--exclude / -e -- Exclude condition (repeatable, e.g., -e 'label=hotfix')# Table view
mergify freeze list
# JSON output for scripting
mergify freeze list --json
The table shows: ID, reason, start/end times with timezone, matching conditions, and active/scheduled status.
# Extend a freeze
mergify freeze update FREEZE_ID --end "2024-12-24T08:00:00"
# Change the reason
mergify freeze update FREEZE_ID --reason "Extended: waiting for hotfix"
# Set exclusions (replaces the full exclusion list, does not append)
mergify freeze update FREEZE_ID -e "label=emergency"
The FREEZE_ID is the UUID shown in mergify freeze list.
# Delete a scheduled (not yet active) freeze
mergify freeze delete FREEZE_ID
# Delete an active freeze (reason required)
mergify freeze delete FREEZE_ID --reason "Incident resolved"
If the freeze is currently active, a --reason for deletion is required.
# Stop all merges immediately
mergify freeze create \
--reason "Incident #1234 - API outage" \
--timezone UTC
# Once resolved, delete the freeze
mergify freeze list --json # Get the freeze ID
mergify freeze delete FREEZE_UUID --reason "Incident #1234 resolved"
Create the freeze before each deployment window and delete it after:
mergify freeze create \
--reason "Deploy window" \
--timezone "US/Pacific" \
--start "2024-12-20T14:00:00" \
--end "2024-12-20T16:00:00"
mergify freeze create \
--reason "Sprint freeze" \
--timezone UTC \
-c "base=main" \
-e "label=hotfix" \
-e "label=security"
no Mergify credential found means neither --token, MERGIFY_TOKEN nor a stored login gave the CLI a credential. Stop and ask your user to log in:
mergify auth login yourself. It prints a URL and a code, then waits until a person approves it in a browser: you cannot finish it, and the tool call hangs.! mergify auth login at the prompt. Elsewhere, ask them to run mergify auth login in their own terminal.If mergify rejects a command or flag this skill names, the CLI is probably older than the skill: follow the mergify-cli-upgrade skill.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/mergify-ciUse Mergify CI commands to upload JUnit test results, detect git references, manage CI scopes, retrieve merge queue metadata, and write the OIDC trust policies that let GitHub Actions jobs reach Mergify without a key. ALWAYS use this skill when running `mergify ci`, `mergify tests` or `mergify oidc` commands, uploading test results to Mergify, managing Mergify test quarantines, turning Mergify test retry on or off, detecting Mergify CI scopes, reading Mergify merge queue CI context, or finding out why a job's ID token was refused. Triggers on mergify ci, mergify tests, mergify oidc, junit-process, Mergify Test Engine, CI Insights, Mergify quarantine, Mergify test retry, Mergify scopes, scopes-send, git-refs, queue-info, trust policy, OIDC, id-token./mergify-cli-upgradeUpgrade the mergify CLI when it is older than a Mergify skill. Use when `mergify` rejects a command or flag a skill names, or when asked to check, update or upgrade the mergify CLI. Triggers on unrecognized subcommand, unexpected argument, outdated CLI, upgrade mergify, update mergify, self-update./mergify-configUse Mergify config commands to validate configuration files, simulate Mergify actions, and write Mergify configuration. ALWAYS use this skill when validating, writing, editing, or simulating Mergify config. Triggers on config validate, config simulate, mergify configuration, mergify.yml, .mergify.yml, Mergify merge queue config, pull_request_rules, Workflow Automation, queue_rules, Mergify conditions, conflict_resolvers, automatic merge conflict resolution./mergify-eventsUse `mergify events` to browse the Mergify activity log — every event Mergify recorded for a repository or one pull request (queue enters/leaves, merges, commands, CI Insights, freezes), as a human timeline or JSON. ALWAYS use this skill when investigating what Mergify did to a PR or repository and when, reconstructing a pull request's merge-queue lifecycle, auditing Mergify actions, or filtering events by type. Triggers on mergify events, Mergify activity log, Mergify event log, what did Mergify do, Mergify queue lifecycle, Mergify queue history, event_type, action.queue./mergify-merge-queueUse Mergify merge queue to queue/dequeue PRs, to monitor and inspect the queue, to diagnose a dequeued PR — whether it is queued, why it was dequeued, where its CI failure is, and what to do next — and to decide whether a change to a PR already in the queue is worth pushing now. ALWAYS use this skill when queuing or dequeuing a PR in the Mergify merge queue, checking its status, finding out why Mergify dequeued a PR, about to push, amend or rebase a PR that is in the Mergify merge queue, pausing/unpausing the Mergify merge queue, or debugging a merge the Mergify queue did not make. Triggers on mergify queue, @mergifyio queue, @mergifyio dequeue, Mergify merge queue, Mergify queue status, why did Mergify dequeue my PR, Mergify dequeue reason, push to a PR in the Mergify merge queue, review comment on a PR in the Mergify merge queue, Mergify queue pause, Mergify batch, Mergify bisecting, CHECKS_FAILED, PULL_REQUEST_UPDATED, CONFLICT_WITH_BASE_BRANCH, CONFLICT_WITH_PULL_AHEAD, Mergify merge conflict./mergify-stackUse Mergify stacks for git push, commit, branch, and PR creation in a repository that uses Mergify stacks (its stack commit-msg hook is installed, or its recent commits carry `Change-Id` trailers). In such a repository, ALWAYS use this skill when pushing code, creating commits, creating branches, or creating PRs. In any other repository, use plain git and gh instead. Triggers on push, commit, branch, PR, pull request, stack, stacked, git, rebase, checkout, reorder, move, sync, amend, note, revision history.npx claudepluginhub mergifyio/mergify-cli --plugin mergifyOther plugins' skills for the same job