update-pr

Update an existing GitHub PR description to reflect current changes after incorporating feedback

1,486 stars

Best use case

update-pr is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Update an existing GitHub PR description to reflect current changes after incorporating feedback

Teams using update-pr should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/update-pr/SKILL.md --create-dirs "https://raw.githubusercontent.com/NVIDIA-NeMo/DataDesigner/main/.agents/skills/update-pr/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/update-pr/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How update-pr Compares

Feature / Agentupdate-prStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Update an existing GitHub PR description to reflect current changes after incorporating feedback

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Update Pull Request

Update the description of an existing GitHub pull request for the current branch.

## Arguments

`$ARGUMENTS` can be used for:
- `--title` flag: 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

1. **Get current branch and PR info**:
   ```bash
   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-pr` instead
- 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:

1. **Uncommitted changes**: `git status --porcelain`
2. **All commits on branch**: `git log origin/main..HEAD --oneline`
3. **File changes summary**: `git diff --stat origin/main..HEAD`
4. **Full diff**: `git diff origin/main..HEAD`
5. **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

1. **Push any new commits** (if needed):
   ```bash
   git push
   ```

2. **Generate updated description** using the same template as create-pr (see below)

3. **Update the PR body**:
   ```bash
   gh pr edit <number> --body "$(cat <<'EOF'
   <body>
   EOF
   )"
   ```

4. **Optionally update title** (if `--title` flag was provided):
   ```bash
   gh pr edit <number> --title "<new-title>"
   ```

5. **Return the PR URL** to the user.

## PR Description Template

Use the same template as create-pr, with an updated footer:

```markdown
## 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-pr` instead
- **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

data-designer

1486
from NVIDIA-NeMo/DataDesigner

Use when the user wants to create a dataset, generate synthetic data, or build a data generation pipeline.

search-github

1486
from NVIDIA-NeMo/DataDesigner

Search GitHub issues, discussions, and PRs for content related to a topic

search-docs

1486
from NVIDIA-NeMo/DataDesigner

Search local documentation in the docs/ folder for content related to a topic

review-code

1486
from NVIDIA-NeMo/DataDesigner

Perform a thorough code review of the current branch or a GitHub PR by number.

create-pr

1486
from NVIDIA-NeMo/DataDesigner

Create a GitHub PR with a well-formatted description matching the repository PR template (flat Changes by default; optional Added/Changed/Removed/Fixed grouping)

commit

1486
from NVIDIA-NeMo/DataDesigner

Commit current changes with a clear, descriptive message

claude-win11-speckit-update-skill

31392
from sickn33/antigravity-awesome-skills

Windows 11 system management

Investor Update Generator

3880
from openclaw/skills

Generate professional monthly/quarterly investor updates that keep stakeholders informed and build trust.

Workflow & Productivity

update-deps

37910
from RSSNext/Folo

Update all dependencies across frontend and backend projects. Reads changelogs for breaking changes, checks affected code, runs tests, and provides a summary. Use when updating npm dependencies across the monorepo.

speckit-updater

31392
from sickn33/antigravity-awesome-skills

SpecKit Safe Update

update-specification

28865
from github/awesome-copilot

Update an existing specification file for the solution, optimized for Generative AI consumption based on new requirements or updates to any existing code.

update-markdown-file-index

28865
from github/awesome-copilot

Update a markdown file section with an index/table of files from a specified folder.