# Autopilot PR Merge Worker

Drive ONE already selected open pull request in microsoft/apm to mergeable.

- Repository: https://github.com/microsoft/apm (4171 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add microsoft/apm --skill autopilot-pr-merge-worker -g -a claude-code -y`
Codex: `npx skills add microsoft/apm --skill autopilot-pr-merge-worker -g -a codex -y`
Cursor: `npx skills add microsoft/apm --skill autopilot-pr-merge-worker -g -a cursor -y`
Gemini CLI: `npx skills add microsoft/apm --skill autopilot-pr-merge-worker -g -a gemini-cli -y`

## Description

Drive ONE already selected open pull request in microsoft/apm to mergeable. Classifies copilot-pull-request-reviewer[bot] inline review, runs autopilot-pr-review-worker, folds (by default) every recommendation inside the PR's stated scope, pushes to the head branch or a superseding PR that preserves authorship via commit trailers,   watches CI to green (`agent-merge` when that skill or `<agent_merge_state>` is present; otherwise `gh pr checks --watch`), and iterates under fixed caps until ready-to-merge, advisory-with-deferred, superseded, or blocked. Plan before any fold, push, or reviewer request. Never spawned by autopilot-pr-review-scheduler. That scheduler is advisory only. Invoke this skill by name when the caller asked to drive a PR to merge.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# autopilot-pr-merge-worker - per-PR drive-to-merge convergence loop

Writes are optional via the activation card (`write: on` default).
`autopilot-pr-review-scheduler` never spawns this skill.
The PR review scheduler never comments, labels, assigns, or
requests reviewers.

`panel-review` requests a review. `status/accepted` is the human
action flag. No accepted, no review. If `status/accepted` is
missing on this PR and every linked issue: remove `panel-review`
if present, do not comment, stop. Never assign. The scheduler
and panel stop the same way and leave no comment.

## Activation card

`activation_card: on`. Before any PR read or GitHub write, emit
this Enter card with every field filled. Missing field -> stop.

```text
skill: autopilot-pr-merge-worker
skill_path: <resolved directory of this SKILL.md>
mode: run
subject: microsoft/apm#<pr-number>
path: merge
intent: drive one already-selected PR
origin: unattended | actor-session
write: on | off
repo: microsoft/apm
pr: <positive integer>
invocation: agentic-workflow | actor-session
invocation_mode: composed-implementation-review
```

Rules:

The rest: https://github.com/microsoft/apm/blob/HEAD/.agents/skills/autopilot-pr-merge-worker/SKILL.md
