pr-to-git

Automate GitHub pull request creation, review monitoring, and merging.

8|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/Gold-b/claude-code-governance --skill pr-to-git
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-to-git
Source: https://github.com/Gold-b/claude-code-governance/tree/main/bundle/skills/pr-to-git
Command: npx skills add https://github.com/Gold-b/claude-code-governance --skill pr-to-git

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the last-mile release workflow of opening a GitHub pull request, waiting for a designated responsible reviewer to respond, sending a timed reminder if needed, and merging according to a clearly defined approval or timeout policy.

Core Features & Use Cases

  • PR Creation and Reuse: Opens a pull request from a feature branch to the target base branch, or reuses an existing PR for the same branch pair to avoid duplicates.
  • Responsible-Agent Review Loop: Watches for approval signals such as approved reviews, affirmative comments, or thumbs-up reactions from the designated reviewer.
  • Timed Reminder and Grace Policy: Waits six continuous minutes, posts one reminder comment, then waits four more minutes before merging if no response arrives.
  • Fallback Reviewer Handling: Switches from CODEX to an Opus 4.8 thinking reviewer when CODEX is unavailable or at usage limit.
  • Safe Merge Enforcement: Refuses to force-merge through failed checks, branch protection, conflicts, or explicit change requests.
  • Use Case: Ideal when a user wants an AI agent to push completed work to GitHub, request review from CODEX, and complete the merge path without manual babysitting.

Quick Start

Ask the pr-to-git skill to open a pull request for the current branch, wait for CODEX approval, remind once after six minutes, and merge if approved or if the grace window expires.

Frequently Asked Questions about pr-to-git

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

FAQPage Schema
How do I automate GitHub pull request creation and merging?

Automating GitHub pull request creation and merging involves opening a PR from a feature branch, polling for reviewer approval signals, and executing a protected merge once review rules pass or the grace window expires.

What is an approval-or-timeout merge policy for pull requests?

An approval-or-timeout merge policy waits a set time for reviewer approval, sends a reminder, then auto-merges the pull request if the grace window expires without explicit change requests blocking the merge.

Can I use GitHub CLI to merge a pull request after code review?

Yes, GitHub CLI handles branch creation, PR creation, and protected merge execution for reviewed pull requests. The skill polls review comments and reactions to confirm approval before merging safely.

Does this workflow support a fallback reviewer when CODEX is unavailable?

When CODEX is unavailable or at usage limit, the workflow switches to an Opus 4.8 thinking reviewer as the fallback to ensure the pull request review and merge path completes.

Why does a pull request refuse to merge through failed checks?

A pull request refuses to merge through failed checks because safe merge enforcement prevents force-merging past branch protection rules, conflicts, failed statuses, or explicit change requests from reviewers.

How do I reuse an existing pull request for the same branch pair?

Reuse an existing pull request for the same branch pair by checking if a PR already exists for the feature and target base branches, avoiding duplicate PRs when pushing new commits to an open review.