/mergify:mergify-configfrom mergify
Validates Mergify configuration files against the official schema and simulates Mergify actions on pull requests. Useful for testing merge queue and PR automation rules before committing.
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.
The mergify config command group provides tools for validating Mergify configuration files against the official schema and simulating what Mergify would do on a specific pull request using a local configuration file.
mergify config validate # Validate the configuration file
mergify config simulate PULL_REQUEST_URL # Simulate actions on a PR
Mergify CLI auto-detects the configuration file from standard locations, in this order — the first one that exists wins:
.mergify.yml, then .mergify.yaml.mergify/config.yml, then .mergify/config.yaml.github/mergify.yml, then .github/mergify.yamlBoth extensions are read at every location, and .yml wins when a location
carries both. A repository holding more than one configuration file gets a
warning on stderr naming the file in use and the ones ignored — the engine
applies the same order, so the CLI reads whatever production reads.
Override with --config-file / -f:
mergify config -f path/to/config.yml validate
validate)Validates the Mergify configuration file against the official JSON schema fetched from https://docs.mergify.com/mergify-configuration-schema.json.
# Validate auto-detected config file
mergify config validate
# Validate a specific file
mergify config -f .mergify.yml validate
Output:
Use in CI:
- name: Validate Mergify config
run: mergify config validate
simulate)Simulates what Mergify would do on a specific pull request using the local configuration file. This lets you test configuration changes before committing them.
mergify config simulate https://github.com/owner/repo/pull/123
Required arguments:
PULL_REQUEST_URL -- Full GitHub URL of the pull request to simulate againstOptions:
--token / -t (env: MERGIFY_TOKEN) -- Mergify credential. Falls back to the credential mergify auth login stored (your user runs it, see below). The CLI no longer falls back to GITHUB_TOKEN or gh auth token.--api-url / -u (env: MERGIFY_API_URL) -- Mergify API URL (default: https://api.mergify.com)Output: Shows a title and detailed Markdown summary of what actions Mergify would take on the PR with the local configuration.
When helping a user write, edit, or understand a Mergify configuration file, always fetch the relevant documentation pages first. Do not rely on memorized knowledge -- the configuration format, available actions, and conditions syntax evolve over time.
Fetch https://docs.mergify.com/llms.txt to get the full documentation index
with all available pages and their descriptions.
Fetch the pages relevant to the user's request before writing any configuration:
| Topic | URL |
|---|---|
| File format and structure | https://docs.mergify.com/configuration/file-format |
| Conditions syntax and attributes | https://docs.mergify.com/configuration/conditions |
| Data types (duration, templates) | https://docs.mergify.com/configuration/data-types |
| Configuration sharing and reuse | https://docs.mergify.com/configuration/sharing |
| Merge queue rules | https://docs.mergify.com/merge-queue/rules |
| Merge queue setup | https://docs.mergify.com/merge-queue/setup |
| Queue priority rules | https://docs.mergify.com/merge-queue/priority |
| Merge protections | https://docs.mergify.com/merge-protections/setup |
| Custom protection rules | https://docs.mergify.com/merge-protections/custom-rules |
| Merge protection examples | https://docs.mergify.com/merge-protections/examples |
| Commands and restrictions | https://docs.mergify.com/commands |
| JSON Schema | https://docs.mergify.com/mergify-configuration-schema.json |
pull_request_rules) is SunsetWorkflow Automation is Sunset and will be removed on 2027-12-31. It covers the
pull_request_rules section, the actions its rules run, defaults.actions,
and the @mergifyio backport and copy commands. Nothing in Mergify replaces
it. Until its removal it keeps working, frozen, for the repositories that
already use it.
pull_request_rules or
defaults.actions to a configuration that has neither, even when the user
asks for a job a rule could do. For labelling, commenting, assigning,
requesting reviews, backporting or closing pull requests, write a GitHub
Actions workflow or use a GitHub setting:
https://docs.mergify.com/workflow/move-to-github-actions maps each action
to its counterpart. To have Mergify merge pull requests, set up the merge
queue instead.https://docs.mergify.com/workflow/rule-syntax and the page of each action
the rules use, at https://docs.mergify.com/workflow/actions/<action_name>.
Tell the user that Workflow Automation is removed on 2027-12-31, and offer
to move the rules to GitHub Actions with the page above.queue, merge, squash
and github_actions actions, and the delete_head_branch option. Follow
the notice their docs give them, not the date above.mergify config validate to check for errorsmergify config simulate <PR_URL> against a
real PR to verify the rules behave as expectedconflict_resolvers)Preview: it may still change, and is available on request.
The top-level conflict_resolvers key has Mergify resolve conflicts with the
base branch on the files its entries name, instead of leaving them to the pull
request's author. Start from the auto entry, which
leaves Mergify to pick a strategy file by file for every file it has one for
(a package manager's manifest and lockfile, source files by language,
Markdown, JSON, changelogs):
conflict_resolvers:
- auto: true
auto never picks a strategy that keeps one side's change only. A conflict
its strategy declines (two pull requests changing the same key or the same
dependency two ways) is still a conflict, and a file it has no strategy for
merges as git would.directories (literal paths starting with /, default /) limits an
entry to part of the repository.paths with a strategy,
package-manager with its directories, or language. When several
entries match a file the last one wins, except that any other entry beats
auto wherever it sits, so an explicit entry is how to keep a file from
auto's strategy.ours, theirs, prefer-ours and prefer-theirs discard one side's
change. Name one only when the user asks for that trade.merge_method: merge-batch and
fast-forward land the resolved batch; with merge and squash, once the
entries settle every conflict, Mergify pushes the merge into the pull
request while it is not queued; rebase resolves nothing.The conflict_resolvers description in the JSON schema
(https://docs.mergify.com/mergify-configuration-schema.json) lists every
strategy, language and package manager. Run mergify config validate after
editing.
# Edit your .mergify.yml locally, then:
mergify config validate
mergify config simulate https://github.com/myorg/myrepo/pull/42
# If both look good, commit and push
jobs:
validate-mergify:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install mergify-cli
run: pip install mergify-cli
- name: Validate Mergify config
run: mergify config validate
no Mergify credential found (from simulate, which asks the Mergify API) 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-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-protectionsUse Mergify merge protections to control when pull requests merge — make one wait for other pull requests to merge (Depends-On header), hold one until a date and time (Merge-After header), and pause merges with scheduled freezes (CLI). In a repository that uses Mergify, ALWAYS use this skill when a pull request must not merge before another pull request, in the same repository or in another repository of the organization; when a change split across repositories has to land in order; when a pull request must not merge before a date or a time; when a ready pull request has to be held back; or when managing Mergify scheduled freezes. Triggers on merge after another PR, wait for a PR to merge first, land in order, merge order across repositories, do not merge before, merge on a date, hold back a PR, hold the merge, Depends-On, Merge-After, mergify freeze, Mergify merge freeze, Mergify merge protection./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