pr-creator

Automates GitHub Pull Request creation using Git CLI and gh auth workflows.

2|1|Updated Sep 9, 2024
One-click install
npx skills add https://github.com/RanFR/Config --skill pr-creator-ranfr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-creator
Source: https://github.com/RanFR/Config/tree/main/ClaudeCode/skills/pr-creator
Command: npx skills add https://github.com/RanFR/Config --skill pr-creator-ranfr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the end-to-end PR workflow: validating the current branch, analyzing upcoming changes, pushing to remote, and creating a PR with a structured description, saving time and reducing manual steps.

Core Features & Use Cases

  • Branch checks: Ensure the current branch is ready for PR submission.
  • Change analysis: Analyze upcoming changes to craft meaningful PR details.
  • PR creation: Use the gh CLI to create a Pull Request.
  • Description generation: Auto-generate a structured PR description from changes.
  • Use Case: When finishing a feature branch, automatically prepare and open a PR with a comprehensive description, avoiding back-and-forth edits.

Quick Start

  • Prepare: Ensure GitHub CLI is authenticated with gh auth status and check the branch with git status.
  • Analyze changes: git diff, git diff --staged, git log --oneline -5
  • Create PR: git push -u origin HEAD and gh pr create --title "PR 标题" --body "PR 描述"

Frequently Asked Questions about pr-creator

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

FAQPage Schema
How do I automate creating GitHub pull requests from the command line?

Automate GitHub pull request creation by validating your branch, analyzing changes with git diff and git log, pushing to remote, then using gh pr create with a structured description. This Skill handles the full workflow end-to-end, saving time on manual PR setup and reducing errors.

What do I need to set up before using gh to create pull requests?

Authenticate GitHub CLI with gh auth status, ensure you're on the correct branch via git status, and have repository access. The Skill requires git and gh installed, active GitHub authentication, and awareness of your current branch before analyzing changes and pushing.

Can I generate PR descriptions automatically from my git changes?

Yes. The Skill analyzes staged and unstaged changes using git diff, recent commits via git log, and generates a structured PR description automatically. This eliminates manual description writing and ensures consistency across pull requests.

How do I push a branch and create a PR in one workflow?

Use git push -u origin HEAD to push your branch, then gh pr create with title and body parameters to open the PR. This Skill combines both steps into an automated workflow that validates the branch, analyzes changes, and creates the PR with a comprehensive description.

What types of changes does this Skill work with?

The Skill handles feature work, bug fixes, and documentation updates. It analyzes any git changes—staged or unstaged—to craft meaningful PR details, making it applicable across software projects using Git and GitHub CLI regardless of change type.

Does this approach work with different Git workflows?

The Skill applies to software projects using Git and the GitHub CLI. It manages branches, validates readiness, and creates PRs with structured descriptions. Success depends on gh authentication and repository access; compatibility with your specific workflow depends on branch naming and team conventions.