pbl/skills/create-pr/SKILL.md
Use when the user asks to "create a PR", "open a pull request", "submit changes", "push and create PR", "send this for review", "make a PR", "pr this", or wants to turn their current work into a reviewed pull request. Also use when the user finishes a build and wants to get their changes merged. This skill handles branch creation, PR formatting with mermaid diagrams, and automated review — use it even if the user just says "PR" or "ship it".
npx skillsauth add tim-hub/powerball create-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a pull request from current changes, with a rich description including purpose, file changes, challenges, and a mermaid diagram. Then run automated review and fix issues in a loop.
The skill handles two scenarios automatically — working directly on main (needs a new branch) or already on a feature branch (just create the PR). After PR creation, it runs /pr-review-toolkit:review-pr and fixes issues iteratively, up to 3 rounds.
Gather context to decide the right path:
git branch --show-current
git status --short
git diff --stat
git diff --stat --staged
git log --oneline -5
Determine:
main, master, or a feature branch?If there are no changes AND no unpushed commits, tell the user there's nothing to create a PR from and stop.
When changes exist on main or master, they need a feature branch before a PR can be created.
Derive a branch name — from the diff, pick a kebab-case name: feat/short-description, fix/short-description, refactor/short-description, or chore/short-description. Incorporate the user's argument if provided (e.g. feat/PROJ-123-add-auth).
Create branch via worktree — use /using-git-worktrees with the derived branch name. This creates an isolated worktree for the PR branch.
Commit — use /commit to stage and commit the changes.
Push the branch: git push -u origin <branch-name>
The branch already exists — just ensure changes are committed and pushed.
/commit to stage and commit.git push -u origin <branch-name>
Before creating the PR, build a thorough understanding of the changes. Compare against the base branch detected in Step 1 (main or master):
BASE=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
git log $BASE..HEAD --oneline
git diff $BASE..HEAD --stat
git diff $BASE..HEAD
From this analysis, extract:
Read the PR description template from this skill's templates/pr-description.md. Fill it in with the analysis from Step 3.
For the mermaid diagram, choose the most informative diagram type based on the changes:
The diagram should show what changed and how — not the entire system. Highlight modified components and their connections.
Create the PR using gh:
gh pr create --title "<title>" --body "$(cat <<'EOF'
<filled template content>
EOF
)"
The title should be concise (under 70 characters), following conventional commit style if appropriate.
After creation, capture the PR number and URL from the output.
Run automated review and fix issues, up to 3 rounds.
Review — use /pr-review-toolkit:review-pr with the PR number. This dispatches multiple specialized reviewers (code quality, tests, error handling, types, comments).
Evaluate results — classify issues by severity:
If critical or high issues exist AND this is not round 3:
/commit with hint "address PR review findings (round N)"git pushIf only medium/low issues or no issues:
If round 3 and critical/high issues still remain:
gh pr comment <pr-number> --body "$(cat <<'EOF'
## Unresolved Review Issues
The following critical/high issues remain after 3 review rounds and need manual attention:
<list of issues with file locations and descriptions>
EOF
)"
Tell the user:
/lodge if this was a pbl spec build| Situation | Action | |-----------|--------| | On main with changes | Create feature branch, commit, push, PR | | On feature branch with uncommitted changes | Commit, push, PR | | On feature branch, already pushed | Just create PR | | No changes, no unpushed commits | Stop — nothing to PR | | Review finds critical issues (round < 3) | Fix, commit, push, re-review | | Review finds only minor issues | Complete — no fixes needed | | Critical issues after 3 rounds | Leave PR comment, report to user |
testing
Picks the right Kubernetes Deployment update strategy (RollingUpdate / Recreate / Blue-Green / Canary) for the situation. Use when configuring a new Deployment, changing rollout config, or deciding how to ship a risky change.
tools
Translates a markdown file to a target language, preserving structure. Use when the user needs a markdown file translated.
development
Translates text between any two languages while preserving source format. Use when the user needs to translate plain text, code, or markdown content.
testing
Generates written content — blog posts, social posts, emails, and marketing copy — matched to the project's existing voice. Use when the user needs written material.