create-pr

Create GitHub pull requests from local or pushed changes via gh CLI.

9|Updated May 5, 2012
One-click install
npx skills add https://github.com/magus/dotfiles --skill create-pr-magus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-pr
Source: https://github.com/magus/dotfiles/tree/main/codex/skills/create-pr
Command: npx skills add https://github.com/magus/dotfiles --skill create-pr-magus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you turn your local or already-pushed changes into a clear, reviewer-friendly GitHub pull request without missing key details or steps.

Core Features & Use Cases

  • End-to-end PR setup: Collects the right repo and branch context, inspects diffs, and prepares commits (when needed) before opening a PR.
  • Reviewer-first PR writing: Produces a PR body template organized around ## Problem and ## Solution, with optional ## Test, and encourages evidence-backed claims.
  • Quality enhancements for collaboration: Guides adding GitHub inline review comments on the most important changed lines to clarify intent and tradeoffs for reviewers.
  • GitHub CLI-first workflow: Uses gh for creation, viewing, and review comments, falling back to web/app behavior only when required.

Quick Start

Ask Codex to create a draft PR for your current branch changes for the repository’s default base branch, and include any relevant test commands and output in an optional ## Test section.

Frequently Asked Questions about create-pr

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

FAQPage Schema
How do I create a GitHub pull request from local changes using the CLI?

Creating a pull request from local changes involves gathering repo context, committing and pushing the branch, and opening a PR via the gh CLI with a structured Problem/Solution body.

What is the best way to write a reviewer-friendly pull request body?

A reviewer-friendly pull request body uses a structured template with ## Problem and ## Solution sections, an optional ## Test section, and inline comments anchored to key diff lines.

Can I open a draft PR from the command line with uncommitted changes?

Yes, you can open a draft PR from the command line with uncommitted changes; the Skill inspects diffs, commits as required, pushes the branch, and opens the draft PR.

Does this workflow support adding GitHub inline review comments to specific diff lines?

Yes, the workflow supports adding GitHub inline review comments anchored to specific changed diff lines to clarify intent and tradeoffs for code reviewers.

How do I select the correct base branch when opening a pull request?

To select the correct base branch when opening a pull request, the Skill retrieves available base-branch options from gh metadata to ensure the PR targets the appropriate branch.