Automates updating existing GitHub pull request descriptions based on recent code changes.

Install

mkdir -p .claude/skills/update-pr && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4932" && unzip -o skill.zip -d .claude/skills/update-pr && rm skill.zip

Installs to .claude/skills/update-pr

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Update an existing GitHub PR description to reflect current changes after incorporating feedback
96 charsno explicit “when” trigger
Beginner

Key capabilities

  • Update PR description
  • Sync PR with code changes
  • Categorize changes by type
  • Flag attention areas

How it works

It analyzes git diffs and commit history to generate a structured PR description and updates it via the GitHub CLI.

Inputs & outputs

You give it
Code changes and feedback
You get back
Updated PR description

When to use update-pr

  • Updating PR description after review feedback
  • Syncing PR text with final refactored code
  • Adding summary of changes to an existing PR

About this skill

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:
    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):

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

  3. Update the PR body:

    gh pr edit <number> --body "$(cat <<'EOF'
    <body>
    EOF
    )"
    
  4. Optionally update title (if --title flag was provided):

    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:

## 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 stateCreates newUpdates existing
Commandgh pr creategh pr edit
First stepCheck for commitsFind existing PR
Branch pushWith -u flagSimple push
TitleAlways setsOptional (with --title)
Footer"Generated with AI""Description updated with AI"

When not to use it

  • When no PR exists for the branch
  • For merged or closed PRs

Prerequisites

GitHub CLI

Limitations

  • Fails if PR is merged or closed
  • Requires GitHub CLI

How it compares

It automates the synchronization of PR documentation with the latest code state instead of manual editing.

Compared to similar skills

update-pr side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
update-pr (this skill)14moReviewBeginner
workthrough108moReviewBeginner
doc-check42moReviewIntermediate
pr-draft-summary34moNo flagsBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

workthrough

bear2u

Automatically document all development work and code modifications in a structured workthrough format. Use this skill after completing any development task, bug fix, feature implementation, or code refactoring to create comprehensive documentation.

1085

doc-check

coder

Checks if code changes require documentation updates

427

pr-draft-summary

openai

Create a PR title and draft description after substantive code changes are finished. Trigger when wrapping up a moderate-or-larger change (runtime code, tests, build config, docs with behavior impact) and you need the PR-ready summary block with change summary plus PR draft text.

326

create-pr-description

antinomyhq

Generate and create pull request descriptions automatically using GitHub CLI. Use when the user asks to create a PR, generate a PR description, make a pull request, or submit changes for review. Analyzes git diff and commit history to create comprehensive, meaningful PR descriptions that explain what changed, why it matters, and how to test it.

213

git-changes-reporter

No-Trade-No-Life

生成结构化 git 变更报告(JSON + Markdown)。使用此技能当用户提到"git 变更"、"commit 摘要"、"代码审查"、"release note"、"近期改动"、"每日摘要",或需要分析指定 commit 区间的代码变更。包含三元组结构(设计意图、核心代码、影响范围)的语义化报告,适用于代码审查、发布说明、团队同步、CI/CD 等场景。

15

resolve-conflicts

antinomyhq

Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.

81334

Search skills

Search the agent skills registry