mergify-config

Validate and simulate Mergify configuration files against the official schema and live pull requests.

32|11|Updated May 17, 2021
One-click install
npx skills add https://github.com/Mergifyio/mergify-cli --skill mergify-config-mergifyio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mergify-config
Source: https://github.com/Mergifyio/mergify-cli/tree/main/skills/mergify-config
Command: npx skills add https://github.com/Mergifyio/mergify-cli --skill mergify-config-mergifyio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing Mergify configuration files (.mergify.yml) is error-prone because the schema, conditions syntax, and available actions evolve over time, and mistakes are only discovered after pushing changes to the repository. This Skill validates configuration locally against the official JSON schema and simulates what Mergify would do on a real pull request before committing. ## Core Features & Use Cases - Config Validation: Run mergify config validate to check .mergify.yml, .mergify/config.yml, or .github/mergify.yml against the official schema, with per-error path and message output and CI-friendly exit codes. - PR Simulation: Run mergify config simulate <PR_URL> to preview the actions Mergify would take on a specific pull request using the local configuration file. - Documentation-Grounded Authoring: Fetches the relevant pages from docs.mergify.com (file format, conditions, actions, merge queue rules) before writing or editing configuration, avoiding outdated memorized knowledge. - Use Case: Before pushing a new merge queue rule, validate the edited config locally, simulate it against an open PR to confirm the rule triggers as expected, then commit with confidence. ## Quick Start Ask the assistant to validate your Mergify configuration file and simulate it against a specific pull request URL to preview the resulting actions.

Frequently Asked Questions about mergify-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a Mergify configuration file?

Run `mergify config validate` to check your Mergify config against the official JSON schema. The CLI auto-detects `.mergify.yml`, `.mergify/config.yml`, or `.github/mergify.yml`, or you can specify a file with `--config-file` / `-f`.

How to test Mergify rules before pushing changes?

Use `mergify config simulate <PULL_REQUEST_URL>` to see what actions Mergify would take on a specific pull request using your local configuration. Combine it with `mergify config validate` to catch schema errors first.

Where does Mergify CLI look for the configuration file?

The CLI auto-detects configuration from three standard locations: `.mergify.yml`, `.mergify/config.yml`, and `.github/mergify.yml`. You can override detection with the `--config-file` or `-f` flag pointing to any path.

Can I validate Mergify config in a CI pipeline?

Yes, add a CI step that installs mergify-cli and runs `mergify config validate`. The command exits with code 0 on success and code 1 with detailed error paths and messages when the configuration is invalid.

What authentication does mergify config simulate require?

Simulation needs a Mergify credential via `--token` / `-t` or the `MERGIFY_TOKEN` environment variable. It falls back to the credential stored by `mergify auth login`; `GITHUB_TOKEN` and `gh auth token` are deprecated for the Mergify API.