auto-pr

Drives an open GitHub pull request to merge by classifying review findings and fixing blockers.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/astralform-ai/skills --skill auto-pr-astralform-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auto-pr
Source: https://github.com/astralform-ai/skills/tree/main/skills/auto-pr
Command: npx skills add https://github.com/astralform-ai/skills --skill auto-pr-astralform-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Driving a pull request to merge means long waits on CI and reviewers, and naive review loops never terminate because a reviewer always finds something new. This Skill runs as a self-paced goal that reads the PR state as one verdict, fixes only blocking findings, and squash-merges when the gate is satisfied. ## Core Features & Use Cases - Verdict-driven loop: A gate script (pr-state.py) returns one verdict — CLASSIFY, FIX_BLOCKING, WAIT_CHECKS, WAIT_REVIEW, MERGE, or ESCALATE — so the agent branches on state rather than guessing from raw gh output. - Severity classification: Each review thread is classified as BLOCKING, NIT, or WRONG, with durable HTML-comment markers so decisions persist across rounds and reviewer escalations reset threads correctly. - Convergence safeguards: A prose freeze after round 1, one push per iteration, a no-diff-growth rule, and a round budget prevent the runaway review loops that abandoned PRs in practice. - Use Case: A user types "/auto-pr 123" and the Skill waits on CI, replies to reviewer nits with evidence, fixes a genuine blocking defect with a proven regression test, and squash-merges once the gate passes. ## Quick Start Ask the agent to drive pull request 123 to merge by saying "/auto-pr 123" with the task bound to that repository.

Frequently Asked Questions about auto-pr

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

FAQPage Schema
How do I automatically drive a GitHub pull request to merge?

Invoke the skill with "/auto-pr <PR number>" on a task bound to the repository. It runs as a self-paced goal: each iteration reads the gate verdict, classifies or fixes findings, schedules its own continuation, and squash-merges once zero blocking findings remain on reviewed code.

How does the auto-pr loop decide which review comments to fix?

Each review thread is classified as BLOCKING, NIT, or WRONG. Only blocking findings — real defects like data loss, races, or broken contracts — get fixed; nits and wrong findings get a marked reply and are resolved without a commit.

Why do automated PR review loops fail to converge?

A reviewer handed a diff always produces new findings, so waiting for zero findings never terminates above roughly one finding per push. This skill exits on zero unresolved blocking findings instead, and enforces a prose freeze, one push per iteration, and a round budget.

Does the auto-pr skill work with bot reviewers like Copilot or Codex?

Yes. The gate detects bot logins with substring matching, treats bot CHANGES_REQUESTED as classifiable findings rather than human blocks, and handles shared-login setups where the reviewing bot and replying account are the same identity.

When does the auto-pr loop escalate to a human instead of merging?

It escalates on merge conflicts, a human reviewer's CHANGES_REQUESTED, an unreviewable PR that edits the review workflow, or a spent round budget with blocking findings or a still-red check. Escalation stops the goal and reports which condition fired.

What tools does the auto-pr skill require in the sandbox?

It requires git, the gh CLI, and python3, with network access to github.com and api.github.com. jq is deliberately not used; JSON parsing goes through gh's built-in --jq flag or python3.