home / skills / phrazzld / claude-config / pr
This skill creates a draft PR from the current branch, commits uncommitted changes, and writes a structured body with issue links for review.
npx playbooks add skill phrazzld/claude-config --skill prReview the files below or copy the command above to add this skill to your agents.
---
name: pr
description: |
Full PR workflow from working directory to draft PR.
Commits uncommitted changes, analyzes diff, writes description, opens draft.
Use when: opening a pull request, shipping to review, creating PR.
effort: medium
---
# /pr
Open a pull request from current branch state.
## Role
Engineer shipping clean, well-documented PRs.
## Objective
Create a draft PR from current branch. Link to issue, explain what/why/how.
## Latitude
- Stage and commit any uncommitted changes with semantic message
- Read linked issue from branch name or recent commits
- Write PR body that explains decisions, not just changes
## PR Body Requirements (MANDATORY)
Every PR body must contain all five sections. A PR missing any section is not ready.
```
## Summary
What changed and why it matters. Not a diff recap — explain the significance.
Link to the issue. State the problem this solves or the capability this adds.
## Changes
Concise list of what was done. Reference key files/functions.
## Acceptance Criteria
Copied or derived from the linked issue. Checkboxes.
## Manual QA
Step-by-step instructions a reviewer can follow to verify the change works.
Include: setup steps, exact commands, expected output, URLs to visit.
## Test Coverage
Pointers to specific test files and test functions that cover this change.
Note any gaps: what ISN'T tested and why.
```
## Workflow
1. **Clean** — Commit any uncommitted changes with semantic message
2. **Context** — Read linked issue, diff branch against main, identify relevant tests
3. **Describe** — Title from issue, body follows PR Body Requirements above
4. **Open** — `gh pr create --draft --assignee phrazzld`
5. **Comment** — Add context comment if notable decisions were made
## Comment Style
Like a colleague leaving context for future-you:
- **Concise** — No fluff
- **High-context** — Reference files, functions, decisions
- **Useful** — What's not obvious from the diff?
- **Human** — Some wit welcome
## Output
PR URL.
This skill creates a draft pull request from the current branch, handling uncommitted changes, writing a structured PR body, and opening the draft for review. It links to an issue when available and produces a concise, review-ready PR with required sections. Designed for engineers shipping clear, testable changes.
It stages and commits any uncommitted changes with a semantic message, inspects the branch name and recent commits to find a linked issue, and diffs the branch against main to identify relevant changes and tests. It then generates a PR title and a mandatory five-section body (Summary, Changes, Acceptance Criteria, Manual QA, Test Coverage), runs the gh command to open a draft PR, and posts a concise context comment if notable decisions were made.
What if the branch has no linked issue?
The skill will attempt to infer context from recent commits and will prompt to include a link or short problem statement; it will still create the PR but flags missing issue linkage.
Can I customize the commit message the skill uses?
Yes. You can provide a semantic message; otherwise the skill generates one based on the changes and common conventions.
Will it run tests automatically?
No. The skill identifies relevant tests and references them in the PR body, but it expects you to run tests before creating the PR.