neversight/learn-skills.dev/mergify-ci
Claude Code and agent skill by neversight/learn-skills.dev
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Use Mergify CI commands to upload JUnit test results, detect git references, manage CI scopes, and retrieve merge queue metadata. ALWAYS use this skill when working with CI pipelines, test result uploads, quarantine, scopes detection, or merge queue CI context. Triggers on CI, JUnit, test results, quarantine, scopes, git refs, CI insights.
Install
npx vskill@latest install neversight/learn-skills.dev/mergify-ciSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as neversight/learn-skills.dev/mergify-ci.
Mergify CI Commands
Overview
The mergify ci command group provides tools for CI pipelines: uploading JUnit test results to Mergify CI Insights, detecting git references for diff-based operations, managing CI scopes for selective testing, and retrieving merge queue batch metadata.
Commands
JUnit Processing (junit-process)
The primary CI command. Parses JUnit XML reports, checks quarantine status for failing tests, uploads results to Mergify CI Insights, and determines the final CI exit code.
FILES can be individual paths or quoted glob patterns (e.g. 'reports/**/*.xml'). Always quote the pattern so Mergify expands it rather than the shell — this is the recommended approach for large, sharded test suites.
Key options:
--token/-t(env:MERGIFY_TOKEN) -- CI Insights application key--repository/-r-- Repository full name (auto-detected in GitHub Actions)--tests-target-branch/-ttb-- Branch used for quarantine evaluation. Auto-detected per CI provider: GitHub Actions (GITHUB_BASE_REF→GITHUB_HEAD_REF→GITHUB_REF_NAME→GITHUB_REF), Buildkite (BUILDKITE_PULL_REQUEST_BASE_BRANCH→BUILDKITE_BRANCH), CircleCI (CIRCLE_BRANCH), Jenkins (CHANGE_TARGET→GIT_BRANCH).--api-url/-u(env:MERGIFY_API_URL) -- Mergify API URL (default:https://api.mergify.com)--test-framework-- Test framework name (optional metadata)--test-language-- Test language (optional metadata)--test-exit-code/-e(env:MERGIFY_TEST_EXIT_CODE) -- Exit code of the test runner, used to detect silent failures where the runner crashed but the JUnit report appears clean
Behavior:
- Parses JUnit XML files into test spans
- Checks quarantine status for failing tests against the Mergify API
- Uploads all test spans to Mergify CI Insights
- Prints a summary: tests run, failures, quarantined vs blocking
- Exits with code 0 if all failures are quarantined, code 1 if any are blocking
- If
--test-exit-codeis non-zero but no test failures are found, exits with code 1 (silent failure detection)
GitHub Actions example:
Git References (git-refs)
Detects the base and head git references for the current pull request context. Writes results to GITHUB_OUTPUT when running in GitHub Actions, and to Buildkite meta-data (mergify-ci.base, mergify-ci.head, mergify-ci.source) when running in Buildkite.
Output formats (`--format`):
text(default) — human-readableBase:/Head:linesshell—MERGIFY_GIT_REFS_{BASE,HEAD,SOURCE}=...lines suitable foreval, with POSIX-safe shell quoting. When base can't be detected,MERGIFY_GIT_REFS_BASE=''.json— single-line JSON object withbase,head,sourcekeys.basemay benullwhen it can't be detected (e.g.,workflow_dispatchevents); usejq -r '.base // ""'to coalesce to empty string.
Sources detected (in priority order): merge queue context, GitHub pull request event, GitHub push event, fallback to last commit.
Scopes (scopes)
Detects which CI scopes are impacted by changed files, based on a Mergify configuration file. Used for selective/targeted CI -- only run tests for scopes that have changed files.
Key options:
--config(env:MERGIFY_CONFIG_PATH) -- Path to the Mergify YAML config file (auto-detected)--base-- Base git reference (auto-detected)--head-- Head git reference (default: HEAD)--write/-w-- Write detected scopes to a JSON file
The config file defines scopes with file patterns. When files change between base and head, matching scopes are identified and written to GITHUB_OUTPUT (on GitHub Actions) or to Buildkite meta-data under mergify-ci.scopes (on Buildkite), as a JSON map of scope names to "true"/"false".
Scopes Send (scopes-send)
Sends scopes tied to a pull request to the Mergify API. Used when scopes are determined manually or from a file rather than auto-detected.
Key options:
--token/-t(env:MERGIFY_TOKEN) -- Mergify key--repository/-r-- Repository full name (auto-detected)--pull-request/-p-- Pull request number (auto-detected in GitHub Actions)--scope/-s-- Scope name (repeatable)--scopes-json-- JSON file containing scopes (output ofmergify ci scopes --write)--scopes-file-- Plain-text file with one scope per line
Tests Show (tests show)
Looks up tests by name on the repository's default branch and prints their health, success/failure ratios, and last failure context. The search is a batch API: pass one or more names (globs supported) and one block per match is rendered. Exit code reflects the worst health observed.
Key options:
--repository/-r-- Repository full name (owner/repo); required.--token/-t(env:MERGIFY_TOKEN, thenGITHUB_TOKEN) -- Auth token.--api-url/-u(env:MERGIFY_API_URL) -- API base URL.--pipeline-name,--pipeline-name-exclude-- Restrict / exclude by pipeline.--job-name,--job-name-exclude-- Restrict / exclude by job.--per-page-- Cap the search result count (1–100, server default 10).--json-- Emit a single JSON document{"tests": [...]}to stdout.
Exit codes:
0-- All matched tests arehealthyor unknown (or no match at all).1-- At least one test isflaky.6-- At least one test isbroken(consistently failing).
Queue Info (queue-info)
Outputs merge queue batch metadata from the current pull request event. Only works on merge queue draft pull requests. Writes output to GITHUB_OUTPUT when running in GitHub Actions.
This command is useful in CI workflows that need to know whether the current run is part of a merge queue batch and what other PRs are in the batch.
Common Patterns
Full CI pipeline with quarantine
Selective testing with scopes
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdata/skills-md/mergifyio/mergify-cli/mergify-ci/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/neversight/learn-skills.dev/mergify-ci)