View as Markdown

Stacks for AI Agents

One-page bootstrap for AI coding agents — install the Mergify CLI and the Stacks skill.


You are an AI coding agent. Follow these three steps to enable stacked pull request support. After step 2, your skill system will contain the full Stacks workflow. Consult it for any stack-related task.

Install mergify-cli with uv (preferred) or pipx:

Terminal window
uv tool install mergify-cli
Terminal window
pipx install mergify-cli

Verify:

Terminal window
mergify --version

Pick the command that matches your runtime.

Claude Code:

/plugin marketplace add Mergifyio/mergify-cli
/plugin install mergify-stack@mergify
/reload-plugins

Any agent supporting skills.sh (Cursor, Cline, and others):

Terminal window
npx skills add Mergifyio/mergify-cli

The skill contains the full Stacks workflow (commands, rules, and common scenarios). Load it before performing any stack work.

Run in the repository root:

Terminal window
mergify stack setup

This installs a commit-msg Git hook that generates a Change-Id for every new commit, and a pre-push hook that warns if git push is used instead of mergify stack push.

The skill installed in step 2 contains the workflow. Follow it for any stack-related task.

Was this page helpful?