open-pr

Validate branch state and open a GitHub pull request with gh.

Updated Jun 3, 2026
One-click install
npx skills add https://github.com/0xdeafcafe/skills --skill open-pr-0xdeafcafe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: open-pr
Source: https://github.com/0xdeafcafe/skills/tree/main/skills/open-pr
Command: npx skills add https://github.com/0xdeafcafe/skills --skill open-pr-0xdeafcafe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill turns a finished branch into a well-formed pull request without skipping the checks and context reviewers need. It helps avoid weak PR descriptions, missed validation steps, accidental pushes from the wrong branch, and inconsistent GitHub workflows.

Core Features & Use Cases

  • Pre-flight validation: Checks branch state, commit history, existing PR status, uncommitted changes, and whether the branch is ahead or behind base before opening anything.
  • PR drafting with context: Builds a title and body from commits, diffstat, ADRs, specs, ticket references, PR templates, and repository conventions so the PR reflects the actual change.
  • Safe publication workflow: Runs final sanity checks, asks for explicit approval, pushes the branch, opens the PR with gh pr create, and hands off cleanly to follow-up review work.
  • Use case: After finishing a feature branch, use this Skill to verify readiness, generate a reviewable PR description, and open either a draft or ready-for-review PR without force-pushing or bypassing hooks.

Quick Start

Ask the assistant to use the open-pr skill to review the current branch, draft the pull request, and open it after your approval.

Frequently Asked Questions about open-pr

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

FAQPage Schema
How do I create a GitHub pull request with automated lint and type checks?

To generate a GitHub pull request description automatically, the Skill builds the title and body from your commit history, diffstat, ticket references, and PR templates. This ensures your PR body reflects the actual changes and satisfies repository conventions.

What is the safest workflow to open a draft PR without force-pushing?

Yes, you can use this Skill with CODEOWNERS awareness and custom PR templates. It incorporates repository conventions and CODEOWNERS logic into the PR drafting process, ensuring the generated pull request description and reviewer assignments align with your project's specific ownership rules.

How do I validate a git branch state before opening a pull request?

To validate a git branch state before opening a pull request, the Skill checks uncommitted changes, existing PR status, and whether your branch is ahead or behind the base. These pre-flight checks prevent accidental pushes from unready or stale branches.

What's the best way to ensure my PR template is followed when using gh pr create?

The best way to ensure your PR template is followed during gh pr create is to automate template compliance. The Skill parses your repository's PR template and populates it with context from ADRs, specs, and commits before executing the final publication workflow.