github-create-pr

Create a GitHub pull request from the current branch with generated metadata.

1|Updated Dec 9, 2024
One-click install
npx skills add https://github.com/hadenlabs/tasks --skill github-create-pr-hadenlabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-create-pr
Source: https://github.com/hadenlabs/tasks/tree/main/.claude/skills/github-create-pr
Command: npx skills add https://github.com/hadenlabs/tasks --skill github-create-pr-hadenlabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill streamlines the PR workflow by validating changes, pushing the branch, and creating a pull request with a generated title and description.

Core Features & Use Cases

  • Validate changes before opening the PR.
  • Inspect the diff and recent commits to summarize the branch.
  • Check whether a PR already exists for the current branch and stop if one is already open.
  • Push the current branch, setting upstream when needed.
  • Build the PR title and description from the PR template.
  • Create the PR with gh pr create and return the URL.

Quick Start

Run the github-create-pr skill on your current branch to automatically push changes and create a pull request with a generated title and description.

Frequently Asked Questions about github-create-pr

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

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

You can automate creating a GitHub pull request by running the skill on your feature branch, which validates changes, pushes the branch with upstream tracking, generates the title and description, and executes gh pr create.

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

Yes, you need both git and the GitHub CLI installed to automate pull request creation from a diff. The skill relies on the GitHub CLI to execute the underlying gh pr create command and return the PR URL.

How does automated PR generation handle branches that already have an open pull request?

Automated PR generation checks for existing open pull requests on your current branch and stops the process if one already exists, preventing duplicate PRs from being created for the same feature branch.

Can I use my repository's PR template when automatically generating a GitHub pull request?

Yes, the skill reads your repository's PR template to compose the pull request body. It inspects the branch diff and recent commits to build a consistent PR title and description based on that template.

What happens if my feature branch has no upstream tracking when I try to auto-create a pull request?

When auto-creating a pull request, the skill pushes your current branch and automatically sets the upstream tracking if needed, ensuring the local branch is correctly linked to the remote repository before opening the PR.

What's the best way to validate changes before opening a GitHub pull request?

The best way to validate changes before opening a GitHub pull request is to use an automation skill that inspects the diff and recent commits, ensuring your feature branch is ready for review before pushing and creating the PR.