create-pr

Creates conventional branches, atomic commits, and GitHub pull requests with terse messages.

3|1|Updated Aug 23, 2025
One-click install
npx skills add https://github.com/samuelpatro/.claude --skill create-pr-samuelpatro
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-pr
Source: https://github.com/samuelpatro/.claude/tree/main/skills/create-pr
Command: npx skills add https://github.com/samuelpatro/.claude --skill create-pr-samuelpatro

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning a pile of uncommitted changes into a clean, reviewable pull request requires consistent branch naming, atomic commit splitting, and well-written PR descriptions—work that is repetitive and easy to get wrong. This Skill automates the entire flow from staging to opening the PR. ## Core Features & Use Cases - Conventional branch management: Creates or renames branches to the <type>/<short-description> convention (feat, fix, chore, etc.), including inside git worktrees. - Atomic commits: Splits changes by concern into separate commits with conventional commit subjects, imperative mood, and proper breaking-change footers, while never staging secret files. - PR creation via GitHub CLI: Pushes the branch and opens a PR with a ≤70-char title, inferred labels checked against gh label list, why-focused body bullets, and a mandatory test plan. - Use Case: After finishing a bug fix across several files, ask to open a PR—the Skill stages only relevant files, writes fix(auth): correct redirect loop style commits, pushes, and returns the PR URL. ## Quick Start Ask the assistant to create a pull request for your current changes, for example by saying "create a PR for these changes".

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 pull request from uncommitted changes?▼

Ask to create a PR and the Skill stages the relevant files, splits them into atomic conventional commits, pushes the branch with git push -u, and opens the PR using gh pr create. It outputs the PR URL when finished.

How to write conventional commit messages automatically?▼

The Skill generates commit subjects in the format type(scope): imperative summary, using types like feat, fix, refactor, and docs. Subjects stay under 50-72 characters, bodies are added only for non-obvious changes, and breaking changes get a BREAKING CHANGE footer.

Does it work with git worktrees and non-standard branch names?▼

Yes. If the current branch does not follow the type/short-description convention, including auto-generated worktree branches like claude/..., the Skill renames it in place with git branch -m, which works inside worktrees.

What happens if my branch already has an open pull request?▼

The Skill checks for an existing PR with gh pr list --head before creating one. If a PR already exists for the branch, it surfaces the existing URL instead of creating a duplicate.

Can it accidentally commit secrets or force push?▼

No. The Skill stages files individually by name and never stages secret files like .env, *.key, or *.pem. If a push fails due to diverged history, it stops and informs you rather than force pushing.