NVIDIA-NeMo/DataDesigner / .agents/skills/update-pr
update-pr
VerifiedUpdate an existing GitHub PR description to reflect current changes after incorporating feedback. The argument may include the "--title" flag to also update the pull-request title, plus special instructions for the summary.
Update Pull Request
Update the description of an existing GitHub pull request for the current branch.
Arguments
$ARGUMENTS can be used for:
--titleflag: Include to also update the PR title- Special instructions (same as create-pr):
- Guiding the summary: "emphasize the performance improvements"
- Adding context: "this PR now also includes the auth fixes"
- Any other guidance for the updated description
Step 1: Find the Existing PR
- Get current branch and PR info:
gh pr view --json number,title,body,url,headRefName,state
Important checks:
- If no PR exists for the current branch, fail and inform the user to use
/create-prinstead - If the PR is merged or closed, fail and inform the user the PR is no longer open
Step 2: Gather Current State
Run these commands in parallel to understand the full state:
- Uncommitted changes:
git status --porcelain - All commits on branch:
git log origin/main..HEAD --oneline - File changes summary:
git diff --stat origin/main..HEAD - Full diff:
git diff origin/main..HEAD - Repo info:
gh repo view --json nameWithOwner -q '.nameWithOwner'(for constructing file URLs)
Important checks:
- If uncommitted changes exist, warn the user and ask if they want to commit first
Step 3: Analyze and Categorize Changes
By Change Type (from commits and diff)
- ✨ Added: New files, features, capabilities
- 🔧 Changed: Modified existing functionality
- 🗑️ Removed: Deleted files or features
- 🐛 Fixed: Bug fixes
- 📚 Docs: Documentation updates
- 🧪 Tests: Test additions/modifications
Identify Attention Areas
Flag for special reviewer attention:
- Files with significant changes (>100 lines)
- Changes to base classes, interfaces, or public API
- New dependencies (
pyproject.toml,requirements.txt) - Configuration schema changes
- Security-related changes
Step 4: Update the PR
-
Push any new commits (if needed):
git push -
Generate updated description using the same template as create-pr (see below)
-
Update the PR body:
gh pr edit <number> --body "$(cat <<'EOF' <body> EOF )" -
Optionally update title (if
--titleflag was provided):gh pr edit <number> --title "<new-title>" -
Return the PR URL to the user.
PR Description Template
Use the same template as create-pr, with an updated footer:
## Summary
[1-2 sentence overview of what this PR accomplishes]
## Changes
### Added
- [New features/files - link to key files when helpful]
### Changed
- [Modified functionality - reference commits for specific changes]
### Removed
- [Deleted items]
### Fixed
- [Bug fixes - if applicable]
## Attention Areas
> Reviewers: Please pay special attention to the following:
- [`path/to/critical/file.py`](https://github.com/<owner>/<repo>/blob/<branch>/path/to/critical/file.py) - [Why this needs attention]
---
*Description updated with AI*
Section Guidelines
- Summary: Always include - be concise and focus on the "why"
- Changes: Group by type, omit empty sections
- Attention Areas: Only include if there are genuinely important items; omit for simple PRs
- Links: Include links to code and commits where helpful for reviewers:
- File links require full URLs - relative paths don't work in PR descriptions
- Link to a file:
[filename](https://github.com/<owner>/<repo>/blob/<branch>/path/to/file.py) - Link to specific lines:
[description](https://github.com/<owner>/<repo>/blob/<branch>/path/to/file.py#L42-L50) - Use the branch name in the URL so links point to the PR's version of files
- Reference commits:
abc1234- GitHub auto-links short commit SHAs in PR descriptions
Edge Cases
- No PR exists for current branch: Fail and inform user to use
/create-prinstead - PR is merged/closed: Fail and inform user the PR is no longer open
- Uncommitted work: Warn and ask before proceeding
- No new changes since PR creation: Still allow update - user may want to rewrite the description
- Large PRs (>20 files): Summarize by directory/module
Key Differences from /create-pr
| Aspect | /create-pr | /update-pr |
|---|---|---|
| PR state | Creates new | Updates existing |
| Command | gh pr create | gh pr edit |
| First step | Check for commits | Find existing PR |
| Branch push | With -u flag | Simple push |
| Title | Always sets | Optional (with --title) |
| Footer | "Generated with AI" | "Description updated with AI" |
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: 318k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | 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: 318k | 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: 318k | Updated | Claude CodeCodex | Verified | Install |