From Create PR Skill
Create and open GitHub pull requests from local repository changes. Use this skill when the user asks to create PR, open PR, abrir PR, criar pull request, ship this branch, ready for review, publish local changes as a pull request, or invokes /create-pr. The skill inspects branch state and diffs, asks before branch, staging, commit, push, base branch, assignee, or ready/draft decisions, requires pr-generate-description before PR creation, pushes with git, and creates the PR with gh.
How this skill is triggered — by the user, by Claude, or both
Slash command
/create-pr:create-prThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Publish local repository changes as a GitHub pull request while keeping scope,
Publish local repository changes as a GitHub pull request while keeping scope, branching, commits, and PR metadata explicit.
gh write commands, request approval to run
the flow outside the sandbox environment. Do not start the approved write flow
inside the sandbox and retry piecemeal.rafaeelricco/ when suggesting or
creating a new branch. If the user provides an exact branch name or a
different prefix, use the user-provided value.pr-generate-description before opening or updating a PR
body. Do not improvise the PR body from raw diff notes alone.Require:
gh.gh.Run:
gh --version
gh auth status
git status -sb
git branch --show-current
git remote get-url origin
gh repo view --json defaultBranchRef,nameWithOwner
Stop and report the blocker if any requirement fails.
Run:
git status -sb
git branch --show-current
git diff --stat
git diff
git log --oneline --decorate -20
gh pr view --json number,url,state
If gh pr view fails because no PR exists, continue. If it returns a PR, report
the URL and skip duplicate creation unless the user asks to edit the existing PR.
Identify:
If the current branch is main, master, or the detected default branch, do
not open a PR from that branch.
Read the diff, summarize the change, and suggest 2 or 3 branch names using the
rafaeelricco/ prefix, based on the modified files and behavior.
Ask the user to choose one path:
If the user chooses full flow:
Use:
git switch -c "approved-branch-name"
If the default branch already has local commits ahead of the base branch, ask before creating a new branch from that state. Do not reset, rebase, or move commits back off the default branch unless the user asks.
If the user is already on a non-default branch:
When the worktree has mixed or unclear changes, show the changed files and ask which files belong in the PR.
Stage explicit paths when scope is mixed:
git add path/to/file
Use git add -A only after the user confirms the whole worktree belongs in the
PR.
Ask for or propose a concise commit message, then wait for confirmation.
Run:
git commit -m "Short descriptive message"
If no staged changes exist and the branch has no commits ahead of base, stop and report that no PR content exists.
Run:
git push -u origin "$(git branch --show-current)"
If push fails, report the error and ask before retrying with a different remote, branch name, or force option.
Load and follow pr-generate-description.
Use that skill's questionnaire and generated Markdown body. When the PR will be created in this session, pass the body to the PR creation step through a temp file and delete it afterward.
Create the PR with gh pr create after the branch is pushed.
Confirm before creation:
Use a real Markdown body file:
gh pr create --draft --title "Plain title under 72 chars" --body-file /tmp/pr-body.md --base BASE --head HEAD
If the user chooses self-assignment, add --assignee @me. If that fails, report
the error and ask whether to retry without assignee or stop.
Delete the temporary PR body file after creation.
gh: stop and ask the user to install GitHub CLI.gh auth status: stop and ask the user to authenticate.Report:
/create-pr/create-pr while on main with three modified files/create-pr while on a feature branch with committed changes/create-pr with mixed unrelated filesCreate a PR, but I will handle the commits myselfOffers UI/UX design guidance for web and mobile with 50+ styles, 161 color palettes, 57 font pairings, and 99 UX guidelines across 10 stacks. Use for designing pages, components, color systems, or reviewing UI code.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub rafaeelricco/dotfiles --plugin create-pr