open-pr

Push the current branch and create a GitHub pull request via gh.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/smallorbit/smallorbit-plugins --skill open-pr-smallorbit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: open-pr
Source: https://github.com/smallorbit/smallorbit-plugins/tree/main/plugins/flowkit/skills/open-pr
Command: npx skills add https://github.com/smallorbit/smallorbit-plugins --skill open-pr-smallorbit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Push the current branch to origin and automatically open a GitHub pull request against the configured base branch, streamlining code reviews and merges after commits.

Core Features & Use Cases

  • Pushes the current feature branch to origin.
  • Determines the PR base, defaults to develop, with safe fallbacks to non-protected branches.
  • Generates an appropriate PR title from the branch or recent commits and assembles a structured PR body.
  • Detects and preserves issue-ref tokens from commit messages to surface in the PR footer.
  • Validates branch safety (prevents PR from protected branches like develop/main/master) and reports actionable errors when constraints are violated.
  • Uses gh pr create to publish the PR and returns the PR URL for immediate follow-up.

Quick Start

Push the current branch and open a PR against develop.

Frequently Asked Questions about open-pr

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

FAQPage Schema
How do I automatically push my branch and open a GitHub pull request from the command line?

You can push your branch and open a GitHub pull request from the command line by running an automated command that pushes changes to origin and executes gh pr create. This generates a descriptive title and body from commit history before publishing.

What's the best way to generate a pull request title and body from commit history?

Generating a pull request title and body from commit history is done by parsing recent commits to construct a structured description. This approach also detects and preserves issue-ref tokens from commit messages to surface them in the PR footer.

How does a pull request automation tool determine the correct base branch?

A pull request automation tool determines the correct base branch by defaulting to develop and applying safe fallbacks to non-protected branches. It validates branch safety by preventing pull requests from protected branches like develop, main, or master.

Do I need the GitHub CLI installed to automate pull request creation?

Yes, you need the GitHub CLI installed to automate pull request creation because the process relies on the gh pr create command. It also requires git and network access to GitHub to push the branch and publish the pull request.

What happens if I try to open a pull request from a protected branch like main?

If you try to open a pull request from a protected branch like main, the automation validates branch safety and aborts the process. It reports actionable errors when constraints are violated to prevent accidental pushes to protected branches.

Can I keep issue references from my commit messages in the pull request body?

Yes, you can keep issue references from your commit messages in the pull request body. The automation detects and preserves issue-ref tokens from commit history to surface them directly in the PR footer.