pr

Create a GitHub pull request from the current branch with commit history and diff context.

1|4|Updated Oct 27, 2014
One-click install
npx skills add https://github.com/rjernst/dotfiles --skill pr-rjernst
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr
Source: https://github.com/rjernst/dotfiles/tree/main/claude/skills/pr
Command: npx skills add https://github.com/rjernst/dotfiles --skill pr-rjernst

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating a GitHub pull request usually requires manual steps: ensuring the branch is pushed, choosing the correct base branch, writing a clear title/body, and remembering the required review flow.

Core Features & Use Cases

  • Automated repo & base detection: Resolves both the user fork (origin) and the parent repository (upstream) to infer the correct base branch when not explicitly provided.
  • Safe push-before-PR workflow: Detects whether your branch has an upstream tracking branch and pushes commits as needed before attempting PR creation.
  • Drafted PR content with review gate: Generates a proposed PR title and body from your commit history and diff summary, then requires an explicit approval/cancel checkpoint before calling gh pr create.
  • Guardrails against invalid targets: Refuses to create PRs from main or master and supports an explicit base branch argument with validation.

Quick Start

Tell your AI to create a PR from the current branch by running: /pr.

Frequently Asked Questions about pr

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

FAQPage Schema
How do I create a GitHub pull request from my current branch?

To create a GitHub pull request from your current branch, the Skill resolves your origin and upstream repositories, pushes any unpushed commits, drafts a title and body from your diff, and runs gh pr create after your approval.

How does base branch detection work for pull requests?

Base branch detection works by resolving both the user fork (origin) and the parent repository (upstream) to automatically infer the correct base branch for the pull request when one is not explicitly provided.

Can I create a pull request directly from the main branch?

No, you cannot create a pull request from the main or master branch. The workflow enforces guardrails that block PR creation on these branches to prevent invalid targets and requires an explicit base branch argument.

How is the pull request title and body generated automatically?

The pull request title and body are generated automatically by analyzing your commit history and diff summary. The system drafts this content and then requires an explicit approval checkpoint before submitting the PR.

Do I need to push my branch before creating a pull request?

No, you do not need to manually push your branch first. The workflow detects whether your branch has an upstream tracking branch and automatically pushes commits as needed before attempting PR creation.

What is the best way to automate the GitHub PR workflow?

The best way to automate the GitHub PR workflow is to use a tool that resolves repositories, pushes branches, validates targets, drafts content from diffs, and enforces a mandatory review gate before executing gh pr create.