update-pr
Update an existing GitHub PR description to reflect current changes after incorporating feedback
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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/update-pr/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How update-pr Compares
| Feature / Agent | update-pr | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/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
Use when the user wants to create a dataset, generate synthetic data, or build a data generation pipeline.
search-github
Search GitHub issues, discussions, and PRs for content related to a topic
search-docs
Search local documentation in the docs/ folder for content related to a topic
review-code
Perform a thorough code review of the current branch or a GitHub PR by number.
create-pr
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
Commit current changes with a clear, descriptive message
claude-win11-speckit-update-skill
Windows 11 system management
Investor Update Generator
Generate professional monthly/quarterly investor updates that keep stakeholders informed and build trust.
update-deps
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
SpecKit Safe Update
update-specification
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
Update a markdown file section with an index/table of files from a specified folder.