push-pr

Push the current git branch and create or update a GitHub pull request.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/KMakayee/playbook --skill push-pr-kmakayee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: push-pr
Source: https://github.com/KMakayee/playbook/tree/main/.claude/skills/push-pr
Command: npx skills add https://github.com/KMakayee/playbook --skill push-pr-kmakayee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents broken pull requests by guiding you through pushing your current branch with staleness checks, creating or updating a PR, and running code review before merging.

Core Features & Use Cases

  • Staleness gate vs base branch: Detects whether your branch is behind the target base and stops to prevent outdated PRs.
  • Push readiness and PR creation/update: Pushes your branch (with upstream when missing), creates a PR if none exists, or surfaces the existing PR with advisory guidance.
  • Review-driven merge with squashed commits: Runs /code-review, merges with --squash when clean, and provides explicit handling when review issues are found.

Quick Start

Run /push-pr to push your current branch and open or update a pull request with an automated code review and conditional squash merge.

Frequently Asked Questions about push-pr

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

FAQPage Schema
How do I safely push a git branch and open a pull request without merging stale code?

To push a git branch safely, you need staleness checks against the base branch to prevent outdated pull requests. This workflow fetches the target base, counts behind commits, and stops if your branch is behind before pushing and opening a PR.

Can I automatically run code review and squash merge a GitHub pull request from the CLI?

Yes, you can automate code review and squash merging from the CLI. After pushing your branch and creating a GitHub pull request, the workflow runs a code review check and merges with a squash commit only when the review is clean.

What happens if I try to update a pull request but gh already has an existing PR for the branch?

When an existing pull request is already open for your branch, the workflow detects it via gh and surfaces the current PR with advisory guidance instead of creating a duplicate, ensuring your branch is pushed and the PR is updated consistently.

Does the squash merge workflow handle merge-in-progress errors or unclean git status?

Yes, the workflow requires a clean git status before pushing and includes safe error handling for merge-in-progress recovery. If review issues are found or merges stall, it provides explicit handling to safely resolve the error without corrupting the branch.

How do I push a local git branch with upstream tracking when opening a pull request?

To push a local branch with upstream tracking, the workflow checks for an existing upstream and sets it automatically during the push if missing. This ensures your local branch is correctly linked to origin before pull request creation.