| name | update-pr |
| description | Updates an existing pull request with new changes, commits, and optionally revises the PR description. Activate when the user asks to update, fix, or add to an existing PR. Also activate when the user says "update the PR", "fix the PR", "add this to the PR", or any variation of modifying an existing pull request.
|
Update Pull Request Skill
Updates an open PR to reflect new work. Not for creating a PR (use pr-creation),
reviewing (gh pr view), or merging (gh pr merge).
Workflow
1. Verify the PR is open
gh pr view --json number,state,title,url
No PR → offer /pr-creation. Merged or closed → don't modify; ask the user what to do
(a merged/closed PR won't reopen on push, so new commits orphan).
2. Make the requested changes
3. Commit
Use the /commit skill for conventional commits.
4. Push
git push
5. Update title and description to the PR's current state
Reflect the totality of the PR, not just the latest commit:
git diff $CLAUDE_CODE_BASE_REF...HEAD and git log $CLAUDE_CODE_BASE_REF..HEAD --oneline
for the full scope.
- Follow any
CONTRIBUTING.md / .github/PULL_REQUEST_TEMPLATE.md conventions, merged with
the format in .claude/skills/pr-creation/pr-templates.md.
- Rewrite via
gh pr edit <pr-number> --title "<type>: ..." --body ... (HEREDOC for the body).
6. Verify CI, then report
timeout 15m gh pr checks --watch. If checks fail, fix and repeat from step 3. When green,
report the PR URL.