uniffy-io/uniffy / .agents/skills/pr
pr
VerifiedCheck the current branch for an existing PR and either update or create one with an auto-generated description based on all commits since diverging from main.
Create or update a GitHub Pull Request for the current branch.
Steps
-
Gather branch info. Run these commands in parallel:
git branch --show-currentto get the current branch name.git merge-base main HEADto find where this branch diverged from main.git statusto check for uncommitted changes (never use-uall).
-
Handle
mainbranch. If the current branch ismain:- Look at the recent commits on main that are not yet in a PR (use
git log origin/main..HEADto find unpushed commits, or if there are none, ask the user how many recent commits to include). - Derive a branch name from the commit messages. Use the pattern
feat/<short-slug>,fix/<short-slug>, orchore/<short-slug>depending on the nature of the changes. The slug should be lowercase, hyphen-separated, and max 4 words (e.g.,feat/calendar-rsvp,fix/auth-token-refresh). - Ask the user to confirm the branch name before creating it.
- Create the branch:
git checkout -b <branch-name>. - Continue with the rest of the steps using this new branch.
- Look at the recent commits on main that are not yet in a PR (use
-
Handle uncommitted changes. If there are staged or unstaged changes (modified/added/deleted files):
- Run
git diffandgit diff --cachedto understand what changed. - Stage the relevant files with
git add(prefer adding specific files overgit add -A; never commit.env, credentials, or secrets). - Write a commit message that accurately describes the changes. Use a short imperative subject line and include a description body if the changes are non-trivial.
- Commit the changes before proceeding.
- If the changes are unclear and you cannot write a good commit message, ask the user what these changes are for.
- Run
-
Collect commit history. Using the merge base from step 1, run in parallel:
git log <merge-base>..HEAD --format="### %s%n%n%b%n---"to get all commit subjects AND bodies on this branch. Both the subject line and the description body are important for understanding changes.git diff <merge-base>...HEAD --statto get the file-level diff summary.git diff <merge-base>...HEAD --name-onlyto get the list of changed files.
-
Check for existing PR. Run
gh pr view --json number,title,url,stateto see if a PR already exists for this branch. -
Analyze changes. Review ALL commits (not just the latest) and the diff stat to understand the full scope. Categorize changes into backend and frontend sections where applicable.
-
Generate PR description. Write a concise, accurate description following this format:
## What this does <2-4 plain-language sentences a non-engineer can read. Explain what the change does for the user or the product and why it matters. No jargon, no file names, no class or function names - describe behavior, not implementation.> ## Summary - <1-3 bullet points covering the main changes across ALL commits>Rules for the description:
- The "What this does" section always comes first and stays plain-language; anyone reading only that section should understand the point of the PR.
- The summary should cover ALL commits on the branch, not just the latest.
- Test plan items should be concrete and testable.
- Never use emojis.
-
Create or update the PR:
- If a PR exists: Update its body using
gh pr edit <number> --body "<body>". Keep the existing title unless it is clearly wrong or does not match the[TYPE] Area: summaryconvention below. - If no PR exists: Push the branch with
git push -u origin <branch>if needed, then create the PR usinggh pr create --title "<title>" --body "<body>". The title follows the repo convention[TYPE] Area: summary, where TYPE isFEAT,FIX, orCHORE(upper case, in brackets) and Area is the main domain touched (for exampleProjects,Chat,Calls,Agents,Deploy,Docs). The summary is lowercase after the colon, in imperative or plain noun style, and reflects the overall theme of the branch. Keep it short, ideally under 80 chars. Checkgh pr list --state all --limit 20if unsure about area names. Do not use conventional-commit prefixes likefix(scope):in PR titles. - Always pass the body via a HEREDOC for correct formatting.
- If a PR exists: Update its body using
-
Report back. Print the PR URL so the user can open it.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |